##// END OF EJS Templates
fixed template after merge
marcink -
r1513:12946daf default
parent child Browse files
Show More
@@ -1,421 +1,211
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 4 <%def name="title()">
5 5 ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name}
6 6 </%def>
7 7
8 8 <%def name="breadcrumbs_links()">
9 9 ${_('My Account')}
10 10 </%def>
11 11
12 12 <%def name="page_nav()">
13 13 ${self.menu('admin')}
14 14 </%def>
15 15
16 16 <%def name="main()">
17 17
18 18 <div class="box box-left">
19 19 <!-- box / title -->
20 20 <div class="title">
21 21 ${self.breadcrumbs()}
22 22 </div>
23 23 <!-- end box / title -->
24 <div class="ui-tabs-panel ui-widget-content ui-corner-bottom">
25 ${h.form(url('admin_settings_my_accou## -*- coding: utf-8 -*-
26 <%inherit file="/base/base.html"/>
27
28 <%def name="title()">
29 ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name}
30 </%def>
31
32 <%def name="breadcrumbs_links()">
33 ${_('My Account')}
34 </%def>
35
36 <%def name="page_nav()">
37 ${self.menu('admin')}
38 </%def>
39
40 <%def name="main()">
41
42 <div class="box box-left">
43 <!-- box / title -->
44 <div class="title">
45 ${self.breadcrumbs()}
46 </div>
47 <!-- end box / title -->
48 24 <div>
49 25 ${h.form(url('admin_settings_my_account_update'),method='put')}
50 26 <div class="form">
51 27
52 28 <div class="field">
53 29 <div class="gravatar_box">
54 30 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
55 31 <p>
56 32 <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong><br/>
57 33 ${_('Using')} ${c.user.email}
58 34 </p>
59 35 </div>
60 36 </div>
61 37 <div class="field">
62 38 <div class="label">
63 39 <label>${_('API key')}</label> ${c.user.api_key}
64 40 </div>
65 41 </div>
66 42 <div class="fields">
67 43 <div class="field">
68 44 <div class="label">
69 45 <label for="username">${_('Username')}:</label>
70 46 </div>
71 47 <div class="input">
72 48 ${h.text('username',class_="medium")}
73 49 </div>
74 50 </div>
75 51
76 52 <div class="field">
77 53 <div class="label">
78 54 <label for="new_password">${_('New password')}:</label>
79 55 </div>
80 56 <div class="input">
81 57 ${h.password('new_password',class_="medium",autocomplete="off")}
82 58 </div>
83 59 </div>
84 60
85 61 <div class="field">
86 62 <div class="label">
87 63 <label for="name">${_('First Name')}:</label>
88 64 </div>
89 65 <div class="input">
90 66 ${h.text('name',class_="medium")}
91 67 </div>
92 68 </div>
93 69
94 70 <div class="field">
95 71 <div class="label">
96 72 <label for="lastname">${_('Last Name')}:</label>
97 73 </div>
98 74 <div class="input">
99 75 ${h.text('lastname',class_="medium")}
100 76 </div>
101 77 </div>
102 78
103 79 <div class="field">
104 80 <div class="label">
105 81 <label for="email">${_('Email')}:</label>
106 82 </div>
107 83 <div class="input">
108 84 ${h.text('email',class_="medium")}
109 85 </div>
110 86 </div>
111 87
112 88 <div class="buttons">
113 89 ${h.submit('save',_('Save'),class_="ui-button")}
114 90 ${h.reset('reset',_('Reset'),class_="ui-button")}
115 91 </div>
116 92 </div>
117 93 </div>
118 94 ${h.end_form()}
119 95 </div>
120 96 </div>
121 97
122 98 <div class="box box-right">
123 99 <!-- box / title -->
124 100 <div class="title">
125 101 <h5>${_('My repositories')}
126 102 <input class="top-right-rounded-corner top-left-rounded-corner bottom-left-rounded-corner bottom-right-rounded-corner" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
127 103 </h5>
128 104 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
129 105 <ul class="links">
130 106 <li>
131 107 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
132 108 </li>
133 109 </ul>
134 110 %endif
135 111 </div>
136 112 <!-- end box / title -->
137 113 <div class="table">
138 114 <table>
139 115 <thead>
140 116 <tr>
141 117 <th class="left">${_('Name')}</th>
142 118 <th class="left">${_('revision')}</th>
143 119 <th colspan="2" class="left">${_('action')}</th>
144 120 </thead>
145 121 <tbody>
146 122 %if c.user_repos:
147 123 %for repo in c.user_repos:
148 124 <tr>
149 125 <td>
150 126 %if repo['dbrepo']['repo_type'] =='hg':
151 127 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/>
152 128 %elif repo['dbrepo']['repo_type'] =='git':
153 129 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/>
154 130 %else:
155 131
156 132 %endif
157 133 %if repo['dbrepo']['private']:
158 134 <img class="icon" alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/>
159 135 %else:
160 136 <img class="icon" alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/>
161 137 %endif
162 138
163 139 ${h.link_to(repo['name'], h.url('summary_home',repo_name=repo['name']),class_="repo_name")}
164 140 %if repo['dbrepo_fork']:
165 141 <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}">
166 142 <img class="icon" alt="${_('public')}"
167 143 title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}"
168 144 src="${h.url('/images/icons/arrow_divide.png')}"/></a>
169 145 %endif
170 146 </td>
171 147 <td><span class="tooltip" title="${repo['last_change']}">${("r%s:%s") % (repo['rev'],h.short_id(repo['tip']))}</span></td>
172 148 <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td>
173 149 <td>
174 150 ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')}
175 151 ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")}
176 152 ${h.end_form()}
177 153 </td>
178 154 </tr>
179 155 %endfor
180 156 %else:
181 157 ${_('No repositories yet')}
182 158 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
183 159 ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))}
184 160 %endif
185 161 %endif
186 162 </tbody>
187 163 </table>
188 164 </div>
189 165
190 166 </div>
191 167 <script type="text/javascript">
192 168 var D = YAHOO.util.Dom;
193 169 var E = YAHOO.util.Event;
194 170 var S = YAHOO.util.Selector;
195 171
196 172 var q_filter = D.get('q_filter');
197 173 var F = YAHOO.namespace('q_filter');
198 174
199 175 E.on(q_filter,'click',function(){
200 176 q_filter.value = '';
201 177 });
202 178
203 179 F.filterTimeout = null;
204 180
205 181 F.updateFilter = function() {
206 182 // Reset timeout
207 183 F.filterTimeout = null;
208 184
209 185 var obsolete = [];
210 186 var nodes = S.query('div.table tr td a.repo_name');
211 187 var req = q_filter.value.toLowerCase();
212 188 for (n in nodes){
213 189 D.setStyle(nodes[n].parentNode.parentNode,'display','')
214 190 }
215 191 if (req){
216 192 for (n in nodes){
217 193 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
218 194 obsolete.push(nodes[n]);
219 195 }
220 196 }
221 197 if(obsolete){
222 198 for (n in obsolete){
223 199 D.setStyle(obsolete[n].parentNode.parentNode,'display','none');
224 200 }
225 201 }
226 202 }
227 203 }
228 204
229 205 E.on(q_filter,'keyup',function(e){
230 206 clearTimeout(F.filterTimeout);
231 207 F.filterTimeout = setTimeout(F.updateFilter,600);
232 208 });
233 209
234 210 </script>
235 211 </%def>
236 nt_update'),method='put')}
237 <div class="form">
238
239 <div class="field">
240 <div class="gravatar_box">
241 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
242 <p>
243 <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/>
244 ${_('Using')} ${c.user.email}
245 </p>
246 </div>
247 </div>
248
249 <div class="fields">
250 <div class="field">
251 <div class="label">
252 <label for="username">${_('Username')}:</label>
253 </div>
254 <div class="input">
255 ${h.text('username',class_="medium")}
256 </div>
257 </div>
258
259 <div class="field">
260 <div class="label">
261 <label for="new_password">${_('New password')}:</label>
262 </div>
263 <div class="input">
264 ${h.password('new_password',class_="medium")}
265 </div>
266 </div>
267
268 <div class="field">
269 <div class="label">
270 <label for="name">${_('First Name')}:</label>
271 </div>
272 <div class="input">
273 ${h.text('name',class_="medium")}
274 </div>
275 </div>
276
277 <div class="field">
278 <div class="label">
279 <label for="lastname">${_('Last Name')}:</label>
280 </div>
281 <div class="input">
282 ${h.text('lastname',class_="medium")}
283 </div>
284 </div>
285
286 <div class="field">
287 <div class="label">
288 <label for="email">${_('Email')}:</label>
289 </div>
290 <div class="input">
291 ${h.text('email',class_="medium")}
292 </div>
293 </div>
294
295 <div class="buttons">
296 ${h.submit('save','Save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
297 ${h.reset('reset','Reset',class_="ui-button ui-widget ui-state-default ui-corner-all")}
298
299
300
301 </div>
302 </div>
303 </div>
304 ${h.end_form()}
305 </div>
306 </div>
307
308 <div class="box box-right">
309 <!-- box / title -->
310 <div class="title">
311 <h5>${_('My repositories')}
312 <input class="top-right-rounded-corner top-left-rounded-corner bottom-left-rounded-corner bottom-right-rounded-corner" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
313 </h5>
314 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
315 <ul class="links">
316 <li>
317 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
318 </li>
319 </ul>
320 %endif
321 </div>
322 <!-- end box / title -->
323 <div class="table">
324 <table>
325 <thead>
326 <tr>
327 <th class="left">${_('Name')}</th>
328 <th class="left">${_('revision')}</th>
329 <th colspan="2" class="left">${_('action')}</th>
330 </thead>
331 <tbody>
332 %if c.user_repos:
333 %for repo in c.user_repos:
334 <tr>
335 <td>
336 %if repo['repo'].dbrepo.repo_type =='hg':
337 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/>
338 %elif repo['repo'].dbrepo.repo_type =='git':
339 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/>
340 %else:
341
342 %endif
343 %if repo['repo'].dbrepo.private:
344 <img class="icon" alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/>
345 %else:
346 <img class="icon" alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/>
347 %endif
348
349 ${h.link_to(repo['repo'].name, h.url('summary_home',repo_name=repo['repo'].name),class_="repo_name")}
350 %if repo['repo'].dbrepo.fork:
351 <a href="${h.url('summary_home',repo_name=repo['repo'].dbrepo.fork.repo_name)}">
352 <img class="icon" alt="${_('public')}"
353 title="${_('Fork of')} ${repo['repo'].dbrepo.fork.repo_name}"
354 src="${h.url("/images/icons/arrow_divide.png")}"/></a>
355 %endif
356 </td>
357 <td><span class="tooltip" title="${repo['repo'].last_change}">${("r%s:%s") % (h.get_changeset_safe(repo['repo'],'tip').revision,h.short_id(h.get_changeset_safe(repo['repo'],'tip').raw_id))}</span></td>
358 <td><a href="${h.url('repo_settings_home',repo_name=repo['repo'].name)}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url("/images/icons/application_form_edit.png")}"/></a></td>
359 <td>
360 ${h.form(url('repo_settings_delete', repo_name=repo['repo'].name),method='delete')}
361 ${h.submit('remove_%s' % repo['repo'].name,'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")}
362 ${h.end_form()}
363 </td>
364 </tr>
365 %endfor
366 %else:
367 ${_('No repositories yet')}
368 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
369 ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))}
370 %endif
371 %endif
372 </tbody>
373 </table>
374 </div>
375
376 </div>
377 <script type="text/javascript">
378 var D = YAHOO.util.Dom;
379 var E = YAHOO.util.Event;
380 var S = YAHOO.util.Selector;
381
382 var q_filter = D.get('q_filter');
383 var F = YAHOO.namespace('q_filter');
384
385 E.on(q_filter,'click',function(){
386 q_filter.value = '';
387 });
388
389 F.filterTimeout = null;
390
391 F.updateFilter = function() {
392 // Reset timeout
393 F.filterTimeout = null;
394
395 var obsolete = [];
396 var nodes = S.query('div.table tr td a.repo_name');
397 var req = D.get('q_filter').value;
398 for (n in nodes){
399 D.setStyle(nodes[n].parentNode.parentNode,'display','')
400 }
401 if (req){
402 for (n in nodes){
403 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
404 obsolete.push(nodes[n]);
405 }
406 }
407 if(obsolete){
408 for (n in obsolete){
409 D.setStyle(obsolete[n].parentNode.parentNode,'display','none');
410 }
411 }
412 }
413 }
414
415 E.on(q_filter,'keyup',function(e){
416 clearTimeout(F.filterTimeout);
417 setTimeout(F.updateFilter,600);
418 });
419
420 </script>
421 </%def> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now