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