Show More
@@ -1,383 +1,399 | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="root.html"/> |
|
3 | 3 | |
|
4 | 4 | <!-- HEADER --> |
|
5 | 5 | <div id="header"> |
|
6 | 6 | <!-- user --> |
|
7 | 7 | <ul id="logged-user"> |
|
8 | 8 | <li class="first"> |
|
9 | 9 | |
|
10 | 10 | <div id="quick_login" style="display:none"> |
|
11 | 11 | ${h.form(h.url('login_home',came_from=h.url.current()))} |
|
12 | 12 | <div class="form"> |
|
13 | 13 | <div class="fields"> |
|
14 | 14 | <div class="field"> |
|
15 | 15 | <div class="label"> |
|
16 | 16 | <label for="username">${_('Username')}:</label> |
|
17 | 17 | </div> |
|
18 | 18 | <div class="input"> |
|
19 | 19 | ${h.text('username',class_='focus',size=40)} |
|
20 | 20 | </div> |
|
21 | 21 | |
|
22 | 22 | </div> |
|
23 | 23 | <div class="field"> |
|
24 | 24 | <div class="label"> |
|
25 | 25 | <label for="password">${_('Password')}:</label> |
|
26 | 26 | </div> |
|
27 | 27 | <div class="input"> |
|
28 | 28 | ${h.password('password',class_='focus',size=40)} |
|
29 | 29 | </div> |
|
30 | 30 | |
|
31 | 31 | </div> |
|
32 | 32 | <div class="buttons"> |
|
33 | 33 | ${h.submit('sign_in','Sign In',class_="ui-button")} |
|
34 | 34 | </div> |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | ${h.end_form()} |
|
38 | <script type="text/javascript"> | |
|
39 | YUE.on('quick_login_link','click',function(e){ | |
|
40 | ||
|
41 | if(YUD.hasClass('quick_login_link','enabled')){ | |
|
42 | YUD.setStyle('quick_login','display','none'); | |
|
43 | YUD.removeClass('quick_login_link','enabled'); | |
|
44 | } | |
|
45 | else{ | |
|
46 | YUD.setStyle('quick_login','display',''); | |
|
47 | YUD.addClass('quick_login_link','enabled'); | |
|
48 | } | |
|
49 | //make sure we don't redirect | |
|
50 | YUE.preventDefault(e); | |
|
51 | }); | |
|
52 | ||
|
53 | </script> | |
|
38 | 54 | </div> |
|
39 | 55 | |
|
40 | 56 | <div class="gravatar"> |
|
41 | 57 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" /> |
|
42 | 58 | </div> |
|
43 | 59 | <div class="account"> |
|
44 | 60 | %if c.rhodecode_user.username == 'default': |
|
45 | 61 | <a href="${h.url('public_journal')}">${_('Public journal')}</a> |
|
46 | 62 | %else: |
|
47 | 63 | ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} |
|
48 | 64 | %endif |
|
49 | 65 | </div> |
|
50 | 66 | </li> |
|
51 | 67 | <li> |
|
52 | 68 | <a href="${h.url('home')}">${_('Home')}</a> |
|
53 | 69 | </li> |
|
54 | 70 | %if c.rhodecode_user.username != 'default': |
|
55 | 71 | <li> |
|
56 | 72 | <a href="${h.url('journal')}">${_('Journal')}</a> |
|
57 | 73 | ##(${c.unread_journal} |
|
58 | 74 | </li> |
|
59 | 75 | %endif |
|
60 | 76 | %if c.rhodecode_user.username == 'default': |
|
61 | <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li> | |
|
77 | <li class="last highlight">${h.link_to(u'Login',h.url('login_home'),id='quick_login_link')}</li> | |
|
62 | 78 | %else: |
|
63 | 79 | <li class="last highlight">${h.link_to(u'Log Out',h.url('logout_home'))}</li> |
|
64 | 80 | %endif |
|
65 | 81 | </ul> |
|
66 | 82 | <!-- end user --> |
|
67 | 83 | <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner"> |
|
68 | 84 | <div id="logo"> |
|
69 | 85 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> |
|
70 | 86 | </div> |
|
71 | 87 | <!-- MENU --> |
|
72 | 88 | ${self.page_nav()} |
|
73 | 89 | <!-- END MENU --> |
|
74 | 90 | ${self.body()} |
|
75 | 91 | </div> |
|
76 | 92 | </div> |
|
77 | 93 | <!-- END HEADER --> |
|
78 | 94 | |
|
79 | 95 | <!-- CONTENT --> |
|
80 | 96 | <div id="content"> |
|
81 | 97 | <div class="flash_msg"> |
|
82 | 98 | <% messages = h.flash.pop_messages() %> |
|
83 | 99 | % if messages: |
|
84 | 100 | <ul id="flash-messages"> |
|
85 | 101 | % for message in messages: |
|
86 | 102 | <li class="${message.category}_msg">${message}</li> |
|
87 | 103 | % endfor |
|
88 | 104 | </ul> |
|
89 | 105 | % endif |
|
90 | 106 | </div> |
|
91 | 107 | <div id="main"> |
|
92 | 108 | ${next.main()} |
|
93 | 109 | </div> |
|
94 | 110 | </div> |
|
95 | 111 | <!-- END CONTENT --> |
|
96 | 112 | |
|
97 | 113 | <!-- FOOTER --> |
|
98 | 114 | <div id="footer"> |
|
99 | 115 | <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner"> |
|
100 | 116 | <div> |
|
101 | 117 | <p class="footer-link"> |
|
102 | 118 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
|
103 | 119 | </p> |
|
104 | 120 | <p class="footer-link-right"> |
|
105 | 121 | <a href="${h.url('rhodecode_official')}">RhodeCode</a> |
|
106 | 122 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski |
|
107 | 123 | </p> |
|
108 | 124 | </div> |
|
109 | 125 | </div> |
|
110 | 126 | <script type="text/javascript"> |
|
111 | 127 | function tooltip_activate(){ |
|
112 | 128 | ${h.tooltip.activate()} |
|
113 | 129 | } |
|
114 | 130 | tooltip_activate(); |
|
115 | 131 | </script> |
|
116 | 132 | </div> |
|
117 | 133 | <!-- END FOOTER --> |
|
118 | 134 | |
|
119 | 135 | ### MAKO DEFS ### |
|
120 | 136 | <%def name="page_nav()"> |
|
121 | 137 | ${self.menu()} |
|
122 | 138 | </%def> |
|
123 | 139 | |
|
124 | 140 | <%def name="breadcrumbs()"> |
|
125 | 141 | <div class="breadcrumbs"> |
|
126 | 142 | ${self.breadcrumbs_links()} |
|
127 | 143 | </div> |
|
128 | 144 | </%def> |
|
129 | 145 | |
|
130 | 146 | |
|
131 | 147 | <%def name="menu(current=None)"> |
|
132 | 148 | <% |
|
133 | 149 | def is_current(selected): |
|
134 | 150 | if selected == current: |
|
135 | 151 | return h.literal('class="current"') |
|
136 | 152 | %> |
|
137 | 153 | %if current not in ['home','admin']: |
|
138 | 154 | ##REGULAR MENU |
|
139 | 155 | <ul id="quick"> |
|
140 | 156 | <!-- repo switcher --> |
|
141 | 157 | <li> |
|
142 | 158 | <a id="repo_switcher" title="${_('Switch repository')}" href="#"> |
|
143 | 159 | <span class="icon"> |
|
144 | 160 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> |
|
145 | 161 | </span> |
|
146 | 162 | <span>↓</span> |
|
147 | 163 | </a> |
|
148 | 164 | <ul id="repo_switcher_list" class="repo_switcher"> |
|
149 | 165 | <li> |
|
150 | 166 | <a href="#">${_('loading...')}</a> |
|
151 | 167 | </li> |
|
152 | 168 | </ul> |
|
153 | 169 | <script type="text/javascript"> |
|
154 | 170 | YUE.on('repo_switcher','mouseover',function(){ |
|
155 | 171 | function qfilter(){ |
|
156 | 172 | var S = YAHOO.util.Selector; |
|
157 | 173 | |
|
158 | 174 | var q_filter = YUD.get('q_filter_rs'); |
|
159 | 175 | var F = YAHOO.namespace('q_filter_rs'); |
|
160 | 176 | |
|
161 | 177 | YUE.on(q_filter,'click',function(){ |
|
162 | 178 | q_filter.value = ''; |
|
163 | 179 | }); |
|
164 | 180 | |
|
165 | 181 | F.filterTimeout = null; |
|
166 | 182 | |
|
167 | 183 | F.updateFilter = function() { |
|
168 | 184 | // Reset timeout |
|
169 | 185 | F.filterTimeout = null; |
|
170 | 186 | |
|
171 | 187 | var obsolete = []; |
|
172 | 188 | var nodes = S.query('ul#repo_switcher_list li a.repo_name'); |
|
173 | 189 | var req = YUD.get('q_filter_rs').value; |
|
174 | 190 | for (n in nodes){ |
|
175 | 191 | YUD.setStyle(nodes[n].parentNode,'display','') |
|
176 | 192 | } |
|
177 | 193 | if (req){ |
|
178 | 194 | for (n in nodes){ |
|
179 | 195 | console.log(n); |
|
180 | 196 | if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { |
|
181 | 197 | obsolete.push(nodes[n]); |
|
182 | 198 | } |
|
183 | 199 | } |
|
184 | 200 | if(obsolete){ |
|
185 | 201 | for (n in obsolete){ |
|
186 | 202 | YUD.setStyle(obsolete[n].parentNode,'display','none'); |
|
187 | 203 | } |
|
188 | 204 | } |
|
189 | 205 | } |
|
190 | 206 | } |
|
191 | 207 | |
|
192 | 208 | YUE.on(q_filter,'keyup',function(e){ |
|
193 | 209 | clearTimeout(F.filterTimeout); |
|
194 | 210 | setTimeout(F.updateFilter,600); |
|
195 | 211 | }); |
|
196 | 212 | } |
|
197 | 213 | var loaded = YUD.hasClass('repo_switcher','loaded'); |
|
198 | 214 | if(!loaded){ |
|
199 | 215 | YUD.addClass('repo_switcher','loaded'); |
|
200 | 216 | YAHOO.util.Connect.asyncRequest('GET',"${h.url('repo_switcher')}",{ |
|
201 | 217 | success:function(o){ |
|
202 | 218 | YUD.get('repo_switcher_list').innerHTML = o.responseText; |
|
203 | 219 | qfilter(); |
|
204 | 220 | }, |
|
205 | 221 | failure:function(o){ |
|
206 | 222 | YUD.removeClass('repo_switcher','loaded'); |
|
207 | 223 | } |
|
208 | 224 | },null); |
|
209 | 225 | } |
|
210 | 226 | return false; |
|
211 | 227 | }); |
|
212 | 228 | </script> |
|
213 | 229 | </li> |
|
214 | 230 | |
|
215 | 231 | <li ${is_current('summary')}> |
|
216 | 232 | <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> |
|
217 | 233 | <span class="icon"> |
|
218 |
<img src="${h.url( |
|
|
234 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> | |
|
219 | 235 | </span> |
|
220 | 236 | <span>${_('Summary')}</span> |
|
221 | 237 | </a> |
|
222 | 238 | </li> |
|
223 | 239 | ##<li ${is_current('shortlog')}> |
|
224 | 240 | ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}"> |
|
225 | 241 | ## <span class="icon"> |
|
226 | 242 | ## <img src="${h.url("/images/icons/application_view_list.png")}" alt="${_('Shortlog')}" /> |
|
227 | 243 | ## </span> |
|
228 | 244 | ## <span>${_('Shortlog')}</span> |
|
229 | 245 | ## </a> |
|
230 | 246 | ##</li> |
|
231 | 247 | <li ${is_current('changelog')}> |
|
232 | 248 | <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> |
|
233 | 249 | <span class="icon"> |
|
234 |
<img src="${h.url( |
|
|
250 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> | |
|
235 | 251 | </span> |
|
236 | 252 | <span>${_('Changelog')}</span> |
|
237 | 253 | </a> |
|
238 | 254 | </li> |
|
239 | 255 | |
|
240 | 256 | <li ${is_current('switch_to')}> |
|
241 | 257 | <a title="${_('Switch to')}" href="#"> |
|
242 | 258 | <span class="icon"> |
|
243 |
<img src="${h.url( |
|
|
259 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> | |
|
244 | 260 | </span> |
|
245 | 261 | <span>${_('Switch to')}</span> |
|
246 | 262 | </a> |
|
247 | 263 | <ul> |
|
248 | 264 | <li> |
|
249 | 265 | ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')} |
|
250 | 266 | <ul> |
|
251 | 267 | %if c.rhodecode_repo.branches.values(): |
|
252 | 268 | %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()): |
|
253 | 269 | <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li> |
|
254 | 270 | %endfor |
|
255 | 271 | %else: |
|
256 | 272 | <li>${h.link_to(_('There are no branches yet'),'#')}</li> |
|
257 | 273 | %endif |
|
258 | 274 | </ul> |
|
259 | 275 | </li> |
|
260 | 276 | <li> |
|
261 | 277 | ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')} |
|
262 | 278 | <ul> |
|
263 | 279 | %if c.rhodecode_repo.tags.values(): |
|
264 | 280 | %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()): |
|
265 | 281 | <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li> |
|
266 | 282 | %endfor |
|
267 | 283 | %else: |
|
268 | 284 | <li>${h.link_to(_('There are no tags yet'),'#')}</li> |
|
269 | 285 | %endif |
|
270 | 286 | </ul> |
|
271 | 287 | </li> |
|
272 | 288 | </ul> |
|
273 | 289 | </li> |
|
274 | 290 | <li ${is_current('files')}> |
|
275 | 291 | <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> |
|
276 | 292 | <span class="icon"> |
|
277 |
<img src="${h.url( |
|
|
293 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> | |
|
278 | 294 | </span> |
|
279 | 295 | <span>${_('Files')}</span> |
|
280 | 296 | </a> |
|
281 | 297 | </li> |
|
282 | 298 | |
|
283 | 299 | <li ${is_current('options')}> |
|
284 | 300 | <a title="${_('Options')}" href="#"> |
|
285 | 301 | <span class="icon"> |
|
286 |
<img src="${h.url( |
|
|
302 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> | |
|
287 | 303 | </span> |
|
288 | 304 | <span>${_('Options')}</span> |
|
289 | 305 | </a> |
|
290 | 306 | <ul> |
|
291 | 307 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
292 | 308 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
293 | 309 | <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> |
|
294 | 310 | %else: |
|
295 | 311 | <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> |
|
296 | 312 | %endif |
|
297 | 313 | %endif |
|
298 | 314 | <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> |
|
299 | 315 | <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> |
|
300 | 316 | |
|
301 | 317 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
302 | 318 | <li> |
|
303 | 319 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} |
|
304 | 320 | <%def name="admin_menu()"> |
|
305 | 321 | <ul> |
|
306 | 322 | <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> |
|
307 | 323 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> |
|
308 | 324 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> |
|
309 | 325 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> |
|
310 | 326 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
|
311 | 327 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> |
|
312 | 328 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> |
|
313 | 329 | </ul> |
|
314 | 330 | </%def> |
|
315 | 331 | |
|
316 | 332 | ${admin_menu()} |
|
317 | 333 | </li> |
|
318 | 334 | % endif |
|
319 | 335 | </ul> |
|
320 | 336 | </li> |
|
321 | 337 | |
|
322 | 338 | <li> |
|
323 | 339 | <a title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
|
324 | 340 | <span class="icon_short"> |
|
325 |
<img src="${h.url( |
|
|
341 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> | |
|
326 | 342 | </span> |
|
327 | 343 | <span id="current_followers_count" class="short">${c.repository_followers}</span> |
|
328 | 344 | </a> |
|
329 | 345 | </li> |
|
330 | 346 | <li> |
|
331 | 347 | <a title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
|
332 | 348 | <span class="icon_short"> |
|
333 |
<img src="${h.url( |
|
|
349 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> | |
|
334 | 350 | </span> |
|
335 | 351 | <span class="short">${c.repository_forks}</span> |
|
336 | 352 | </a> |
|
337 | 353 | </li> |
|
338 | 354 | |
|
339 | 355 | </ul> |
|
340 | 356 | %else: |
|
341 | 357 | ##ROOT MENU |
|
342 | 358 | <ul id="quick"> |
|
343 | 359 | <li> |
|
344 | 360 | <a title="${_('Home')}" href="${h.url('home')}"> |
|
345 | 361 | <span class="icon"> |
|
346 |
<img src="${h.url( |
|
|
362 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> | |
|
347 | 363 | </span> |
|
348 | 364 | <span>${_('Home')}</span> |
|
349 | 365 | </a> |
|
350 | 366 | </li> |
|
351 | 367 | % if c.rhodecode_user.username != 'default': |
|
352 | 368 | <li> |
|
353 | 369 | <a title="${_('Journal')}" href="${h.url('journal')}"> |
|
354 | 370 | <span class="icon"> |
|
355 |
<img src="${h.url( |
|
|
371 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> | |
|
356 | 372 | </span> |
|
357 | 373 | <span>${_('Journal')}</span> |
|
358 | 374 | </a> |
|
359 | 375 | </li> |
|
360 | 376 | % endif |
|
361 | 377 | <li> |
|
362 | 378 | <a title="${_('Search')}" href="${h.url('search')}"> |
|
363 | 379 | <span class="icon"> |
|
364 |
<img src="${h.url( |
|
|
380 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> | |
|
365 | 381 | </span> |
|
366 | 382 | <span>${_('Search')}</span> |
|
367 | 383 | </a> |
|
368 | 384 | </li> |
|
369 | 385 | |
|
370 | 386 | %if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
371 | 387 | <li ${is_current('admin')}> |
|
372 | 388 | <a title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
373 | 389 | <span class="icon"> |
|
374 |
<img src="${h.url( |
|
|
390 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> | |
|
375 | 391 | </span> |
|
376 | 392 | <span>${_('Admin')}</span> |
|
377 | 393 | </a> |
|
378 | 394 | ${admin_menu()} |
|
379 | 395 | </li> |
|
380 | 396 | %endif |
|
381 | 397 | </ul> |
|
382 | 398 | %endif |
|
383 | 399 | </%def> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now