##// END OF EJS Templates
reimplemented tags/branches menu....
marcink -
r453:2a95d54b default
parent child Browse files
Show More
@@ -20,6 +20,11 b' class BaseController(WSGIController):'
20 c.repo_name = get_repo_slug(request)
20 c.repo_name = get_repo_slug(request)
21 c.cached_repo_list = _get_repos_cached()
21 c.cached_repo_list = _get_repos_cached()
22 c.repo_switcher_list = _get_repos_switcher_cached(c.cached_repo_list)
22 c.repo_switcher_list = _get_repos_switcher_cached(c.cached_repo_list)
23
24 if c.repo_name:
25 c.repository_tags = c.cached_repo_list[c.repo_name].tags
26 c.repository_branches = c.cached_repo_list[c.repo_name].branches
27
23 self.sa = meta.Session
28 self.sa = meta.Session
24
29
25 def __call__(self, environ, start_response):
30 def __call__(self, environ, start_response):
@@ -323,181 +323,231 b' div.options a:hover'
323 /* -----------------------------------------------------------
323 /* -----------------------------------------------------------
324 header -> quick
324 header -> quick
325 ----------------------------------------------------------- */
325 ----------------------------------------------------------- */
326
326 #header #header-inner #quick,
327 #header #header-inner #quick,
327 #header #header-inner #quick ul
328 #header #header-inner #quick ul
328 {
329 {
329 margin: 10px 5px 0 0;
330 margin: 10px 5px 0 0;
330 padding: 0;
331 padding: 0;
331 position: relative;
332 position: relative;
332 float: right;
333 float: right;
333 list-style-type: none;
334 list-style-type: none;
334 list-style-position: outside;
335 list-style-position: outside;
336 }
335 }
337
336
338 #header #header-inner #quick li
337 #header #header-inner #quick li
339 {
338 {
340 margin: 0 4px 0 0;
339 margin: 0 5px 0 0;
341 padding: 0;
340 padding: 0;
342 position: relative;
341 position: relative;
343 float: left;
342 float: left;
344 }
343 }
345
344
346 #header #header-inner #quick li a
345 #header #header-inner #quick li a
347 {
346 {
348 top: 0;
347 top: 0;
349 left: 0;
348 left: 0;
350 padding: 0;
349 padding: 0;
351 height: 1%;
350 height: 1%;
352 display: block;
351 display: block;
353 clear: both;
352 clear: both;
354 overflow: hidden;
353 overflow: hidden;
355 background: #336699 url("../images/colors/blue/quick_l.png") no-repeat top left;
354 background: #336699 url("../../resources/images/colors/blue/quick_l.png") no-repeat top left;
356 color: #FFFFFF;
355 color: #FFFFFF;
357 font-weight: bold;
356 font-weight: bold;
358 text-decoration: none;
357 text-decoration: none;
359 }
358 }
360
359
361 #header #header-inner #quick li span
360 #header #header-inner #quick li span
362 {
361 {
363 top: 0;
362 top: 0;
364 right: 0;
363 right: 0;
365 margin: 0;
364 margin: 0;
366 padding: 10px 12px 8px 10px;
365 padding: 10px 12px 8px 10px;
367 height: 1%;
366 height: 1%;
368 display: block;
367 display: block;
369 float: left;
368 float: left;
370 background: url("../images/colors/blue/quick_r.png") no-repeat top right;
369 background: url("../../resources/images/colors/blue/quick_r.png") no-repeat top right;
371 border-left: 1px solid #3f6f9f;
370 border-left: 1px solid #3f6f9f;
371 }
372
373 #header #header-inner #quick li span.normal
374 {
375 padding: 10px 12px 8px 12px;
376 border: none;
372 }
377 }
373
378
374 #header #header-inner #quick li span.icon
379 #header #header-inner #quick li span.icon
375 {
380 {
376 top: 0;
381 top: 0;
377 left: 0;
382 left: 0;
378 padding: 8px 8px 4px 8px;
383 padding: 8px 8px 4px 8px;
379 background: url("../images/colors/blue/quick_l.png") no-repeat top left;
384 background: url("../../resources/images/colors/blue/quick_l.png") no-repeat top left;
380 border-left: none;
385 border-left: none;
381 border-right: 1px solid #2e5c89;
386 border-right: 1px solid #2e5c89;
382 }
387 }
383
388
384 #header #header-inner #quick li a:hover
389 #header #header-inner #quick li a:hover
385 {
390 {
386 background: #4e4e4e;
391 background: #4e4e4e url("../../resources/images/colors/blue/quick_l_selected.png") no-repeat top left;
387 }
392 }
388
393
389 #header #header-inner #quick li a:hover span
394 #header #header-inner #quick li a:hover span
390 {
395 {
391 background: url("../images/colors/blue/quick_r_selected.png") no-repeat top right;
396 background: url("../../resources/images/colors/blue/quick_r_selected.png") no-repeat top right;
392 border-left: 1px solid #545454;
397 border-left: 1px solid #545454;
398 }
399
400 #header #header-inner #quick li a:hover span.normal
401 {
402 border: none;
393 }
403 }
394
404
395 #header #header-inner #quick li a:hover span.icon
405 #header #header-inner #quick li a:hover span.icon
396 {
406 {
397 background: url("../images/colors/blue/quick_l_selected.png") no-repeat top left;
407 background: url("../../resources/images/colors/blue/quick_l_selected.png") no-repeat top left;
398 border-left: none;
408 border-left: none;
399 border-right: 1px solid #464646;
409 border-right: 1px solid #464646;
400 }
410 }
401
411
402 #header #header-inner #quick ul
412 #header #header-inner #quick ul
403 {
413 {
404 top: 29px;
414 top: 29px;
405 right: 0;
415 right: 0;
406 margin: 0;
416 margin: 0;
407 padding: 0;
417 padding: 0;
408 width: 200px;
418 width: 200px;
409 display: none;
419 display: none;
410 position: absolute;
420 position: absolute;
411 background: #FFFFFF;
421 background: #FFFFFF;
412 border: 1px solid #666;
422 border: 1px solid #666;
413 border-top: 1px solid #003367;
423 border-top: 1px solid #003367;
414 }
424 z-index: 100;
415
425 }
416 #header #header-inner #quick li ul li
426
417 {
427 #header #header-inner #quick li ul li
418 border-bottom: 1px solid #dddddd;
428 {
419 }
429 border-bottom: 1px solid #dddddd;
420
430 }
421 #header #header-inner #quick li ul li.last
431
422 {
432 #header #header-inner #quick li ul li.last
423 border: none;
433 {
424 }
434 border: none;
425
435 }
426 #header #header-inner #quick li ul li a.repos,#header #header-inner #quick li ul li a.repos:hover
436
427 {
437 #header #header-inner #quick li ul li a
428 margin: 0;
438 {
429 padding: 12px 9px 7px 28px;
439 margin: 0;
430 width: 167px;
440 padding: 7px 9px 7px 9px;
431 background: #FFFFFF url("../images/icons/folder_edit.png") no-repeat 8px 9px;
441 height: 1%;
432 }
442 width: 182px;
433 #header #header-inner #quick li ul li a.users,#header #header-inner #quick li ul li a.users:hover
443 height: auto;
434 {
444 display: block;
435 margin: 0;
445 float: left;
436 padding: 12px 9px 7px 28px;
446 background: #FFFFFF;
437 width: 167px;
447 color: #0066CC;
438 background: #FFFFFF url("../images/icons/user_edit.png") no-repeat 8px 9px;
448 font-weight: normal;
439 }
449 }
440 #header #header-inner #quick li ul li a.settings,#header #header-inner #quick li ul li a.settings:hover
450
441 {
451 #header #header-inner #quick li ul li a.childs
442 margin: 0;
452 {
443 padding: 12px 9px 7px 28px;
453 margin: 0;
444 width: 167px;
454 padding: 7px 9px 7px 24px;
445 background: #FFFFFF url("../images/icons/cog.png") no-repeat 8px 9px;
455 width: 167px;
446 }
456 background: #FFFFFF url("../../resources/images/plus.png") no-repeat 8px 9px;
447
448 #header #header-inner #quick li ul li a.permissions,#header #header-inner #quick li ul li a.permissions:hover
449 {
450 margin: 0;
451 padding: 12px 9px 7px 28px;
452 width: 167px;
453 background: #FFFFFF url("../images/icons/key.png") no-repeat 8px 9px;
454 }
455
456 #header #header-inner #quick li ul li a
457 {
458 margin: 0;
459 padding: 7px 9px 7px 9px;
460 height: 1%;
461 width: 182px;
462 height: auto;
463 display: block;
464 float: left;
465 background: #FFFFFF;
466 color: #0066CC;
467 font-weight: normal;
468 }
457 }
469
458
470 #header #header-inner #quick li ul li a:hover
459 #header #header-inner #quick li ul li a:hover
471 {
460 {
472 color: #000000;
461 color: #000000;
473 background: #FFFFFF;
462 background: #FFFFFF;
474 }
463 }
475
464
476 #header #header-inner #quick ul ul
465 #header #header-inner #quick li ul li a.childs:hover
477 {
466 {
478 top: auto;
467 background: #FFFFFF url("../../resources/images/minus.png") no-repeat 8px 9px;
479 }
468 }
480
469
481 #header #header-inner #quick li ul ul
470 #header #header-inner #quick ul ul
482 {
471 {
483 right: 200px;
472 top: auto;
484 }
473 }
485
474
486 #header #header-inner #quick li:hover ul ul,
475 #header #header-inner #quick li ul ul
487 #header #header-inner #quick li:hover ul ul ul,
476 {
488 #header #header-inner #quick li:hover ul ul ul ul
477 right: 200px;
489 {
478 }
490 display: none;
479
491 }
480 #header #header-inner #quick li:hover ul ul,
492
481 #header #header-inner #quick li:hover ul ul ul,
493 #header #header-inner #quick li:hover ul,
482 #header #header-inner #quick li:hover ul ul ul ul
494 #header #header-inner #quick li li:hover ul,
483 {
495 #header #header-inner #quick li li li:hover ul,
484 display: none;
496 #header #header-inner #quick li li li li:hover ul
485 }
497 {
486
498 display: block;
487 #header #header-inner #quick li:hover ul,
499 }
488 #header #header-inner #quick li li:hover ul,
500
489 #header #header-inner #quick li li li:hover ul,
490 #header #header-inner #quick li li li li:hover ul
491 {
492 display: block;
493 }
494
495
496 /*ICONS*/
497
498 #header #header-inner #quick li ul li a.repos,
499 #header #header-inner #quick li ul li a.repos:hover
500 {
501 background:url("../images/icons/folder_edit.png") no-repeat scroll 4px 9px #FFFFFF;
502 margin:0;
503 padding:12px 9px 7px 24px;
504 width:167px;
505
506 }
507 #header #header-inner #quick li ul li a.users,
508 #header #header-inner #quick li ul li a.users:hover
509 {
510 background: #FFFFFF url("../images/icons/user_edit.png") no-repeat 4px 9px;
511 margin:0;
512 padding:12px 9px 7px 24px;
513 width:167px;
514 }
515 #header #header-inner #quick li ul li a.settings,
516 #header #header-inner #quick li ul li a.settings:hover
517 {
518 background: #FFFFFF url("../images/icons/cog.png") no-repeat 4px 9px;
519 margin:0;
520 padding:12px 9px 7px 24px;
521 width:167px;
522 }
523
524 #header #header-inner #quick li ul li a.permissions,
525 #header #header-inner #quick li ul li a.permissions:hover
526 {
527
528 background: #FFFFFF url("../images/icons/key.png") no-repeat 4px 9px;
529 margin:0;
530 padding:12px 9px 7px 24px;
531 width:167px;
532 }
533
534 #header #header-inner #quick li ul li a.branches,#header #header-inner #quick li ul li a.branches:hover
535 {
536
537 background: #FFFFFF url("../images/icons/arrow_branch.png") no-repeat 4px 9px;
538 margin:0;
539 padding:12px 9px 7px 24px;
540 width:167px;
541 }
542
543 #header #header-inner #quick li ul li a.tags,#header #header-inner #quick li ul li a.tags:hover
544 {
545
546 background: #FFFFFF url("../images/icons/tag_blue.png") no-repeat 4px 9px;
547 margin:0;
548 padding:12px 9px 7px 24px;
549 width:167px;
550 }
501 /* -----------------------------------------------------------
551 /* -----------------------------------------------------------
502 header corners
552 header corners
503 ----------------------------------------------------------- */
553 ----------------------------------------------------------- */
@@ -151,22 +151,33 b''
151 </span>
151 </span>
152 <span>${_('Changelog')}</span>
152 <span>${_('Changelog')}</span>
153 </a>
153 </a>
154 </li>
154 </li>
155 <li ${is_current('branches')}>
155
156 <a title="${_('Branches')}" href="${h.url('branches_home',repo_name=c.repo_name)}">
156 <li ${is_current('switch_to')}>
157 <a title="${_('Switch to')}" href="#">
157 <span class="icon">
158 <span class="icon">
158 <img src="/images/icons/arrow_branch.png" alt="${_('Branches')}" />
159 <img src="/images/icons/arrow_switch.png" alt="${_('Switch to')}" />
159 </span>
160 </span>
160 <span>${_('Branches')}</span>
161 <span>${_('Switch to')}</span>
161 </a>
162 </a>
162 </li>
163 <ul>
163 <li ${is_current('tags')}>
164 <li>
164 <a title="${_('Tags')}" href="${h.url('tags_home',repo_name=c.repo_name)}">
165 ${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
165 <span class="icon">
166 <ul>
166 <img src="/images/icons/tag_blue.png" alt="${_('Tags')}" />
167 %for cnt,branch in enumerate(c.repository_branches.items()):
167 </span>
168 <li>${h.link_to('%s - %s' % (branch[0],branch[1]),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
168 <span>${_('Tags')}</span>
169 %endfor
169 </a>
170 </ul>
171 </li>
172 <li>
173 ${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
174 <ul>
175 %for cnt,tag in enumerate(c.repository_tags.items()):
176 <li>${h.link_to('%s - %s' % (tag[0],tag[1]),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
177 %endfor
178 </ul>
179 </li>
180 </ul>
170 </li>
181 </li>
171 <li ${is_current('files')}>
182 <li ${is_current('files')}>
172 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
183 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
@@ -220,7 +231,7 b''
220 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
231 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
221 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
232 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
222 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
233 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
223 <li>${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
234 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
224 </ul>
235 </ul>
225 </li>
236 </li>
226 %endif
237 %endif
General Comments 0
You need to be logged in to leave comments. Login now