##// END OF EJS Templates
show link to usergroups if we have a create usergroup permission
marcink -
r3790:1aee8b0c beta
parent child Browse files
Show More
@@ -1,340 +1,341 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 ${_('Server instance: %s') % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}
42 ${_('Server instance: %s') % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}
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 &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
46 &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
47 &ndash; <a href="${h.url('bugtracker')}">${_('Report a bug')}</a>
47 &ndash; <a href="${h.url('bugtracker')}">${_('Report a bug')}</a>
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(repository_groups=None, user_groups=None)">
80 <%def name="admin_menu_simple(repository_groups=None, user_groups=None)">
81 <ul>
81 <ul>
82 %if repository_groups:
82 %if repository_groups:
83 <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
83 <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
84 %endif:
84 %endif:
85 %if user_groups:
85 %if user_groups:
86 <li>${h.link_to(_('User groups'),h.url('users_groups'),class_='groups')}</li>
86 <li>${h.link_to(_('User groups'),h.url('users_groups'),class_='groups')}</li>
87 %endif
87 %endif
88 </ul>
88 </ul>
89 </%def>
89 </%def>
90
90
91 <%def name="repo_context_bar(current=None)">
91 <%def name="repo_context_bar(current=None)">
92 <%
92 <%
93 def follow_class():
93 def follow_class():
94 if c.repository_following:
94 if c.repository_following:
95 return h.literal('following')
95 return h.literal('following')
96 else:
96 else:
97 return h.literal('follow')
97 return h.literal('follow')
98 %>
98 %>
99 <%
99 <%
100 def is_current(selected):
100 def is_current(selected):
101 if selected == current:
101 if selected == current:
102 return h.literal('class="current"')
102 return h.literal('class="current"')
103 %>
103 %>
104
104
105 <!--- CONTEXT BAR -->
105 <!--- CONTEXT BAR -->
106 <div id="context-bar" class="box">
106 <div id="context-bar" class="box">
107 <div id="breadcrumbs">
107 <div id="breadcrumbs">
108 ${h.link_to(_(u'Repositories'),h.url('home'))}
108 ${h.link_to(_(u'Repositories'),h.url('home'))}
109 &raquo;
109 &raquo;
110 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
110 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
111 </div>
111 </div>
112 <ul id="context-pages" class="horizontal-list">
112 <ul id="context-pages" class="horizontal-list">
113 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
113 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
114 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li>
114 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li>
115 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
115 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
116 <li ${is_current('switch-to')}>
116 <li ${is_current('switch-to')}>
117 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
117 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
118 <ul id="switch_to_list_2" class="switch_to submenu">
118 <ul id="switch_to_list_2" class="switch_to submenu">
119 <li><a href="#">${_('loading...')}</a></li>
119 <li><a href="#">${_('loading...')}</a></li>
120 </ul>
120 </ul>
121 </li>
121 </li>
122 <li ${is_current('options')}>
122 <li ${is_current('options')}>
123 <a href="#" class="dropdown options"></span>${_('Options')}</a>
123 <a href="#" class="dropdown options"></span>${_('Options')}</a>
124 <ul>
124 <ul>
125 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
125 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
126 <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
126 <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
127 %endif
127 %endif
128 %if c.rhodecode_db_repo.fork:
128 %if c.rhodecode_db_repo.fork:
129 <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>
129 <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>
130 %endif
130 %endif
131 <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
131 <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
132
132
133 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
133 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
134 %if c.rhodecode_db_repo.locked[0]:
134 %if c.rhodecode_db_repo.locked[0]:
135 <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
135 <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
136 %else:
136 %else:
137 <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
137 <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
138 %endif
138 %endif
139 %endif
139 %endif
140 ## TODO: this check feels wrong, it would be better to have a check for permissions
140 ## TODO: this check feels wrong, it would be better to have a check for permissions
141 ## also it feels like a job for the controller
141 ## also it feels like a job for the controller
142 %if c.rhodecode_user.username != 'default':
142 %if c.rhodecode_user.username != 'default':
143 <li>
143 <li>
144 <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
144 <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
145 <span class="show-follow">${_('Follow')}</span>
145 <span class="show-follow">${_('Follow')}</span>
146 <span class="show-following">${_('Unfollow')}</span>
146 <span class="show-following">${_('Unfollow')}</span>
147 </a>
147 </a>
148 </li>
148 </li>
149 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
149 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
150 %if h.is_hg(c.rhodecode_repo):
150 %if h.is_hg(c.rhodecode_repo):
151 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li>
151 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li>
152 %endif
152 %endif
153 %endif
153 %endif
154 </ul>
154 </ul>
155 </li>
155 </li>
156 <li ${is_current('showpullrequest')}>
156 <li ${is_current('showpullrequest')}>
157 <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')}
157 <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')}
158 %if c.repository_pull_requests:
158 %if c.repository_pull_requests:
159 <span>${c.repository_pull_requests}</span>
159 <span>${c.repository_pull_requests}</span>
160 %endif
160 %endif
161 </a>
161 </a>
162 </li>
162 </li>
163 </ul>
163 </ul>
164 </div>
164 </div>
165 <script type="text/javascript">
165 <script type="text/javascript">
166 YUE.on('branch_tag_switcher_2','mouseover',function(){
166 YUE.on('branch_tag_switcher_2','mouseover',function(){
167 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
167 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
168 if(!loaded){
168 if(!loaded){
169 YUD.addClass('branch_tag_switcher_2','loaded');
169 YUD.addClass('branch_tag_switcher_2','loaded');
170 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2',
170 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2',
171 function(o){},
171 function(o){},
172 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
172 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
173 ,null);
173 ,null);
174 }
174 }
175 return false;
175 return false;
176 });
176 });
177 </script>
177 </script>
178 <!--- END CONTEXT BAR -->
178 <!--- END CONTEXT BAR -->
179 </%def>
179 </%def>
180
180
181 <%def name="usermenu()">
181 <%def name="usermenu()">
182 ## USER MENU
182 ## USER MENU
183 <li>
183 <li>
184 <a class="menu_link childs" id="quick_login_link">
184 <a class="menu_link childs" id="quick_login_link">
185 <span class="icon">
185 <span class="icon">
186 <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar">
186 <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar">
187 </span>
187 </span>
188 %if c.rhodecode_user.username != 'default':
188 %if c.rhodecode_user.username != 'default':
189 <span class="menu_link_user">${c.rhodecode_user.username}</span>
189 <span class="menu_link_user">${c.rhodecode_user.username}</span>
190 %if c.unread_notifications != 0:
190 %if c.unread_notifications != 0:
191 <span class="menu_link_notifications">${c.unread_notifications}</span>
191 <span class="menu_link_notifications">${c.unread_notifications}</span>
192 %endif
192 %endif
193 %else:
193 %else:
194 <span>${_('Not logged in')}</span>
194 <span>${_('Not logged in')}</span>
195 %endif
195 %endif
196 </a>
196 </a>
197
197
198 <div class="user-menu">
198 <div class="user-menu">
199 <div id="quick_login">
199 <div id="quick_login">
200 %if c.rhodecode_user.username == 'default':
200 %if c.rhodecode_user.username == 'default':
201 <h4>${_('Login to your account')}</h4>
201 <h4>${_('Login to your account')}</h4>
202 ${h.form(h.url('login_home',came_from=h.url.current()))}
202 ${h.form(h.url('login_home',came_from=h.url.current()))}
203 <div class="form">
203 <div class="form">
204 <div class="fields">
204 <div class="fields">
205 <div class="field">
205 <div class="field">
206 <div class="label">
206 <div class="label">
207 <label for="username">${_('Username')}:</label>
207 <label for="username">${_('Username')}:</label>
208 </div>
208 </div>
209 <div class="input">
209 <div class="input">
210 ${h.text('username',class_='focus')}
210 ${h.text('username',class_='focus')}
211 </div>
211 </div>
212
212
213 </div>
213 </div>
214 <div class="field">
214 <div class="field">
215 <div class="label">
215 <div class="label">
216 <label for="password">${_('Password')}:</label>
216 <label for="password">${_('Password')}:</label>
217 </div>
217 </div>
218 <div class="input">
218 <div class="input">
219 ${h.password('password',class_='focus')}
219 ${h.password('password',class_='focus')}
220 </div>
220 </div>
221
221
222 </div>
222 </div>
223 <div class="buttons">
223 <div class="buttons">
224 <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
224 <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
225 <div class="register">
225 <div class="register">
226 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
226 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
227 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
227 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
228 %endif
228 %endif
229 </div>
229 </div>
230 <div class="submit">
230 <div class="submit">
231 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
231 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
232 </div>
232 </div>
233 </div>
233 </div>
234 </div>
234 </div>
235 </div>
235 </div>
236 ${h.end_form()}
236 ${h.end_form()}
237 %else:
237 %else:
238 <div class="links_left">
238 <div class="links_left">
239 <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
239 <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
240 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
240 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
241 <div class="email">${c.rhodecode_user.email}</div>
241 <div class="email">${c.rhodecode_user.email}</div>
242 </div>
242 </div>
243 <div class="links_right">
243 <div class="links_right">
244 <ol class="links">
244 <ol class="links">
245 <li><a href="${h.url('notifications')}">${_('Notifications')}: ${c.unread_notifications}</a></li>
245 <li><a href="${h.url('notifications')}">${_('Notifications')}: ${c.unread_notifications}</a></li>
246 <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li>
246 <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li>
247 <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
247 <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
248 </ol>
248 </ol>
249 </div>
249 </div>
250 %endif
250 %endif
251 </div>
251 </div>
252 </div>
252 </div>
253
253
254 </li>
254 </li>
255 </%def>
255 </%def>
256
256
257 <%def name="menu(current=None)">
257 <%def name="menu(current=None)">
258 <%
258 <%
259 def is_current(selected):
259 def is_current(selected):
260 if selected == current:
260 if selected == current:
261 return h.literal('class="current"')
261 return h.literal('class="current"')
262 %>
262 %>
263 <ul id="quick" class="horizontal-list">
263 <ul id="quick" class="horizontal-list">
264 <!-- repo switcher -->
264 <!-- repo switcher -->
265 <li ${is_current('repositories')}>
265 <li ${is_current('repositories')}>
266 <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}">
266 <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}">
267 ${_('Repositories')}
267 ${_('Repositories')}
268 </a>
268 </a>
269 <ul id="repo_switcher_list" class="repo_switcher">
269 <ul id="repo_switcher_list" class="repo_switcher">
270 <li>
270 <li>
271 <a href="#">${_('loading...')}</a>
271 <a href="#">${_('loading...')}</a>
272 </li>
272 </li>
273 </ul>
273 </ul>
274 </li>
274 </li>
275 ##ROOT MENU
275 ##ROOT MENU
276 %if c.rhodecode_user.username != 'default':
276 %if c.rhodecode_user.username != 'default':
277 <li ${is_current('journal')}>
277 <li ${is_current('journal')}>
278 <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}">
278 <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}">
279 ${_('Journal')}
279 ${_('Journal')}
280 </a>
280 </a>
281 </li>
281 </li>
282 %else:
282 %else:
283 <li ${is_current('journal')}>
283 <li ${is_current('journal')}>
284 <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}">
284 <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}">
285 ${_('Public journal')}
285 ${_('Public journal')}
286 </a>
286 </a>
287 </li>
287 </li>
288 %endif
288 %endif
289 <li ${is_current('search')}>
289 <li ${is_current('search')}>
290 <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}">
290 <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}">
291 ${_('Search')}
291 ${_('Search')}
292 </a>
292 </a>
293 </li>
293 </li>
294 % if h.HasPermissionAll('hg.admin')('access admin main page'):
294 % if h.HasPermissionAll('hg.admin')('access admin main page'):
295 <li ${is_current('admin')}>
295 <li ${is_current('admin')}>
296 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
296 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
297 ${_('Admin')}
297 ${_('Admin')}
298 </a>
298 </a>
299 ${admin_menu()}
299 ${admin_menu()}
300 </li>
300 </li>
301 % elif c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin:
301 % elif c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin:
302 <li ${is_current('admin')}>
302 <li ${is_current('admin')}>
303 <a class="menu_link admin childs" title="${_('Admin')}">
303 <a class="menu_link admin childs" title="${_('Admin')}">
304 ${_('Admin')}
304 ${_('Admin')}
305 </a>
305 </a>
306 ${admin_menu_simple(c.rhodecode_user.repository_groups_admin, c.rhodecode_user.user_groups_admin)}
306 ${admin_menu_simple(c.rhodecode_user.repository_groups_admin,
307 c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
307 </li>
308 </li>
308 % endif
309 % endif
309 ${usermenu()}
310 ${usermenu()}
310 <script type="text/javascript">
311 <script type="text/javascript">
311 YUE.on('repo_switcher','mouseover',function(){
312 YUE.on('repo_switcher','mouseover',function(){
312 var target = 'q_filter_rs';
313 var target = 'q_filter_rs';
313 var qfilter_activate = function(){
314 var qfilter_activate = function(){
314 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
315 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
315 var func = function(node){
316 var func = function(node){
316 return node.parentNode;
317 return node.parentNode;
317 }
318 }
318 q_filter(target,nodes,func);
319 q_filter(target,nodes,func);
319 }
320 }
320
321
321 var loaded = YUD.hasClass('repo_switcher','loaded');
322 var loaded = YUD.hasClass('repo_switcher','loaded');
322 if(!loaded){
323 if(!loaded){
323 YUD.addClass('repo_switcher','loaded');
324 YUD.addClass('repo_switcher','loaded');
324 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
325 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
325 function(o){qfilter_activate();YUD.get(target).focus()},
326 function(o){qfilter_activate();YUD.get(target).focus()},
326 function(o){YUD.removeClass('repo_switcher','loaded');}
327 function(o){YUD.removeClass('repo_switcher','loaded');}
327 ,null);
328 ,null);
328 }else{
329 }else{
329 YUD.get(target).focus();
330 YUD.get(target).focus();
330 }
331 }
331 return false;
332 return false;
332 });
333 });
333
334
334 YUE.on('header-dd', 'click',function(e){
335 YUE.on('header-dd', 'click',function(e){
335 YUD.addClass('header-inner', 'hover');
336 YUD.addClass('header-inner', 'hover');
336 YUD.addClass('content', 'hover');
337 YUD.addClass('content', 'hover');
337 });
338 });
338
339
339 </script>
340 </script>
340 </%def>
341 </%def>
General Comments 0
You need to be logged in to leave comments. Login now