##// END OF EJS Templates
moved the instance id after version, beeing at the end looks odd, and confusing.
marcink -
r3689:b20eacde beta
parent child Browse files
Show More
@@ -1,336 +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 ${c.rhodecode_version}</a>
45 <a href="${h.url('rhodecode_official')}">RhodeCode ${c.rhodecode_version}</a>
46 ${'(%s)' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}
46 &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
47 &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
47 ${'(%s)' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}
48 </p>
48 </p>
49 </div>
49 </div>
50 </div>
50 </div>
51 </div>
51 </div>
52
52
53 <!-- END FOOTER -->
53 <!-- END FOOTER -->
54
54
55 ### MAKO DEFS ###
55 ### MAKO DEFS ###
56 <%def name="breadcrumbs()">
56 <%def name="breadcrumbs()">
57 <div class="breadcrumbs">
57 <div class="breadcrumbs">
58 ${self.breadcrumbs_links()}
58 ${self.breadcrumbs_links()}
59 </div>
59 </div>
60 </%def>
60 </%def>
61
61
62 <%def name="context_bar(current)">
62 <%def name="context_bar(current)">
63 ${repo_context_bar(current)}
63 ${repo_context_bar(current)}
64 </%def>
64 </%def>
65
65
66 <%def name="admin_menu()">
66 <%def name="admin_menu()">
67 <ul class="admin_menu">
67 <ul class="admin_menu">
68 <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>
69 <li>${h.link_to(_('Repositories'),h.url('repos'),class_='repos')}</li>
69 <li>${h.link_to(_('Repositories'),h.url('repos'),class_='repos')}</li>
70 <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>
71 <li>${h.link_to(_('Users'),h.url('users'),class_='users')}</li>
71 <li>${h.link_to(_('Users'),h.url('users'),class_='users')}</li>
72 <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>
73 <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>
74 <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>
75 <li>${h.link_to(_('Defaults'),h.url('defaults'),class_='defaults')}</li>
75 <li>${h.link_to(_('Defaults'),h.url('defaults'),class_='defaults')}</li>
76 <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>
77 </ul>
77 </ul>
78 </%def>
78 </%def>
79
79
80 <%def name="admin_menu_simple()">
80 <%def name="admin_menu_simple()">
81 <ul>
81 <ul>
82 <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>
83 </ul>
83 </ul>
84 </%def>
84 </%def>
85
85
86 <%def name="repo_context_bar(current=None)">
86 <%def name="repo_context_bar(current=None)">
87 <%
87 <%
88 def follow_class():
88 def follow_class():
89 if c.repository_following:
89 if c.repository_following:
90 return h.literal('following')
90 return h.literal('following')
91 else:
91 else:
92 return h.literal('follow')
92 return h.literal('follow')
93 %>
93 %>
94 <%
94 <%
95 def is_current(selected):
95 def is_current(selected):
96 if selected == current:
96 if selected == current:
97 return h.literal('class="current"')
97 return h.literal('class="current"')
98 %>
98 %>
99
99
100 <!--- CONTEXT BAR -->
100 <!--- CONTEXT BAR -->
101 <div id="context-bar" class="box">
101 <div id="context-bar" class="box">
102 <div id="breadcrumbs">
102 <div id="breadcrumbs">
103 ${h.link_to(_(u'Repositories'),h.url('home'))}
103 ${h.link_to(_(u'Repositories'),h.url('home'))}
104 &raquo;
104 &raquo;
105 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
105 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
106 </div>
106 </div>
107 <ul id="context-pages" class="horizontal-list">
107 <ul id="context-pages" class="horizontal-list">
108 <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>
109 <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>
110 <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>
111 <li ${is_current('switch-to')}>
111 <li ${is_current('switch-to')}>
112 <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>
113 <ul id="switch_to_list_2" class="switch_to submenu">
113 <ul id="switch_to_list_2" class="switch_to submenu">
114 <li><a href="#">${_('loading...')}</a></li>
114 <li><a href="#">${_('loading...')}</a></li>
115 </ul>
115 </ul>
116 </li>
116 </li>
117 <li ${is_current('options')}>
117 <li ${is_current('options')}>
118 <a href="#" class="dropdown options"></span>${_('Options')}</a>
118 <a href="#" class="dropdown options"></span>${_('Options')}</a>
119 <ul>
119 <ul>
120 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
120 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
121 <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>
122 %endif
122 %endif
123 %if c.rhodecode_db_repo.fork:
123 %if c.rhodecode_db_repo.fork:
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>
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>
125 %endif
125 %endif
126 <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>
127 <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>
128
128
129 %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:
130 %if c.rhodecode_db_repo.locked[0]:
130 %if c.rhodecode_db_repo.locked[0]:
131 <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>
132 %else:
132 %else:
133 <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>
134 %endif
134 %endif
135 %endif
135 %endif
136 ## 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
137 ## also it feels like a job for the controller
137 ## also it feels like a job for the controller
138 %if c.rhodecode_user.username != 'default':
138 %if c.rhodecode_user.username != 'default':
139 <li>
139 <li>
140 <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())}');">
141 <span class="show-follow">${_('Follow')}</span>
141 <span class="show-follow">${_('Follow')}</span>
142 <span class="show-following">${_('Unfollow')}</span>
142 <span class="show-following">${_('Unfollow')}</span>
143 </a>
143 </a>
144 </li>
144 </li>
145 <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>
146 %if h.is_hg(c.rhodecode_repo):
146 %if h.is_hg(c.rhodecode_repo):
147 <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>
148 %endif
148 %endif
149 %endif
149 %endif
150 </ul>
150 </ul>
151 </li>
151 </li>
152 <li ${is_current('showpullrequest')}>
152 <li ${is_current('showpullrequest')}>
153 <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')}
154 %if c.repository_pull_requests:
154 %if c.repository_pull_requests:
155 <span>${c.repository_pull_requests}</span>
155 <span>${c.repository_pull_requests}</span>
156 %endif
156 %endif
157 </a>
157 </a>
158 </li>
158 </li>
159 </ul>
159 </ul>
160 </div>
160 </div>
161 <script type="text/javascript">
161 <script type="text/javascript">
162 YUE.on('branch_tag_switcher_2','mouseover',function(){
162 YUE.on('branch_tag_switcher_2','mouseover',function(){
163 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
163 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
164 if(!loaded){
164 if(!loaded){
165 YUD.addClass('branch_tag_switcher_2','loaded');
165 YUD.addClass('branch_tag_switcher_2','loaded');
166 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',
167 function(o){},
167 function(o){},
168 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
168 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
169 ,null);
169 ,null);
170 }
170 }
171 return false;
171 return false;
172 });
172 });
173 </script>
173 </script>
174 <!--- END CONTEXT BAR -->
174 <!--- END CONTEXT BAR -->
175 </%def>
175 </%def>
176
176
177 <%def name="usermenu()">
177 <%def name="usermenu()">
178 ## USER MENU
178 ## USER MENU
179 <li>
179 <li>
180 <a class="menu_link childs" id="quick_login_link">
180 <a class="menu_link childs" id="quick_login_link">
181 <span class="icon">
181 <span class="icon">
182 <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">
183 </span>
183 </span>
184 %if c.rhodecode_user.username != 'default':
184 %if c.rhodecode_user.username != 'default':
185 <span class="menu_link_user">${c.rhodecode_user.username}</span>
185 <span class="menu_link_user">${c.rhodecode_user.username}</span>
186 %if c.unread_notifications != 0:
186 %if c.unread_notifications != 0:
187 <span class="menu_link_notifications">${c.unread_notifications}</span>
187 <span class="menu_link_notifications">${c.unread_notifications}</span>
188 %endif
188 %endif
189 %else:
189 %else:
190 <span>${_('Not logged in')}</span>
190 <span>${_('Not logged in')}</span>
191 %endif
191 %endif
192 </a>
192 </a>
193
193
194 <div class="user-menu">
194 <div class="user-menu">
195 <div id="quick_login">
195 <div id="quick_login">
196 %if c.rhodecode_user.username == 'default':
196 %if c.rhodecode_user.username == 'default':
197 <h4>${_('Login to your account')}</h4>
197 <h4>${_('Login to your account')}</h4>
198 ${h.form(h.url('login_home',came_from=h.url.current()))}
198 ${h.form(h.url('login_home',came_from=h.url.current()))}
199 <div class="form">
199 <div class="form">
200 <div class="fields">
200 <div class="fields">
201 <div class="field">
201 <div class="field">
202 <div class="label">
202 <div class="label">
203 <label for="username">${_('Username')}:</label>
203 <label for="username">${_('Username')}:</label>
204 </div>
204 </div>
205 <div class="input">
205 <div class="input">
206 ${h.text('username',class_='focus')}
206 ${h.text('username',class_='focus')}
207 </div>
207 </div>
208
208
209 </div>
209 </div>
210 <div class="field">
210 <div class="field">
211 <div class="label">
211 <div class="label">
212 <label for="password">${_('Password')}:</label>
212 <label for="password">${_('Password')}:</label>
213 </div>
213 </div>
214 <div class="input">
214 <div class="input">
215 ${h.password('password',class_='focus')}
215 ${h.password('password',class_='focus')}
216 </div>
216 </div>
217
217
218 </div>
218 </div>
219 <div class="buttons">
219 <div class="buttons">
220 <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>
221 <div class="register">
221 <div class="register">
222 %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')():
223 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
223 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
224 %endif
224 %endif
225 </div>
225 </div>
226 <div class="submit">
226 <div class="submit">
227 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
227 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
228 </div>
228 </div>
229 </div>
229 </div>
230 </div>
230 </div>
231 </div>
231 </div>
232 ${h.end_form()}
232 ${h.end_form()}
233 %else:
233 %else:
234 <div class="links_left">
234 <div class="links_left">
235 <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>
236 <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>
237 <div class="email">${c.rhodecode_user.email}</div>
237 <div class="email">${c.rhodecode_user.email}</div>
238 </div>
238 </div>
239 <div class="links_right">
239 <div class="links_right">
240 <ol class="links">
240 <ol class="links">
241 <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>
242 <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>
243 <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>
244 </ol>
244 </ol>
245 </div>
245 </div>
246 %endif
246 %endif
247 </div>
247 </div>
248 </div>
248 </div>
249
249
250 </li>
250 </li>
251 </%def>
251 </%def>
252
252
253 <%def name="menu(current=None)">
253 <%def name="menu(current=None)">
254 <%
254 <%
255 def is_current(selected):
255 def is_current(selected):
256 if selected == current:
256 if selected == current:
257 return h.literal('class="current"')
257 return h.literal('class="current"')
258 %>
258 %>
259 <ul id="quick" class="horizontal-list">
259 <ul id="quick" class="horizontal-list">
260 <!-- repo switcher -->
260 <!-- repo switcher -->
261 <li ${is_current('repositories')}>
261 <li ${is_current('repositories')}>
262 <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')}">
263 ${_('Repositories')}
263 ${_('Repositories')}
264 </a>
264 </a>
265 <ul id="repo_switcher_list" class="repo_switcher">
265 <ul id="repo_switcher_list" class="repo_switcher">
266 <li>
266 <li>
267 <a href="#">${_('loading...')}</a>
267 <a href="#">${_('loading...')}</a>
268 </li>
268 </li>
269 </ul>
269 </ul>
270 </li>
270 </li>
271 ##ROOT MENU
271 ##ROOT MENU
272 %if c.rhodecode_user.username != 'default':
272 %if c.rhodecode_user.username != 'default':
273 <li ${is_current('journal')}>
273 <li ${is_current('journal')}>
274 <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')}">
275 ${_('Journal')}
275 ${_('Journal')}
276 </a>
276 </a>
277 </li>
277 </li>
278 %else:
278 %else:
279 <li ${is_current('journal')}>
279 <li ${is_current('journal')}>
280 <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')}">
281 ${_('Public journal')}
281 ${_('Public journal')}
282 </a>
282 </a>
283 </li>
283 </li>
284 %endif
284 %endif
285 <li ${is_current('search')}>
285 <li ${is_current('search')}>
286 <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')}">
287 ${_('Search')}
287 ${_('Search')}
288 </a>
288 </a>
289 </li>
289 </li>
290 % if h.HasPermissionAll('hg.admin')('access admin main page'):
290 % if h.HasPermissionAll('hg.admin')('access admin main page'):
291 <li ${is_current('admin')}>
291 <li ${is_current('admin')}>
292 <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')}">
293 ${_('Admin')}
293 ${_('Admin')}
294 </a>
294 </a>
295 ${admin_menu()}
295 ${admin_menu()}
296 </li>
296 </li>
297 % elif c.rhodecode_user.groups_admin:
297 % elif c.rhodecode_user.groups_admin:
298 <li ${is_current('admin')}>
298 <li ${is_current('admin')}>
299 <a class="menu_link admin childs" title="${_('Admin')}">
299 <a class="menu_link admin childs" title="${_('Admin')}">
300 ${_('Admin')}
300 ${_('Admin')}
301 </a>
301 </a>
302 ${admin_menu_simple()}
302 ${admin_menu_simple()}
303 </li>
303 </li>
304 % endif
304 % endif
305 ${usermenu()}
305 ${usermenu()}
306 <script type="text/javascript">
306 <script type="text/javascript">
307 YUE.on('repo_switcher','mouseover',function(){
307 YUE.on('repo_switcher','mouseover',function(){
308 var target = 'q_filter_rs';
308 var target = 'q_filter_rs';
309 var qfilter_activate = function(){
309 var qfilter_activate = function(){
310 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
310 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
311 var func = function(node){
311 var func = function(node){
312 return node.parentNode;
312 return node.parentNode;
313 }
313 }
314 q_filter(target,nodes,func);
314 q_filter(target,nodes,func);
315 }
315 }
316
316
317 var loaded = YUD.hasClass('repo_switcher','loaded');
317 var loaded = YUD.hasClass('repo_switcher','loaded');
318 if(!loaded){
318 if(!loaded){
319 YUD.addClass('repo_switcher','loaded');
319 YUD.addClass('repo_switcher','loaded');
320 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
320 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
321 function(o){qfilter_activate();YUD.get(target).focus()},
321 function(o){qfilter_activate();YUD.get(target).focus()},
322 function(o){YUD.removeClass('repo_switcher','loaded');}
322 function(o){YUD.removeClass('repo_switcher','loaded');}
323 ,null);
323 ,null);
324 }else{
324 }else{
325 YUD.get(target).focus();
325 YUD.get(target).focus();
326 }
326 }
327 return false;
327 return false;
328 });
328 });
329
329
330 YUE.on('header-dd', 'click',function(e){
330 YUE.on('header-dd', 'click',function(e){
331 YUD.addClass('header-inner', 'hover');
331 YUD.addClass('header-inner', 'hover');
332 YUD.addClass('content', 'hover');
332 YUD.addClass('content', 'hover');
333 });
333 });
334
334
335 </script>
335 </script>
336 </%def>
336 </%def>
General Comments 0
You need to be logged in to leave comments. Login now