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