##// END OF EJS Templates
fixes issue #506
marcink -
r2636:4dbc00e9 beta
parent child Browse files
Show More
@@ -1,261 +1,264
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Edit user')} ${c.user.username} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8 <%def name="breadcrumbs_links()">
9 9 ${h.link_to(_('Admin'),h.url('admin_home'))}
10 10 &raquo;
11 11 ${h.link_to(_('Users'),h.url('users'))}
12 12 &raquo;
13 13 ${_('edit')} "${c.user.username}"
14 14 </%def>
15 15
16 16 <%def name="page_nav()">
17 17 ${self.menu('admin')}
18 18 </%def>
19 19
20 20 <%def name="main()">
21 21 <div class="box box-left">
22 22 <!-- box / title -->
23 23 <div class="title">
24 24 ${self.breadcrumbs()}
25 25 </div>
26 26 <!-- end box / title -->
27 27 ${h.form(url('update_user', id=c.user.user_id),method='put')}
28 28 <div class="form">
29 29 <div class="field">
30 30 <div class="gravatar_box">
31 31 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
32 32 <p>
33 33 %if c.use_gravatar:
34 34 <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong>
35 35 <br/>${_('Using')} ${c.user.email}
36 36 %else:
37 37 <br/>${c.user.email}
38 38 %endif
39 39 </div>
40 40 </div>
41 41 <div class="field">
42 42 <div class="label">
43 43 <label>${_('API key')}</label> ${c.user.api_key}
44 44 </div>
45 45 </div>
46 46
47 47 <div class="fields">
48 48 <div class="field">
49 49 <div class="label">
50 50 <label for="username">${_('Username')}:</label>
51 51 </div>
52 52 <div class="input">
53 53 ${h.text('username',class_='medium')}
54 54 </div>
55 55 </div>
56 56
57 57 <div class="field">
58 58 <div class="label">
59 59 <label for="ldap_dn">${_('LDAP DN')}:</label>
60 60 </div>
61 61 <div class="input">
62 62 ${h.text('ldap_dn',class_='medium disabled',readonly="readonly")}
63 63 </div>
64 64 </div>
65 65
66 66 <div class="field">
67 67 <div class="label">
68 68 <label for="new_password">${_('New password')}:</label>
69 69 </div>
70 70 <div class="input">
71 71 ${h.password('new_password',class_='medium',autocomplete="off")}
72 72 </div>
73 73 </div>
74 74
75 75 <div class="field">
76 76 <div class="label">
77 77 <label for="password_confirmation">${_('New password confirmation')}:</label>
78 78 </div>
79 79 <div class="input">
80 80 ${h.password('password_confirmation',class_="medium",autocomplete="off")}
81 81 </div>
82 82 </div>
83 83
84 84 <div class="field">
85 85 <div class="label">
86 86 <label for="firstname">${_('First Name')}:</label>
87 87 </div>
88 88 <div class="input">
89 89 ${h.text('firstname',class_='medium')}
90 90 </div>
91 91 </div>
92 92
93 93 <div class="field">
94 94 <div class="label">
95 95 <label for="lastname">${_('Last Name')}:</label>
96 96 </div>
97 97 <div class="input">
98 98 ${h.text('lastname',class_='medium')}
99 99 </div>
100 100 </div>
101 101
102 102 <div class="field">
103 103 <div class="label">
104 104 <label for="email">${_('Email')}:</label>
105 105 </div>
106 106 <div class="input">
107 107 ${h.text('email',class_='medium')}
108 108 </div>
109 109 </div>
110 110
111 111 <div class="field">
112 112 <div class="label label-checkbox">
113 113 <label for="active">${_('Active')}:</label>
114 114 </div>
115 115 <div class="checkboxes">
116 116 ${h.checkbox('active',value=True)}
117 117 </div>
118 118 </div>
119 119
120 120 <div class="field">
121 121 <div class="label label-checkbox">
122 122 <label for="admin">${_('Admin')}:</label>
123 123 </div>
124 124 <div class="checkboxes">
125 125 ${h.checkbox('admin',value=True)}
126 126 </div>
127 127 </div>
128 128 <div class="buttons">
129 129 ${h.submit('save',_('Save'),class_="ui-btn large")}
130 130 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
131 131 </div>
132 132 </div>
133 133 </div>
134 134 ${h.end_form()}
135 135 </div>
136 <div class="box box-right">
136 <div style="min-height:780px" class="box box-right">
137 137 <!-- box / title -->
138 138 <div class="title">
139 139 <h5>${_('Permissions')}</h5>
140 140 </div>
141 141 ${h.form(url('user_perm', id=c.user.user_id),method='put')}
142 142 <div class="form">
143 143 <!-- fields -->
144 144 <div class="fields">
145 145 <div class="field">
146 146 <div class="label label-checkbox">
147 147 <label for="create_repo_perm">${_('Create repositories')}:</label>
148 148 </div>
149 149 <div class="checkboxes">
150 150 ${h.checkbox('create_repo_perm',value=True)}
151 151 </div>
152 152 </div>
153 153 <div class="buttons">
154 154 ${h.submit('save',_('Save'),class_="ui-btn large")}
155 155 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
156 156 </div>
157 157 </div>
158 158 </div>
159 159 ${h.end_form()}
160 160
161 161 ## permissions overview
162 162 <div id="perms" class="table">
163 163 %for section in sorted(c.perm_user.permissions.keys()):
164 164 <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div>
165
165 %if not c.perm_user.permissions[section]:
166 <span style="color:#B9B9B9">${_('Nothing here yet')}</span>
167 %else:
166 168 <div id='tbl_list_wrap_${section}' class="yui-skin-sam">
167 169 <table id="tbl_list_${section}">
168 170 <thead>
169 171 <tr>
170 172 <th class="left">${_('Name')}</th>
171 173 <th class="left">${_('Permission')}</th>
172 174 <th class="left">${_('Edit Permission')}</th>
173 175 </thead>
174 176 <tbody>
175 177 %for k in c.perm_user.permissions[section]:
176 178 <%
177 179 if section != 'global':
178 180 section_perm = c.perm_user.permissions[section].get(k)
179 181 _perm = section_perm.split('.')[-1]
180 182 else:
181 183 _perm = section_perm = None
182 184 %>
183 185 <tr>
184 186 <td>
185 187 %if section == 'repositories':
186 188 <a href="${h.url('summary_home',repo_name=k)}">${k}</a>
187 189 %elif section == 'repositories_groups':
188 190 <a href="${h.url('repos_group_home',group_name=k)}">${k}</a>
189 191 %else:
190 192 ${h.get_permission_name(k)}
191 193 %endif
192 194 </td>
193 195 <td>
194 196 %if section == 'global':
195 197 ${h.bool2icon(k.split('.')[-1] != 'none')}
196 198 %else:
197 199 <span class="perm_tag ${_perm}">${section_perm}</span>
198 200 %endif
199 201 </td>
200 202 <td>
201 203 %if section == 'repositories':
202 204 <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a>
203 205 %elif section == 'repositories_groups':
204 206 <a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a>
205 207 %else:
206 208 --
207 209 %endif
208 210 </td>
209 211 </tr>
210 212 %endfor
211 213 </tbody>
212 214 </table>
213 215 </div>
216 %endif
214 217 %endfor
215 218 </div>
216 219 </div>
217 220 <div class="box box-left">
218 221 <!-- box / title -->
219 222 <div class="title">
220 223 <h5>${_('Email addresses')}</h5>
221 224 </div>
222 225
223 226 <div class="emails_wrap">
224 227 <table class="noborder">
225 228 %for em in c.user_email_map:
226 229 <tr>
227 230 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(em.user.email,16)}"/> </div></td>
228 231 <td><div class="email">${em.email}</div></td>
229 232 <td>
230 233 ${h.form(url('user_emails_delete', id=c.user.user_id),method='delete')}
231 234 ${h.hidden('del_email',em.email_id)}
232 235 ${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id,
233 236 class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this email: %s') % em.email+"');")}
234 237 ${h.end_form()}
235 238 </td>
236 239 </tr>
237 240 %endfor
238 241 </table>
239 242 </div>
240 243
241 244 ${h.form(url('user_emails', id=c.user.user_id),method='put')}
242 245 <div class="form">
243 246 <!-- fields -->
244 247 <div class="fields">
245 248 <div class="field">
246 249 <div class="label">
247 250 <label for="email">${_('New email address')}:</label>
248 251 </div>
249 252 <div class="input">
250 253 ${h.text('new_email', class_='medium')}
251 254 </div>
252 255 </div>
253 256 <div class="buttons">
254 257 ${h.submit('save',_('Add'),class_="ui-btn large")}
255 258 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
256 259 </div>
257 260 </div>
258 261 </div>
259 262 ${h.end_form()}
260 263 </div>
261 264 </%def>
General Comments 0
You need to be logged in to leave comments. Login now