##// END OF EJS Templates
users: updated UI for advanced section. Mostly fixes arround making clearer...
marcink -
r3447:814ebbd7 default
parent child Browse files
Show More
@@ -96,20 +96,16 b''
96 96 <div class="panel-body">
97 97 ${h.secure_form(h.route_path('user_delete', user_id=c.user.user_id), request=request)}
98 98
99 <table class="display">
99 <table class="display rctable">
100 100 <tr>
101 101 <td>
102 102 ${_ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)}
103 103 </td>
104 104 <td>
105 %if len(c.user.repositories) > 0:
106 <input type="radio" id="user_repos_1" name="user_repos" value="detach" checked="checked"/> <label for="user_repos_1">${_('Detach repositories')}</label>
107 %endif
105 <input type="radio" id="user_repos_1" name="user_repos" value="detach" checked="checked" ${'disabled=1' if len(c.user.repositories) == 0 else ''} /> <label for="user_repos_1">${_('Detach repositories')}</label>
108 106 </td>
109 107 <td>
110 %if len(c.user.repositories) > 0:
111 <input type="radio" id="user_repos_2" name="user_repos" value="delete" /> <label for="user_repos_2">${_('Delete repositories')}</label>
112 %endif
108 <input type="radio" id="user_repos_2" name="user_repos" value="delete" ${'disabled=1' if len(c.user.repositories) == 0 else ''} /> <label for="user_repos_2">${_('Delete repositories')}</label>
113 109 </td>
114 110 </tr>
115 111
@@ -118,14 +114,10 b''
118 114 ${_ungettext('This user owns %s repository group.', 'This user owns %s repository groups.', len(c.user.repository_groups)) % len(c.user.repository_groups)}
119 115 </td>
120 116 <td>
121 %if len(c.user.repository_groups) > 0:
122 <input type="radio" id="user_repo_groups_1" name="user_repo_groups" value="detach" checked="checked"/> <label for="user_repo_groups_1">${_('Detach repository groups')}</label>
123 %endif
117 <input type="radio" id="user_repo_groups_1" name="user_repo_groups" value="detach" checked="checked" ${'disabled=1' if len(c.user.repository_groups) == 0 else ''} /> <label for="user_repo_groups_1">${_('Detach repository groups')}</label>
124 118 </td>
125 119 <td>
126 %if len(c.user.repository_groups) > 0:
127 <input type="radio" id="user_repo_groups_2" name="user_repo_groups" value="delete" /> <label for="user_repo_groups_2">${_('Delete repositories')}</label>
128 %endif
120 <input type="radio" id="user_repo_groups_2" name="user_repo_groups" value="delete" ${'disabled=1' if len(c.user.repository_groups) == 0 else ''}/> <label for="user_repo_groups_2">${_('Delete repositories')}</label>
129 121 </td>
130 122 </tr>
131 123
@@ -134,18 +126,37 b''
134 126 ${_ungettext('This user owns %s user group.', 'This user owns %s user groups.', len(c.user.user_groups)) % len(c.user.user_groups)}
135 127 </td>
136 128 <td>
137 %if len(c.user.user_groups) > 0:
138 <input type="radio" id="user_user_groups_1" name="user_user_groups" value="detach" checked="checked"/> <label for="user_user_groups_1">${_('Detach user groups')}</label>
139 %endif
129 <input type="radio" id="user_user_groups_1" name="user_user_groups" value="detach" checked="checked" ${'disabled=1' if len(c.user.user_groups) == 0 else ''}/> <label for="user_user_groups_1">${_('Detach user groups')}</label>
140 130 </td>
141 131 <td>
142 %if len(c.user.user_groups) > 0:
143 <input type="radio" id="user_user_groups_2" name="user_user_groups" value="delete" /> <label for="user_user_groups_2">${_('Delete repositories')}</label>
144 %endif
132 <input type="radio" id="user_user_groups_2" name="user_user_groups" value="delete" ${'disabled=1' if len(c.user.user_groups) == 0 else ''}/> <label for="user_user_groups_2">${_('Delete repositories')}</label>
145 133 </td>
146 134 </tr>
147 135 </table>
148 136 <div style="margin: 0 0 20px 0" class="fake-space"></div>
137 <div class="pull-left">
138 % if len(c.user.repositories) > 0 or len(c.user.repository_groups) > 0 or len(c.user.user_groups) > 0:
139 % endif
140
141 <span style="padding: 0 5px 0 0">${_('New owner for detached objects')}:</span>
142 <div class="pull-right">${base.gravatar_with_user(c.first_admin.email, 16)}</div>
143 </div>
144 <div style="clear: both">
145
146 <div>
147 <p class="help-block">
148 ${_("When selecting the detach option, the depending objects owned by this user will be assigned to the above user.")}
149 <br/>
150 ${_("The delete option will delete the user and all his owned objects!")}
151 </p>
152 </div>
153
154 % if c.can_delete_user_message:
155 <p class="pre-formatting">${c.can_delete_user_message}</p>
156 % endif
157 </div>
158
159 <div style="margin: 0 0 20px 0" class="fake-space"></div>
149 160
150 161 <div class="field">
151 162 <button class="btn btn-small btn-danger" type="submit"
@@ -154,17 +165,6 b''
154 165 ${_('Delete this user')}
155 166 </button>
156 167 </div>
157 % if c.can_delete_user_message:
158 <p class="help-block pre-formatting">${c.can_delete_user_message}</p>
159 % endif
160
161 <div class="field">
162 <span class="help-block">
163 %if len(c.user.repositories) > 0 or len(c.user.repository_groups) > 0 or len(c.user.user_groups) > 0:
164 <p class="help-block">${_("When selecting the detach option, the depending objects owned by this user will be assigned to the `%s` super admin in the system. The delete option will delete the user's repositories!") % (c.first_admin.full_name)}</p>
165 %endif
166 </span>
167 </div>
168 168
169 169 ${h.end_form()}
170 170 </div>
General Comments 0
You need to be logged in to leave comments. Login now