##// END OF EJS Templates
users: updated UI for advanced section. Mostly fixes arround making clearer...
marcink -
r3447:814ebbd7 default
parent child
Show More
@@ -96,20 +96,16
96 <div class="panel-body">
96 <div class="panel-body">
97 ${h.secure_form(h.route_path('user_delete', user_id=c.user.user_id), request=request)}
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 <tr>
100 <tr>
101 <td>
101 <td>
102 ${_ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)}
102 ${_ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)}
103 </td>
103 </td>
104 <td>
104 <td>
105 %if len(c.user.repositories) > 0:
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>
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
108 </td>
106 </td>
109 <td>
107 <td>
110 %if len(c.user.repositories) > 0:
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>
111 <input type="radio" id="user_repos_2" name="user_repos" value="delete" /> <label for="user_repos_2">${_('Delete repositories')}</label>
112 %endif
113 </td>
109 </td>
114 </tr>
110 </tr>
115
111
@@ -118,14 +114,10
118 ${_ungettext('This user owns %s repository group.', 'This user owns %s repository groups.', len(c.user.repository_groups)) % len(c.user.repository_groups)}
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 </td>
115 </td>
120 <td>
116 <td>
121 %if len(c.user.repository_groups) > 0:
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>
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
124 </td>
118 </td>
125 <td>
119 <td>
126 %if len(c.user.repository_groups) > 0:
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>
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
129 </td>
121 </td>
130 </tr>
122 </tr>
131
123
@@ -134,18 +126,37
134 ${_ungettext('This user owns %s user group.', 'This user owns %s user groups.', len(c.user.user_groups)) % len(c.user.user_groups)}
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 </td>
127 </td>
136 <td>
128 <td>
137 %if len(c.user.user_groups) > 0:
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>
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
140 </td>
130 </td>
141 <td>
131 <td>
142 %if len(c.user.user_groups) > 0:
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>
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
145 </td>
133 </td>
146 </tr>
134 </tr>
147 </table>
135 </table>
148 <div style="margin: 0 0 20px 0" class="fake-space"></div>
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 <div class="field">
161 <div class="field">
151 <button class="btn btn-small btn-danger" type="submit"
162 <button class="btn btn-small btn-danger" type="submit"
@@ -154,17 +165,6
154 ${_('Delete this user')}
165 ${_('Delete this user')}
155 </button>
166 </button>
156 </div>
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 ${h.end_form()}
169 ${h.end_form()}
170 </div>
170 </div>
General Comments 0
You need to be logged in to leave comments. Login now