Show More
@@ -1,421 +1,211 | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name} |
|
5 | ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${_('My Account')} |
|
9 | ${_('My Account')} | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="page_nav()"> |
|
12 | <%def name="page_nav()"> | |
13 | ${self.menu('admin')} |
|
13 | ${self.menu('admin')} | |
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="main()"> |
|
16 | <%def name="main()"> | |
17 |
|
17 | |||
18 | <div class="box box-left"> |
|
18 | <div class="box box-left"> | |
19 | <!-- box / title --> |
|
19 | <!-- box / title --> | |
20 | <div class="title"> |
|
20 | <div class="title"> | |
21 | ${self.breadcrumbs()} |
|
21 | ${self.breadcrumbs()} | |
22 | </div> |
|
22 | </div> | |
23 | <!-- end box / title --> |
|
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 | <div> |
|
24 | <div> | |
49 | ${h.form(url('admin_settings_my_account_update'),method='put')} |
|
25 | ${h.form(url('admin_settings_my_account_update'),method='put')} | |
50 | <div class="form"> |
|
26 | <div class="form"> | |
51 |
|
27 | |||
52 | <div class="field"> |
|
28 | <div class="field"> | |
53 | <div class="gravatar_box"> |
|
29 | <div class="gravatar_box"> | |
54 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> |
|
30 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> | |
55 | <p> |
|
31 | <p> | |
56 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong><br/> |
|
32 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong><br/> | |
57 | ${_('Using')} ${c.user.email} |
|
33 | ${_('Using')} ${c.user.email} | |
58 | </p> |
|
34 | </p> | |
59 | </div> |
|
35 | </div> | |
60 | </div> |
|
36 | </div> | |
61 | <div class="field"> |
|
37 | <div class="field"> | |
62 | <div class="label"> |
|
38 | <div class="label"> | |
63 | <label>${_('API key')}</label> ${c.user.api_key} |
|
39 | <label>${_('API key')}</label> ${c.user.api_key} | |
64 | </div> |
|
40 | </div> | |
65 | </div> |
|
41 | </div> | |
66 | <div class="fields"> |
|
42 | <div class="fields"> | |
67 | <div class="field"> |
|
43 | <div class="field"> | |
68 | <div class="label"> |
|
44 | <div class="label"> | |
69 | <label for="username">${_('Username')}:</label> |
|
45 | <label for="username">${_('Username')}:</label> | |
70 | </div> |
|
46 | </div> | |
71 | <div class="input"> |
|
47 | <div class="input"> | |
72 | ${h.text('username',class_="medium")} |
|
48 | ${h.text('username',class_="medium")} | |
73 | </div> |
|
49 | </div> | |
74 | </div> |
|
50 | </div> | |
75 |
|
51 | |||
76 | <div class="field"> |
|
52 | <div class="field"> | |
77 | <div class="label"> |
|
53 | <div class="label"> | |
78 | <label for="new_password">${_('New password')}:</label> |
|
54 | <label for="new_password">${_('New password')}:</label> | |
79 | </div> |
|
55 | </div> | |
80 | <div class="input"> |
|
56 | <div class="input"> | |
81 | ${h.password('new_password',class_="medium",autocomplete="off")} |
|
57 | ${h.password('new_password',class_="medium",autocomplete="off")} | |
82 | </div> |
|
58 | </div> | |
83 | </div> |
|
59 | </div> | |
84 |
|
60 | |||
85 | <div class="field"> |
|
61 | <div class="field"> | |
86 | <div class="label"> |
|
62 | <div class="label"> | |
87 | <label for="name">${_('First Name')}:</label> |
|
63 | <label for="name">${_('First Name')}:</label> | |
88 | </div> |
|
64 | </div> | |
89 | <div class="input"> |
|
65 | <div class="input"> | |
90 | ${h.text('name',class_="medium")} |
|
66 | ${h.text('name',class_="medium")} | |
91 | </div> |
|
67 | </div> | |
92 | </div> |
|
68 | </div> | |
93 |
|
69 | |||
94 | <div class="field"> |
|
70 | <div class="field"> | |
95 | <div class="label"> |
|
71 | <div class="label"> | |
96 | <label for="lastname">${_('Last Name')}:</label> |
|
72 | <label for="lastname">${_('Last Name')}:</label> | |
97 | </div> |
|
73 | </div> | |
98 | <div class="input"> |
|
74 | <div class="input"> | |
99 | ${h.text('lastname',class_="medium")} |
|
75 | ${h.text('lastname',class_="medium")} | |
100 | </div> |
|
76 | </div> | |
101 | </div> |
|
77 | </div> | |
102 |
|
78 | |||
103 | <div class="field"> |
|
79 | <div class="field"> | |
104 | <div class="label"> |
|
80 | <div class="label"> | |
105 | <label for="email">${_('Email')}:</label> |
|
81 | <label for="email">${_('Email')}:</label> | |
106 | </div> |
|
82 | </div> | |
107 | <div class="input"> |
|
83 | <div class="input"> | |
108 | ${h.text('email',class_="medium")} |
|
84 | ${h.text('email',class_="medium")} | |
109 | </div> |
|
85 | </div> | |
110 | </div> |
|
86 | </div> | |
111 |
|
87 | |||
112 | <div class="buttons"> |
|
88 | <div class="buttons"> | |
113 | ${h.submit('save',_('Save'),class_="ui-button")} |
|
89 | ${h.submit('save',_('Save'),class_="ui-button")} | |
114 | ${h.reset('reset',_('Reset'),class_="ui-button")} |
|
90 | ${h.reset('reset',_('Reset'),class_="ui-button")} | |
115 | </div> |
|
91 | </div> | |
116 | </div> |
|
92 | </div> | |
117 | </div> |
|
93 | </div> | |
118 | ${h.end_form()} |
|
94 | ${h.end_form()} | |
119 | </div> |
|
95 | </div> | |
120 | </div> |
|
96 | </div> | |
121 |
|
97 | |||
122 | <div class="box box-right"> |
|
98 | <div class="box box-right"> | |
123 | <!-- box / title --> |
|
99 | <!-- box / title --> | |
124 | <div class="title"> |
|
100 | <div class="title"> | |
125 | <h5>${_('My repositories')} |
|
101 | <h5>${_('My repositories')} | |
126 | <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...')}"/> |
|
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 | </h5> |
|
103 | </h5> | |
128 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
104 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
129 | <ul class="links"> |
|
105 | <ul class="links"> | |
130 | <li> |
|
106 | <li> | |
131 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
107 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> | |
132 | </li> |
|
108 | </li> | |
133 | </ul> |
|
109 | </ul> | |
134 | %endif |
|
110 | %endif | |
135 | </div> |
|
111 | </div> | |
136 | <!-- end box / title --> |
|
112 | <!-- end box / title --> | |
137 | <div class="table"> |
|
113 | <div class="table"> | |
138 | <table> |
|
114 | <table> | |
139 | <thead> |
|
115 | <thead> | |
140 | <tr> |
|
116 | <tr> | |
141 | <th class="left">${_('Name')}</th> |
|
117 | <th class="left">${_('Name')}</th> | |
142 | <th class="left">${_('revision')}</th> |
|
118 | <th class="left">${_('revision')}</th> | |
143 | <th colspan="2" class="left">${_('action')}</th> |
|
119 | <th colspan="2" class="left">${_('action')}</th> | |
144 | </thead> |
|
120 | </thead> | |
145 | <tbody> |
|
121 | <tbody> | |
146 | %if c.user_repos: |
|
122 | %if c.user_repos: | |
147 | %for repo in c.user_repos: |
|
123 | %for repo in c.user_repos: | |
148 | <tr> |
|
124 | <tr> | |
149 | <td> |
|
125 | <td> | |
150 | %if repo['dbrepo']['repo_type'] =='hg': |
|
126 | %if repo['dbrepo']['repo_type'] =='hg': | |
151 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/> |
|
127 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/> | |
152 | %elif repo['dbrepo']['repo_type'] =='git': |
|
128 | %elif repo['dbrepo']['repo_type'] =='git': | |
153 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/> |
|
129 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/> | |
154 | %else: |
|
130 | %else: | |
155 |
|
131 | |||
156 | %endif |
|
132 | %endif | |
157 | %if repo['dbrepo']['private']: |
|
133 | %if repo['dbrepo']['private']: | |
158 | <img class="icon" alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/> |
|
134 | <img class="icon" alt="${_('private')}" src="${h.url("/images/icons/lock.png")}"/> | |
159 | %else: |
|
135 | %else: | |
160 | <img class="icon" alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/> |
|
136 | <img class="icon" alt="${_('public')}" src="${h.url("/images/icons/lock_open.png")}"/> | |
161 | %endif |
|
137 | %endif | |
162 |
|
138 | |||
163 | ${h.link_to(repo['name'], h.url('summary_home',repo_name=repo['name']),class_="repo_name")} |
|
139 | ${h.link_to(repo['name'], h.url('summary_home',repo_name=repo['name']),class_="repo_name")} | |
164 | %if repo['dbrepo_fork']: |
|
140 | %if repo['dbrepo_fork']: | |
165 | <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> |
|
141 | <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> | |
166 | <img class="icon" alt="${_('public')}" |
|
142 | <img class="icon" alt="${_('public')}" | |
167 | title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" |
|
143 | title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" | |
168 | src="${h.url('/images/icons/arrow_divide.png')}"/></a> |
|
144 | src="${h.url('/images/icons/arrow_divide.png')}"/></a> | |
169 | %endif |
|
145 | %endif | |
170 | </td> |
|
146 | </td> | |
171 | <td><span class="tooltip" title="${repo['last_change']}">${("r%s:%s") % (repo['rev'],h.short_id(repo['tip']))}</span></td> |
|
147 | <td><span class="tooltip" title="${repo['last_change']}">${("r%s:%s") % (repo['rev'],h.short_id(repo['tip']))}</span></td> | |
172 | <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> |
|
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 | <td> |
|
149 | <td> | |
174 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} |
|
150 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} | |
175 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} |
|
151 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} | |
176 | ${h.end_form()} |
|
152 | ${h.end_form()} | |
177 | </td> |
|
153 | </td> | |
178 | </tr> |
|
154 | </tr> | |
179 | %endfor |
|
155 | %endfor | |
180 | %else: |
|
156 | %else: | |
181 | ${_('No repositories yet')} |
|
157 | ${_('No repositories yet')} | |
182 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
158 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |
183 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))} |
|
159 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))} | |
184 | %endif |
|
160 | %endif | |
185 | %endif |
|
161 | %endif | |
186 | </tbody> |
|
162 | </tbody> | |
187 | </table> |
|
163 | </table> | |
188 | </div> |
|
164 | </div> | |
189 |
|
165 | |||
190 | </div> |
|
166 | </div> | |
191 | <script type="text/javascript"> |
|
167 | <script type="text/javascript"> | |
192 | var D = YAHOO.util.Dom; |
|
168 | var D = YAHOO.util.Dom; | |
193 | var E = YAHOO.util.Event; |
|
169 | var E = YAHOO.util.Event; | |
194 | var S = YAHOO.util.Selector; |
|
170 | var S = YAHOO.util.Selector; | |
195 |
|
171 | |||
196 | var q_filter = D.get('q_filter'); |
|
172 | var q_filter = D.get('q_filter'); | |
197 | var F = YAHOO.namespace('q_filter'); |
|
173 | var F = YAHOO.namespace('q_filter'); | |
198 |
|
174 | |||
199 | E.on(q_filter,'click',function(){ |
|
175 | E.on(q_filter,'click',function(){ | |
200 | q_filter.value = ''; |
|
176 | q_filter.value = ''; | |
201 | }); |
|
177 | }); | |
202 |
|
178 | |||
203 | F.filterTimeout = null; |
|
179 | F.filterTimeout = null; | |
204 |
|
180 | |||
205 | F.updateFilter = function() { |
|
181 | F.updateFilter = function() { | |
206 | // Reset timeout |
|
182 | // Reset timeout | |
207 | F.filterTimeout = null; |
|
183 | F.filterTimeout = null; | |
208 |
|
184 | |||
209 | var obsolete = []; |
|
185 | var obsolete = []; | |
210 | var nodes = S.query('div.table tr td a.repo_name'); |
|
186 | var nodes = S.query('div.table tr td a.repo_name'); | |
211 | var req = q_filter.value.toLowerCase(); |
|
187 | var req = q_filter.value.toLowerCase(); | |
212 | for (n in nodes){ |
|
188 | for (n in nodes){ | |
213 | D.setStyle(nodes[n].parentNode.parentNode,'display','') |
|
189 | D.setStyle(nodes[n].parentNode.parentNode,'display','') | |
214 | } |
|
190 | } | |
215 | if (req){ |
|
191 | if (req){ | |
216 | for (n in nodes){ |
|
192 | for (n in nodes){ | |
217 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { |
|
193 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { | |
218 | obsolete.push(nodes[n]); |
|
194 | obsolete.push(nodes[n]); | |
219 | } |
|
195 | } | |
220 | } |
|
196 | } | |
221 | if(obsolete){ |
|
197 | if(obsolete){ | |
222 | for (n in obsolete){ |
|
198 | for (n in obsolete){ | |
223 | D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); |
|
199 | D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); | |
224 | } |
|
200 | } | |
225 | } |
|
201 | } | |
226 | } |
|
202 | } | |
227 | } |
|
203 | } | |
228 |
|
204 | |||
229 | E.on(q_filter,'keyup',function(e){ |
|
205 | E.on(q_filter,'keyup',function(e){ | |
230 | clearTimeout(F.filterTimeout); |
|
206 | clearTimeout(F.filterTimeout); | |
231 | F.filterTimeout = setTimeout(F.updateFilter,600); |
|
207 | F.filterTimeout = setTimeout(F.updateFilter,600); | |
232 | }); |
|
208 | }); | |
233 |
|
209 | |||
234 | </script> |
|
210 | </script> | |
235 | </%def> |
|
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