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