Show More
@@ -1,334 +1,336 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="root.html"/> |
|
2 | <%inherit file="root.html"/> | |
3 |
|
3 | |||
4 | <!-- HEADER --> |
|
4 | <!-- HEADER --> | |
5 | <div id="header-dd"></div> |
|
5 | <div id="header-dd"></div> | |
6 | <div id="header"> |
|
6 | <div id="header"> | |
7 | <div id="header-inner" class="title"> |
|
7 | <div id="header-inner" class="title"> | |
8 | <div id="logo"> |
|
8 | <div id="logo"> | |
9 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> |
|
9 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> | |
10 | </div> |
|
10 | </div> | |
11 | <!-- MENU --> |
|
11 | <!-- MENU --> | |
12 | ${self.page_nav()} |
|
12 | ${self.page_nav()} | |
13 | <!-- END MENU --> |
|
13 | <!-- END MENU --> | |
14 | ${self.body()} |
|
14 | ${self.body()} | |
15 | </div> |
|
15 | </div> | |
16 | </div> |
|
16 | </div> | |
17 | <!-- END HEADER --> |
|
17 | <!-- END HEADER --> | |
18 |
|
18 | |||
19 | <!-- CONTENT --> |
|
19 | <!-- CONTENT --> | |
20 | <div id="content"> |
|
20 | <div id="content"> | |
21 | <div class="flash_msg"> |
|
21 | <div class="flash_msg"> | |
22 | <% messages = h.flash.pop_messages() %> |
|
22 | <% messages = h.flash.pop_messages() %> | |
23 | % if messages: |
|
23 | % if messages: | |
24 | <ul id="flash-messages"> |
|
24 | <ul id="flash-messages"> | |
25 | % for message in messages: |
|
25 | % for message in messages: | |
26 | <li class="${message.category}_msg">${message}</li> |
|
26 | <li class="${message.category}_msg">${message}</li> | |
27 | % endfor |
|
27 | % endfor | |
28 | </ul> |
|
28 | </ul> | |
29 | % endif |
|
29 | % endif | |
30 | </div> |
|
30 | </div> | |
31 | <div id="main"> |
|
31 | <div id="main"> | |
32 | ${next.main()} |
|
32 | ${next.main()} | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | <!-- END CONTENT --> |
|
35 | <!-- END CONTENT --> | |
36 |
|
36 | |||
37 | <!-- FOOTER --> |
|
37 | <!-- FOOTER --> | |
38 | <div id="footer"> |
|
38 | <div id="footer"> | |
39 | <div id="footer-inner" class="title"> |
|
39 | <div id="footer-inner" class="title"> | |
40 | <div> |
|
40 | <div> | |
41 | <p class="footer-link"> |
|
41 | <p class="footer-link"> | |
42 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
|
42 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> | |
43 | </p> |
|
43 | </p> | |
44 | <p class="footer-link-right"> |
|
44 | <p class="footer-link-right"> | |
45 |
<a href="${h.url('rhodecode_official')}">RhodeCode${ |
|
45 | <a href="${h.url('rhodecode_official')}">RhodeCode ${c.rhodecode_version}</a> | |
46 |
|
|
46 | © 2010-${h.datetime.today().year} by Marcin Kuzminski and others | |
|
47 | ${'(%s)' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''} | |||
47 | </p> |
|
48 | </p> | |
48 | </div> |
|
49 | </div> | |
49 | </div> |
|
50 | </div> | |
50 | </div> |
|
51 | </div> | |
|
52 | ||||
51 | <!-- END FOOTER --> |
|
53 | <!-- END FOOTER --> | |
52 |
|
54 | |||
53 | ### MAKO DEFS ### |
|
55 | ### MAKO DEFS ### | |
54 | <%def name="breadcrumbs()"> |
|
56 | <%def name="breadcrumbs()"> | |
55 | <div class="breadcrumbs"> |
|
57 | <div class="breadcrumbs"> | |
56 | ${self.breadcrumbs_links()} |
|
58 | ${self.breadcrumbs_links()} | |
57 | </div> |
|
59 | </div> | |
58 | </%def> |
|
60 | </%def> | |
59 |
|
61 | |||
60 | <%def name="context_bar(current)"> |
|
62 | <%def name="context_bar(current)"> | |
61 | ${repo_context_bar(current)} |
|
63 | ${repo_context_bar(current)} | |
62 | </%def> |
|
64 | </%def> | |
63 |
|
65 | |||
64 | <%def name="admin_menu()"> |
|
66 | <%def name="admin_menu()"> | |
65 | <ul class="admin_menu"> |
|
67 | <ul class="admin_menu"> | |
66 | <li>${h.link_to(_('Admin journal'),h.url('admin_home'),class_='journal ')}</li> |
|
68 | <li>${h.link_to(_('Admin journal'),h.url('admin_home'),class_='journal ')}</li> | |
67 | <li>${h.link_to(_('Repositories'),h.url('repos'),class_='repos')}</li> |
|
69 | <li>${h.link_to(_('Repositories'),h.url('repos'),class_='repos')}</li> | |
68 | <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
70 | <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li> | |
69 | <li>${h.link_to(_('Users'),h.url('users'),class_='users')}</li> |
|
71 | <li>${h.link_to(_('Users'),h.url('users'),class_='users')}</li> | |
70 | <li>${h.link_to(_('User groups'),h.url('users_groups'),class_='groups')}</li> |
|
72 | <li>${h.link_to(_('User groups'),h.url('users_groups'),class_='groups')}</li> | |
71 | <li>${h.link_to(_('Permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
|
73 | <li>${h.link_to(_('Permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> | |
72 | <li>${h.link_to(_('LDAP'),h.url('ldap_home'),class_='ldap')}</li> |
|
74 | <li>${h.link_to(_('LDAP'),h.url('ldap_home'),class_='ldap')}</li> | |
73 | <li>${h.link_to(_('Defaults'),h.url('defaults'),class_='defaults')}</li> |
|
75 | <li>${h.link_to(_('Defaults'),h.url('defaults'),class_='defaults')}</li> | |
74 | <li class="last">${h.link_to(_('Settings'),h.url('admin_settings'),class_='settings')}</li> |
|
76 | <li class="last">${h.link_to(_('Settings'),h.url('admin_settings'),class_='settings')}</li> | |
75 | </ul> |
|
77 | </ul> | |
76 | </%def> |
|
78 | </%def> | |
77 |
|
79 | |||
78 | <%def name="admin_menu_simple()"> |
|
80 | <%def name="admin_menu_simple()"> | |
79 | <ul> |
|
81 | <ul> | |
80 | <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
82 | <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li> | |
81 | </ul> |
|
83 | </ul> | |
82 | </%def> |
|
84 | </%def> | |
83 |
|
85 | |||
84 | <%def name="repo_context_bar(current=None)"> |
|
86 | <%def name="repo_context_bar(current=None)"> | |
85 | <% |
|
87 | <% | |
86 | def follow_class(): |
|
88 | def follow_class(): | |
87 | if c.repository_following: |
|
89 | if c.repository_following: | |
88 | return h.literal('following') |
|
90 | return h.literal('following') | |
89 | else: |
|
91 | else: | |
90 | return h.literal('follow') |
|
92 | return h.literal('follow') | |
91 | %> |
|
93 | %> | |
92 | <% |
|
94 | <% | |
93 | def is_current(selected): |
|
95 | def is_current(selected): | |
94 | if selected == current: |
|
96 | if selected == current: | |
95 | return h.literal('class="current"') |
|
97 | return h.literal('class="current"') | |
96 | %> |
|
98 | %> | |
97 |
|
99 | |||
98 | <!--- CONTEXT BAR --> |
|
100 | <!--- CONTEXT BAR --> | |
99 | <div id="context-bar" class="box"> |
|
101 | <div id="context-bar" class="box"> | |
100 | <div id="breadcrumbs"> |
|
102 | <div id="breadcrumbs"> | |
101 | ${h.link_to(_(u'Repositories'),h.url('home'))} |
|
103 | ${h.link_to(_(u'Repositories'),h.url('home'))} | |
102 | » |
|
104 | » | |
103 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
105 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
104 | </div> |
|
106 | </div> | |
105 | <ul id="context-pages" class="horizontal-list"> |
|
107 | <ul id="context-pages" class="horizontal-list"> | |
106 | <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li> |
|
108 | <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li> | |
107 | <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li> |
|
109 | <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li> | |
108 | <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li> |
|
110 | <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li> | |
109 | <li ${is_current('switch-to')}> |
|
111 | <li ${is_current('switch-to')}> | |
110 | <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a> |
|
112 | <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a> | |
111 | <ul id="switch_to_list_2" class="switch_to submenu"> |
|
113 | <ul id="switch_to_list_2" class="switch_to submenu"> | |
112 | <li><a href="#">${_('loading...')}</a></li> |
|
114 | <li><a href="#">${_('loading...')}</a></li> | |
113 | </ul> |
|
115 | </ul> | |
114 | </li> |
|
116 | </li> | |
115 | <li ${is_current('options')}> |
|
117 | <li ${is_current('options')}> | |
116 | <a href="#" class="dropdown options"></span>${_('Options')}</a> |
|
118 | <a href="#" class="dropdown options"></span>${_('Options')}</a> | |
117 | <ul> |
|
119 | <ul> | |
118 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
120 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): | |
119 | <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> |
|
121 | <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> | |
120 | %endif |
|
122 | %endif | |
121 | %if c.rhodecode_db_repo.fork: |
|
123 | %if c.rhodecode_db_repo.fork: | |
122 | <li>${h.link_to(_('Compare fork'),h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default', merge=1),class_='compare_request')}</li> |
|
124 | <li>${h.link_to(_('Compare fork'),h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default', merge=1),class_='compare_request')}</li> | |
123 | %endif |
|
125 | %endif | |
124 | <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li> |
|
126 | <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li> | |
125 | <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li> |
|
127 | <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li> | |
126 |
|
128 | |||
127 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking: |
|
129 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking: | |
128 | %if c.rhodecode_db_repo.locked[0]: |
|
130 | %if c.rhodecode_db_repo.locked[0]: | |
129 | <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li> |
|
131 | <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li> | |
130 | %else: |
|
132 | %else: | |
131 | <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li> |
|
133 | <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li> | |
132 | %endif |
|
134 | %endif | |
133 | %endif |
|
135 | %endif | |
134 | ## TODO: this check feels wrong, it would be better to have a check for permissions |
|
136 | ## TODO: this check feels wrong, it would be better to have a check for permissions | |
135 | ## also it feels like a job for the controller |
|
137 | ## also it feels like a job for the controller | |
136 | %if c.rhodecode_user.username != 'default': |
|
138 | %if c.rhodecode_user.username != 'default': | |
137 | <li> |
|
139 | <li> | |
138 | <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');"> |
|
140 | <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');"> | |
139 | <span class="show-follow">${_('Follow')}</span> |
|
141 | <span class="show-follow">${_('Follow')}</span> | |
140 | <span class="show-following">${_('Unfollow')}</span> |
|
142 | <span class="show-following">${_('Unfollow')}</span> | |
141 | </a> |
|
143 | </a> | |
142 | </li> |
|
144 | </li> | |
143 | <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li> |
|
145 | <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li> | |
144 | %if h.is_hg(c.rhodecode_repo): |
|
146 | %if h.is_hg(c.rhodecode_repo): | |
145 | <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li> |
|
147 | <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li> | |
146 | %endif |
|
148 | %endif | |
147 | %endif |
|
149 | %endif | |
148 | </ul> |
|
150 | </ul> | |
149 | </li> |
|
151 | </li> | |
150 | <li ${is_current('showpullrequest')}> |
|
152 | <li ${is_current('showpullrequest')}> | |
151 | <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')} |
|
153 | <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')} | |
152 | %if c.repository_pull_requests: |
|
154 | %if c.repository_pull_requests: | |
153 | <span>${c.repository_pull_requests}</span> |
|
155 | <span>${c.repository_pull_requests}</span> | |
154 | %endif |
|
156 | %endif | |
155 | </a> |
|
157 | </a> | |
156 | </li> |
|
158 | </li> | |
157 | </ul> |
|
159 | </ul> | |
158 | </div> |
|
160 | </div> | |
159 | <script type="text/javascript"> |
|
161 | <script type="text/javascript"> | |
160 | YUE.on('branch_tag_switcher_2','mouseover',function(){ |
|
162 | YUE.on('branch_tag_switcher_2','mouseover',function(){ | |
161 | var loaded = YUD.hasClass('branch_tag_switcher_2','loaded'); |
|
163 | var loaded = YUD.hasClass('branch_tag_switcher_2','loaded'); | |
162 | if(!loaded){ |
|
164 | if(!loaded){ | |
163 | YUD.addClass('branch_tag_switcher_2','loaded'); |
|
165 | YUD.addClass('branch_tag_switcher_2','loaded'); | |
164 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2', |
|
166 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2', | |
165 | function(o){}, |
|
167 | function(o){}, | |
166 | function(o){YUD.removeClass('branch_tag_switcher_2','loaded');} |
|
168 | function(o){YUD.removeClass('branch_tag_switcher_2','loaded');} | |
167 | ,null); |
|
169 | ,null); | |
168 | } |
|
170 | } | |
169 | return false; |
|
171 | return false; | |
170 | }); |
|
172 | }); | |
171 | </script> |
|
173 | </script> | |
172 | <!--- END CONTEXT BAR --> |
|
174 | <!--- END CONTEXT BAR --> | |
173 | </%def> |
|
175 | </%def> | |
174 |
|
176 | |||
175 | <%def name="usermenu()"> |
|
177 | <%def name="usermenu()"> | |
176 | ## USER MENU |
|
178 | ## USER MENU | |
177 | <li> |
|
179 | <li> | |
178 | <a class="menu_link childs" id="quick_login_link"> |
|
180 | <a class="menu_link childs" id="quick_login_link"> | |
179 | <span class="icon"> |
|
181 | <span class="icon"> | |
180 | <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar"> |
|
182 | <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar"> | |
181 | </span> |
|
183 | </span> | |
182 | %if c.rhodecode_user.username != 'default': |
|
184 | %if c.rhodecode_user.username != 'default': | |
183 | <span class="menu_link_user">${c.rhodecode_user.username}</span> |
|
185 | <span class="menu_link_user">${c.rhodecode_user.username}</span> | |
184 | %if c.unread_notifications != 0: |
|
186 | %if c.unread_notifications != 0: | |
185 | <span class="menu_link_notifications">${c.unread_notifications}</span> |
|
187 | <span class="menu_link_notifications">${c.unread_notifications}</span> | |
186 | %endif |
|
188 | %endif | |
187 | %else: |
|
189 | %else: | |
188 | <span>${_('Not logged in')}</span> |
|
190 | <span>${_('Not logged in')}</span> | |
189 | %endif |
|
191 | %endif | |
190 | </a> |
|
192 | </a> | |
191 |
|
193 | |||
192 | <div class="user-menu"> |
|
194 | <div class="user-menu"> | |
193 | <div id="quick_login"> |
|
195 | <div id="quick_login"> | |
194 | %if c.rhodecode_user.username == 'default': |
|
196 | %if c.rhodecode_user.username == 'default': | |
195 | <h4>${_('Login to your account')}</h4> |
|
197 | <h4>${_('Login to your account')}</h4> | |
196 | ${h.form(h.url('login_home',came_from=h.url.current()))} |
|
198 | ${h.form(h.url('login_home',came_from=h.url.current()))} | |
197 | <div class="form"> |
|
199 | <div class="form"> | |
198 | <div class="fields"> |
|
200 | <div class="fields"> | |
199 | <div class="field"> |
|
201 | <div class="field"> | |
200 | <div class="label"> |
|
202 | <div class="label"> | |
201 | <label for="username">${_('Username')}:</label> |
|
203 | <label for="username">${_('Username')}:</label> | |
202 | </div> |
|
204 | </div> | |
203 | <div class="input"> |
|
205 | <div class="input"> | |
204 | ${h.text('username',class_='focus')} |
|
206 | ${h.text('username',class_='focus')} | |
205 | </div> |
|
207 | </div> | |
206 |
|
208 | |||
207 | </div> |
|
209 | </div> | |
208 | <div class="field"> |
|
210 | <div class="field"> | |
209 | <div class="label"> |
|
211 | <div class="label"> | |
210 | <label for="password">${_('Password')}:</label> |
|
212 | <label for="password">${_('Password')}:</label> | |
211 | </div> |
|
213 | </div> | |
212 | <div class="input"> |
|
214 | <div class="input"> | |
213 | ${h.password('password',class_='focus')} |
|
215 | ${h.password('password',class_='focus')} | |
214 | </div> |
|
216 | </div> | |
215 |
|
217 | |||
216 | </div> |
|
218 | </div> | |
217 | <div class="buttons"> |
|
219 | <div class="buttons"> | |
218 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> |
|
220 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> | |
219 | <div class="register"> |
|
221 | <div class="register"> | |
220 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
222 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): | |
221 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
223 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} | |
222 | %endif |
|
224 | %endif | |
223 | </div> |
|
225 | </div> | |
224 | <div class="submit"> |
|
226 | <div class="submit"> | |
225 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} |
|
227 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} | |
226 | </div> |
|
228 | </div> | |
227 | </div> |
|
229 | </div> | |
228 | </div> |
|
230 | </div> | |
229 | </div> |
|
231 | </div> | |
230 | ${h.end_form()} |
|
232 | ${h.end_form()} | |
231 | %else: |
|
233 | %else: | |
232 | <div class="links_left"> |
|
234 | <div class="links_left"> | |
233 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> |
|
235 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> | |
234 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> |
|
236 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> | |
235 | <div class="email">${c.rhodecode_user.email}</div> |
|
237 | <div class="email">${c.rhodecode_user.email}</div> | |
236 | </div> |
|
238 | </div> | |
237 | <div class="links_right"> |
|
239 | <div class="links_right"> | |
238 | <ol class="links"> |
|
240 | <ol class="links"> | |
239 | <li><a href="${h.url('notifications')}">${_('Notifications')}: ${c.unread_notifications}</a></li> |
|
241 | <li><a href="${h.url('notifications')}">${_('Notifications')}: ${c.unread_notifications}</a></li> | |
240 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> |
|
242 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> | |
241 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> |
|
243 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> | |
242 | </ol> |
|
244 | </ol> | |
243 | </div> |
|
245 | </div> | |
244 | %endif |
|
246 | %endif | |
245 | </div> |
|
247 | </div> | |
246 | </div> |
|
248 | </div> | |
247 |
|
249 | |||
248 | </li> |
|
250 | </li> | |
249 | </%def> |
|
251 | </%def> | |
250 |
|
252 | |||
251 | <%def name="menu(current=None)"> |
|
253 | <%def name="menu(current=None)"> | |
252 | <% |
|
254 | <% | |
253 | def is_current(selected): |
|
255 | def is_current(selected): | |
254 | if selected == current: |
|
256 | if selected == current: | |
255 | return h.literal('class="current"') |
|
257 | return h.literal('class="current"') | |
256 | %> |
|
258 | %> | |
257 | <ul id="quick" class="horizontal-list"> |
|
259 | <ul id="quick" class="horizontal-list"> | |
258 | <!-- repo switcher --> |
|
260 | <!-- repo switcher --> | |
259 | <li ${is_current('repositories')}> |
|
261 | <li ${is_current('repositories')}> | |
260 | <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}"> |
|
262 | <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}"> | |
261 | ${_('Repositories')} |
|
263 | ${_('Repositories')} | |
262 | </a> |
|
264 | </a> | |
263 | <ul id="repo_switcher_list" class="repo_switcher"> |
|
265 | <ul id="repo_switcher_list" class="repo_switcher"> | |
264 | <li> |
|
266 | <li> | |
265 | <a href="#">${_('loading...')}</a> |
|
267 | <a href="#">${_('loading...')}</a> | |
266 | </li> |
|
268 | </li> | |
267 | </ul> |
|
269 | </ul> | |
268 | </li> |
|
270 | </li> | |
269 | ##ROOT MENU |
|
271 | ##ROOT MENU | |
270 | %if c.rhodecode_user.username != 'default': |
|
272 | %if c.rhodecode_user.username != 'default': | |
271 | <li ${is_current('journal')}> |
|
273 | <li ${is_current('journal')}> | |
272 | <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}"> |
|
274 | <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}"> | |
273 | ${_('Journal')} |
|
275 | ${_('Journal')} | |
274 | </a> |
|
276 | </a> | |
275 | </li> |
|
277 | </li> | |
276 | %else: |
|
278 | %else: | |
277 | <li ${is_current('journal')}> |
|
279 | <li ${is_current('journal')}> | |
278 | <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}"> |
|
280 | <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}"> | |
279 | ${_('Public journal')} |
|
281 | ${_('Public journal')} | |
280 | </a> |
|
282 | </a> | |
281 | </li> |
|
283 | </li> | |
282 | %endif |
|
284 | %endif | |
283 | <li ${is_current('search')}> |
|
285 | <li ${is_current('search')}> | |
284 | <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}"> |
|
286 | <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}"> | |
285 | ${_('Search')} |
|
287 | ${_('Search')} | |
286 | </a> |
|
288 | </a> | |
287 | </li> |
|
289 | </li> | |
288 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
290 | % if h.HasPermissionAll('hg.admin')('access admin main page'): | |
289 | <li ${is_current('admin')}> |
|
291 | <li ${is_current('admin')}> | |
290 | <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
292 | <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}"> | |
291 | ${_('Admin')} |
|
293 | ${_('Admin')} | |
292 | </a> |
|
294 | </a> | |
293 | ${admin_menu()} |
|
295 | ${admin_menu()} | |
294 | </li> |
|
296 | </li> | |
295 | % elif c.rhodecode_user.groups_admin: |
|
297 | % elif c.rhodecode_user.groups_admin: | |
296 | <li ${is_current('admin')}> |
|
298 | <li ${is_current('admin')}> | |
297 | <a class="menu_link admin childs" title="${_('Admin')}"> |
|
299 | <a class="menu_link admin childs" title="${_('Admin')}"> | |
298 | ${_('Admin')} |
|
300 | ${_('Admin')} | |
299 | </a> |
|
301 | </a> | |
300 | ${admin_menu_simple()} |
|
302 | ${admin_menu_simple()} | |
301 | </li> |
|
303 | </li> | |
302 | % endif |
|
304 | % endif | |
303 | ${usermenu()} |
|
305 | ${usermenu()} | |
304 | <script type="text/javascript"> |
|
306 | <script type="text/javascript"> | |
305 | YUE.on('repo_switcher','mouseover',function(){ |
|
307 | YUE.on('repo_switcher','mouseover',function(){ | |
306 | var target = 'q_filter_rs'; |
|
308 | var target = 'q_filter_rs'; | |
307 | var qfilter_activate = function(){ |
|
309 | var qfilter_activate = function(){ | |
308 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); |
|
310 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); | |
309 | var func = function(node){ |
|
311 | var func = function(node){ | |
310 | return node.parentNode; |
|
312 | return node.parentNode; | |
311 | } |
|
313 | } | |
312 | q_filter(target,nodes,func); |
|
314 | q_filter(target,nodes,func); | |
313 | } |
|
315 | } | |
314 |
|
316 | |||
315 | var loaded = YUD.hasClass('repo_switcher','loaded'); |
|
317 | var loaded = YUD.hasClass('repo_switcher','loaded'); | |
316 | if(!loaded){ |
|
318 | if(!loaded){ | |
317 | YUD.addClass('repo_switcher','loaded'); |
|
319 | YUD.addClass('repo_switcher','loaded'); | |
318 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', |
|
320 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', | |
319 | function(o){qfilter_activate();YUD.get(target).focus()}, |
|
321 | function(o){qfilter_activate();YUD.get(target).focus()}, | |
320 | function(o){YUD.removeClass('repo_switcher','loaded');} |
|
322 | function(o){YUD.removeClass('repo_switcher','loaded');} | |
321 | ,null); |
|
323 | ,null); | |
322 | }else{ |
|
324 | }else{ | |
323 | YUD.get(target).focus(); |
|
325 | YUD.get(target).focus(); | |
324 | } |
|
326 | } | |
325 | return false; |
|
327 | return false; | |
326 | }); |
|
328 | }); | |
327 |
|
329 | |||
328 | YUE.on('header-dd', 'click',function(e){ |
|
330 | YUE.on('header-dd', 'click',function(e){ | |
329 | YUD.addClass('header-inner', 'hover'); |
|
331 | YUD.addClass('header-inner', 'hover'); | |
330 | YUD.addClass('content', 'hover'); |
|
332 | YUD.addClass('content', 'hover'); | |
331 | }); |
|
333 | }); | |
332 |
|
334 | |||
333 | </script> |
|
335 | </script> | |
334 | </%def> |
|
336 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now