Show More
@@ -9,10 +9,7 b'' | |||||
9 | / |
|
9 | / | |
10 | </%def> |
|
10 | </%def> | |
11 | <%def name="page_nav()"> |
|
11 | <%def name="page_nav()"> | |
12 | <ul class="page-nav"> |
|
12 | ${self.menu('admin')} | |
13 | <li>${h.link_to(u'Home',h.url('/'))}</li> |
|
|||
14 | <li class="current">${_('Admin')}</li> |
|
|||
15 | </ul> |
|
|||
16 | </%def> |
|
13 | </%def> | |
17 | <%def name="main()"> |
|
14 | <%def name="main()"> | |
18 | %if c.admin_user: |
|
15 | %if c.admin_user: |
@@ -11,10 +11,7 b'' | |||||
11 | </%def> |
|
11 | </%def> | |
12 |
|
12 | |||
13 | <%def name="page_nav()"> |
|
13 | <%def name="page_nav()"> | |
14 | <ul class="page-nav"> |
|
14 | ${self.menu('admin')} | |
15 | <li>${h.link_to(u'Home',h.url('/'))}</li> |
|
|||
16 | <li class="current">${_('Admin')}</li> |
|
|||
17 | </ul> |
|
|||
18 | </%def> |
|
15 | </%def> | |
19 |
|
16 | |||
20 | <%def name="main()"> |
|
17 | <%def name="main()"> |
@@ -8,8 +8,7 b'' | |||||
8 | ${h.link_to(u'Repos managment',h.url('repos'))} |
|
8 | ${h.link_to(u'Repos managment',h.url('repos'))} | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="page_nav()"> |
|
10 | <%def name="page_nav()"> | |
11 | <li>${h.link_to(u'Home',h.url('/'))}</li> |
|
11 | ${self.menu('admin')} | |
12 | <li class="current">${_('Admin')}</li> |
|
|||
13 | </%def> |
|
12 | </%def> | |
14 | <%def name="main()"> |
|
13 | <%def name="main()"> | |
15 | <ul class="submenu"> |
|
14 | <ul class="submenu"> |
@@ -8,10 +8,7 b'' | |||||
8 | ${h.link_to(u'Repos managment',h.url('repos'))} |
|
8 | ${h.link_to(u'Repos managment',h.url('repos'))} | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="page_nav()"> |
|
10 | <%def name="page_nav()"> | |
11 | <ul class="page-nav"> |
|
11 | ${self.menu('admin')} | |
12 | <li>${h.link_to(u'Home',h.url('/'))}</li> |
|
|||
13 | <li class="current">${_('Admin')}</li> |
|
|||
14 | </ul> |
|
|||
15 | </%def> |
|
12 | </%def> | |
16 | <%def name="main()"> |
|
13 | <%def name="main()"> | |
17 | <ul class="submenu"> |
|
14 | <ul class="submenu"> |
@@ -8,10 +8,7 b'' | |||||
8 | ${h.link_to(u'Users',h.url('users'))} |
|
8 | ${h.link_to(u'Users',h.url('users'))} | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="page_nav()"> |
|
10 | <%def name="page_nav()"> | |
11 | <ul class="page-nav"> |
|
11 | ${self.menu('admin')} | |
12 | <li>${h.link_to(u'Home',h.url('/'))}</li> |
|
|||
13 | <li class="current">${_('Admin')}</li> |
|
|||
14 | </ul> |
|
|||
15 | </%def> |
|
12 | </%def> | |
16 | <%def name="main()"> |
|
13 | <%def name="main()"> | |
17 | <ul class="submenu"> |
|
14 | <ul class="submenu"> |
@@ -8,10 +8,7 b'' | |||||
8 | ${h.link_to(u'Users',h.url('users'))} |
|
8 | ${h.link_to(u'Users',h.url('users'))} | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="page_nav()"> |
|
10 | <%def name="page_nav()"> | |
11 | <ul class="page-nav"> |
|
11 | ${self.menu('admin')} | |
12 | <li>${h.link_to(u'Home',h.url('/'))}</li> |
|
|||
13 | <li class="current">${_('Admin')}</li> |
|
|||
14 | </ul> |
|
|||
15 | </%def> |
|
12 | </%def> | |
16 | <%def name="main()"> |
|
13 | <%def name="main()"> | |
17 | <ul class="submenu"> |
|
14 | <ul class="submenu"> |
@@ -8,10 +8,7 b'' | |||||
8 | ${h.link_to(u'Users managment',h.url('users'))} |
|
8 | ${h.link_to(u'Users managment',h.url('users'))} | |
9 | </%def> |
|
9 | </%def> | |
10 | <%def name="page_nav()"> |
|
10 | <%def name="page_nav()"> | |
11 | <ul class="page-nav"> |
|
11 | ${self.menu('admin')} | |
12 | <li>${h.link_to(u'Home',h.url('/'))}</li> |
|
|||
13 | <li class="current">${_('Admin')}</li> |
|
|||
14 | </ul> |
|
|||
15 | </%def> |
|
12 | </%def> | |
16 | <%def name="main()"> |
|
13 | <%def name="main()"> | |
17 | <ul class="submenu"> |
|
14 | <ul class="submenu"> |
@@ -39,58 +39,66 b'' | |||||
39 | </body> |
|
39 | </body> | |
40 | </html> |
|
40 | </html> | |
41 |
|
41 | |||
|
42 | ### MAKO DEFS ### | |||
|
43 | ||||
42 | <%def name="page_nav()"> |
|
44 | <%def name="page_nav()"> | |
43 | ${self.menu()} |
|
45 | ${self.menu()} | |
44 | </%def> |
|
46 | </%def> | |
45 |
|
47 | |||
46 |
|
||||
47 | <%def name="menu(current)"> |
|
48 | <%def name="menu(current)"> | |
48 | <script type="text/javascript"> |
|
49 | <% | |
49 | YAHOO.util.Event.onDOMReady(function(){ |
|
50 | def is_current(selected): | |
50 | YAHOO.util.Event.addListener('repo_switcher','click',function(){ |
|
51 | if selected == current: | |
51 | if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){ |
|
52 | return 'class=current' | |
52 | YAHOO.util.Dom.setStyle('switch_repos','display','none'); |
|
53 | %> | |
53 | YAHOO.util.Dom.setStyle('repo_switcher','background',''); |
|
54 | %if current not in ['home','admin']: | |
54 | YAHOO.util.Dom.removeClass('repo_switcher','selected'); |
|
55 | <script type="text/javascript"> | |
55 | } |
|
56 | YAHOO.util.Event.onDOMReady(function(){ | |
56 | else{ |
|
57 | YAHOO.util.Event.addListener('repo_switcher','click',function(){ | |
57 |
YAHOO.util.Dom. |
|
58 | if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){ | |
58 |
YAHOO.util.Dom.setStyle(' |
|
59 | YAHOO.util.Dom.setStyle('switch_repos','display','none'); | |
59 |
YAHOO.util.Dom. |
|
60 | YAHOO.util.Dom.setStyle('repo_switcher','background',''); | |
60 | } |
|
61 | YAHOO.util.Dom.removeClass('repo_switcher','selected'); | |
61 |
} |
|
62 | } | |
62 | YAHOO.util.Event.addListener('repos_list','change',function(e){ |
|
63 | else{ | |
63 | var wa = YAHOO.util.Dom.get('repos_list').value; |
|
64 | YAHOO.util.Dom.setStyle('switch_repos','display',''); | |
64 |
|
65 | YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF'); | ||
65 | var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa); |
|
66 | YAHOO.util.Dom.addClass('repo_switcher','selected'); | |
66 | window.location = url; |
|
67 | } | |
67 | }) |
|
68 | }); | |
68 | }); |
|
69 | YAHOO.util.Event.addListener('repos_list','change',function(e){ | |
69 | </script> |
|
70 | var wa = YAHOO.util.Dom.get('repos_list').value; | |
70 | <ul class="page-nav"> |
|
71 | ||
71 | <li> |
|
72 | var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa); | |
72 | <a id="repo_switcher" title="${_('Switch repository')}" href="#">↓</a> |
|
73 | window.location = url; | |
73 | <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px"> |
|
74 | }) | |
74 | <select id="repos_list" size="=10"> |
|
75 | }); | |
75 | %for repo in c.cached_repo_list: |
|
76 | </script> | |
76 | <option value="${repo['name']}">${repo['name']}</option> |
|
77 | <ul class="page-nav"> | |
77 | %endfor |
|
78 | <li> | |
78 | </select> |
|
79 | <a id="repo_switcher" title="${_('Switch repository')}" href="#">↓</a> | |
79 | </div> |
|
80 | <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px"> | |
80 | </li> |
|
81 | <select id="repos_list" size="=10"> | |
81 | <%def name="is_current(selected)"> |
|
82 | %for repo in c.cached_repo_list: | |
82 | <% |
|
83 | <option value="${repo['name']}">${repo['name']}</option> | |
83 | if selected == current: |
|
84 | %endfor | |
84 | return 'class="current"' |
|
85 | </select> | |
85 | %> |
|
86 | </div> | |
86 |
</ |
|
87 | </li> | |
87 |
<li ${is_current('summary') |
|
88 | <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li> | |
88 |
<li ${is_current('shortlog') |
|
89 | <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li> | |
89 |
<li ${is_current('changelog') |
|
90 | <li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li> | |
90 |
<li ${is_current('branches') |
|
91 | <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li> | |
91 |
<li ${is_current('tags') |
|
92 | <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li> | |
92 |
<li ${is_current('files') |
|
93 | <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li> | |
93 | </ul> |
|
94 | </ul> | |
|
95 | %else: | |||
|
96 | <ul class="page-nav"> | |||
|
97 | <li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li> | |||
|
98 | <li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li> | |||
|
99 | <li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li> | |||
|
100 | </ul> | |||
|
101 | %endif | |||
94 | </%def> |
|
102 | </%def> | |
95 |
|
103 | |||
96 | <%def name="css()"> |
|
104 | <%def name="css()"> |
General Comments 0
You need to be logged in to leave comments.
Login now