##// END OF EJS Templates
login: add link when using external auth to make it easier to login using oauth providers.
marcink -
r1747:35014bc9 default
parent child Browse files
Show More
@@ -1,601 +1,602 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="root.mako"/>
3 3
4 4 <div class="outerwrapper">
5 5 <!-- HEADER -->
6 6 <div class="header">
7 7 <div id="header-inner" class="wrapper">
8 8 <div id="logo">
9 9 <div class="logo-wrapper">
10 10 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
11 11 </div>
12 12 %if c.rhodecode_name:
13 13 <div class="branding">- ${h.branding(c.rhodecode_name)}</div>
14 14 %endif
15 15 </div>
16 16 <!-- MENU BAR NAV -->
17 17 ${self.menu_bar_nav()}
18 18 <!-- END MENU BAR NAV -->
19 19 </div>
20 20 </div>
21 21 ${self.menu_bar_subnav()}
22 22 <!-- END HEADER -->
23 23
24 24 <!-- CONTENT -->
25 25 <div id="content" class="wrapper">
26 26
27 27 <rhodecode-toast id="notifications"></rhodecode-toast>
28 28
29 29 <div class="main">
30 30 ${next.main()}
31 31 </div>
32 32 </div>
33 33 <!-- END CONTENT -->
34 34
35 35 </div>
36 36 <!-- FOOTER -->
37 37 <div id="footer">
38 38 <div id="footer-inner" class="title wrapper">
39 39 <div>
40 40 <p class="footer-link-right">
41 41 % if c.visual.show_version:
42 42 RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
43 43 % endif
44 44 &copy; 2010-${h.datetime.today().year}, <a href="${h.route_url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved.
45 45 % if c.visual.rhodecode_support_url:
46 46 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
47 47 % endif
48 48 </p>
49 49 <% sid = 'block' if request.GET.get('showrcid') else 'none' %>
50 50 <p class="server-instance" style="display:${sid}">
51 51 ## display hidden instance ID if specially defined
52 52 % if c.rhodecode_instanceid:
53 53 ${_('RhodeCode instance id: %s') % c.rhodecode_instanceid}
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
64 64 <%def name="menu_bar_subnav()">
65 65 </%def>
66 66
67 67 <%def name="breadcrumbs(class_='breadcrumbs')">
68 68 <div class="${class_}">
69 69 ${self.breadcrumbs_links()}
70 70 </div>
71 71 </%def>
72 72
73 73 <%def name="admin_menu()">
74 74 <ul class="admin_menu submenu">
75 75 <li><a href="${h.url('admin_home')}">${_('Admin journal')}</a></li>
76 76 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
77 77 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
78 78 <li><a href="${h.route_path('users')}">${_('Users')}</a></li>
79 79 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
80 80 <li><a href="${h.url('admin_permissions_application')}">${_('Permissions')}</a></li>
81 81 <li><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
82 82 <li><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
83 83 <li><a href="${h.url('admin_defaults_repositories')}">${_('Defaults')}</a></li>
84 84 <li class="last"><a href="${h.url('admin_settings')}">${_('Settings')}</a></li>
85 85 </ul>
86 86 </%def>
87 87
88 88
89 89 <%def name="dt_info_panel(elements)">
90 90 <dl class="dl-horizontal">
91 91 %for dt, dd, title, show_items in elements:
92 92 <dt>${dt}:</dt>
93 93 <dd title="${title}">
94 94 %if callable(dd):
95 95 ## allow lazy evaluation of elements
96 96 ${dd()}
97 97 %else:
98 98 ${dd}
99 99 %endif
100 100 %if show_items:
101 101 <span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span>
102 102 %endif
103 103 </dd>
104 104
105 105 %if show_items:
106 106 <div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none">
107 107 %for item in show_items:
108 108 <dt></dt>
109 109 <dd>${item}</dd>
110 110 %endfor
111 111 </div>
112 112 %endif
113 113
114 114 %endfor
115 115 </dl>
116 116 </%def>
117 117
118 118
119 119 <%def name="gravatar(email, size=16)">
120 120 <%
121 121 if (size > 16):
122 122 gravatar_class = 'gravatar gravatar-large'
123 123 else:
124 124 gravatar_class = 'gravatar'
125 125 %>
126 126 <%doc>
127 127 TODO: johbo: For now we serve double size images to make it smooth
128 128 for retina. This is how it worked until now. Should be replaced
129 129 with a better solution at some point.
130 130 </%doc>
131 131 <img class="${gravatar_class}" src="${h.gravatar_url(email, size * 2)}" height="${size}" width="${size}">
132 132 </%def>
133 133
134 134
135 135 <%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
136 136 <% email = h.email_or_none(contact) %>
137 137 <div class="rc-user tooltip" title="${h.author_string(email)}">
138 138 ${self.gravatar(email, size)}
139 139 <span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span>
140 140 </div>
141 141 </%def>
142 142
143 143
144 144 ## admin menu used for people that have some admin resources
145 145 <%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)">
146 146 <ul class="submenu">
147 147 %if repositories:
148 148 <li class="local-admin-repos"><a href="${h.url('repos')}">${_('Repositories')}</a></li>
149 149 %endif
150 150 %if repository_groups:
151 151 <li class="local-admin-repo-groups"><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
152 152 %endif
153 153 %if user_groups:
154 154 <li class="local-admin-user-groups"><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
155 155 %endif
156 156 </ul>
157 157 </%def>
158 158
159 159 <%def name="repo_page_title(repo_instance)">
160 160 <div class="title-content">
161 161 <div class="title-main">
162 162 ## SVN/HG/GIT icons
163 163 %if h.is_hg(repo_instance):
164 164 <i class="icon-hg"></i>
165 165 %endif
166 166 %if h.is_git(repo_instance):
167 167 <i class="icon-git"></i>
168 168 %endif
169 169 %if h.is_svn(repo_instance):
170 170 <i class="icon-svn"></i>
171 171 %endif
172 172
173 173 ## public/private
174 174 %if repo_instance.private:
175 175 <i class="icon-repo-private"></i>
176 176 %else:
177 177 <i class="icon-repo-public"></i>
178 178 %endif
179 179
180 180 ## repo name with group name
181 181 ${h.breadcrumb_repo_link(c.rhodecode_db_repo)}
182 182
183 183 </div>
184 184
185 185 ## FORKED
186 186 %if repo_instance.fork:
187 187 <p>
188 188 <i class="icon-code-fork"></i> ${_('Fork of')}
189 189 <a href="${h.url('summary_home',repo_name=repo_instance.fork.repo_name)}">${repo_instance.fork.repo_name}</a>
190 190 </p>
191 191 %endif
192 192
193 193 ## IMPORTED FROM REMOTE
194 194 %if repo_instance.clone_uri:
195 195 <p>
196 196 <i class="icon-code-fork"></i> ${_('Clone from')}
197 197 <a href="${h.url(h.safe_str(h.hide_credentials(repo_instance.clone_uri)))}">${h.hide_credentials(repo_instance.clone_uri)}</a>
198 198 </p>
199 199 %endif
200 200
201 201 ## LOCKING STATUS
202 202 %if repo_instance.locked[0]:
203 203 <p class="locking_locked">
204 204 <i class="icon-repo-lock"></i>
205 205 ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}}
206 206 </p>
207 207 %elif repo_instance.enable_locking:
208 208 <p class="locking_unlocked">
209 209 <i class="icon-repo-unlock"></i>
210 210 ${_('Repository not locked. Pull repository to lock it.')}
211 211 </p>
212 212 %endif
213 213
214 214 </div>
215 215 </%def>
216 216
217 217 <%def name="repo_menu(active=None)">
218 218 <%
219 219 def is_active(selected):
220 220 if selected == active:
221 221 return "active"
222 222 %>
223 223
224 224 <!--- CONTEXT BAR -->
225 225 <div id="context-bar">
226 226 <div class="wrapper">
227 227 <ul id="context-pages" class="horizontal-list navigation">
228 228 <li class="${is_active('summary')}"><a class="menulink" href="${h.url('summary_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li>
229 229 <li class="${is_active('changelog')}"><a class="menulink" href="${h.url('changelog_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
230 230 <li class="${is_active('files')}"><a class="menulink" href="${h.url('files_home', repo_name=c.repo_name, revision=c.rhodecode_db_repo.landing_rev[1])}"><div class="menulabel">${_('Files')}</div></a></li>
231 231 <li class="${is_active('compare')}">
232 232 <a class="menulink" href="${h.url('compare_home',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a>
233 233 </li>
234 234 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
235 235 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
236 236 <li class="${is_active('showpullrequest')}">
237 237 <a class="menulink" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests for %s') % c.repo_name}">
238 238 %if c.repository_pull_requests:
239 239 <span class="pr_notifications">${c.repository_pull_requests}</span>
240 240 %endif
241 241 <div class="menulabel">${_('Pull Requests')}</div>
242 242 </a>
243 243 </li>
244 244 %endif
245 245 <li class="${is_active('options')}">
246 246 <a class="menulink" href="#" class="dropdown"><div class="menulabel">${_('Options')} <div class="show_more"></div></div></a>
247 247 <ul class="submenu">
248 248 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
249 249 <li><a href="${h.route_path('edit_repo',repo_name=c.repo_name)}">${_('Settings')}</a></li>
250 250 %endif
251 251 %if c.rhodecode_db_repo.fork:
252 252 <li><a href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,source_ref_type=c.rhodecode_db_repo.landing_rev[0],source_ref=c.rhodecode_db_repo.landing_rev[1], target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], merge=1)}">
253 253 ${_('Compare fork')}</a></li>
254 254 %endif
255 255
256 256 <li><a href="${h.route_path('search_repo',repo_name=c.repo_name)}">${_('Search')}</a></li>
257 257
258 258 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
259 259 %if c.rhodecode_db_repo.locked[0]:
260 260 <li><a class="locking_del" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
261 261 %else:
262 262 <li><a class="locking_add" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li>
263 263 %endif
264 264 %endif
265 265 %if c.rhodecode_user.username != h.DEFAULT_USER:
266 266 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
267 267 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}">${_('Fork')}</a></li>
268 268 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li>
269 269 %endif
270 270 %endif
271 271 </ul>
272 272 </li>
273 273 </ul>
274 274 </div>
275 275 <div class="clear"></div>
276 276 </div>
277 277 <!--- END CONTEXT BAR -->
278 278
279 279 </%def>
280 280
281 281 <%def name="usermenu(active=False)">
282 282 ## USER MENU
283 283 <li id="quick_login_li" class="${'active' if active else ''}">
284 284 <a id="quick_login_link" class="menulink childs">
285 285 ${gravatar(c.rhodecode_user.email, 20)}
286 286 <span class="user">
287 287 %if c.rhodecode_user.username != h.DEFAULT_USER:
288 288 <span class="menu_link_user">${c.rhodecode_user.username}</span><div class="show_more"></div>
289 289 %else:
290 290 <span>${_('Sign in')}</span>
291 291 %endif
292 292 </span>
293 293 </a>
294 294
295 295 <div class="user-menu submenu">
296 296 <div id="quick_login">
297 297 %if c.rhodecode_user.username == h.DEFAULT_USER:
298 298 <h4>${_('Sign in to your account')}</h4>
299 299 ${h.form(h.route_path('login', _query={'came_from': h.url.current()}), needs_csrf_token=False)}
300 300 <div class="form form-vertical">
301 301 <div class="fields">
302 302 <div class="field">
303 303 <div class="label">
304 304 <label for="username">${_('Username')}:</label>
305 305 </div>
306 306 <div class="input">
307 307 ${h.text('username',class_='focus',tabindex=1)}
308 308 </div>
309 309
310 310 </div>
311 311 <div class="field">
312 312 <div class="label">
313 313 <label for="password">${_('Password')}:</label>
314 314 %if h.HasPermissionAny('hg.password_reset.enabled')():
315 315 <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'), class_='pwd_reset')}</span>
316 316 %endif
317 317 </div>
318 318 <div class="input">
319 319 ${h.password('password',class_='focus',tabindex=2)}
320 320 </div>
321 321 </div>
322 322 <div class="buttons">
323 323 <div class="register">
324 324 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
325 ${h.link_to(_("Don't have an account ?"),h.route_path('register'))}
325 ${h.link_to(_("Don't have an account?"),h.route_path('register'))} <br/>
326 326 %endif
327 ${h.link_to(_("Using external auth? Login here."),h.route_path('login'))}
327 328 </div>
328 329 <div class="submit">
329 330 ${h.submit('sign_in',_('Sign In'),class_="btn btn-small",tabindex=3)}
330 331 </div>
331 332 </div>
332 333 </div>
333 334 </div>
334 335 ${h.end_form()}
335 336 %else:
336 337 <div class="">
337 338 <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
338 339 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
339 340 <div class="email">${c.rhodecode_user.email}</div>
340 341 </div>
341 342 <div class="">
342 343 <ol class="links">
343 344 <li>${h.link_to(_(u'My account'),h.route_path('my_account_profile'))}</li>
344 345 % if c.rhodecode_user.personal_repo_group:
345 346 <li>${h.link_to(_(u'My personal group'), h.url('repo_group_home', group_name=c.rhodecode_user.personal_repo_group.group_name))}</li>
346 347 % endif
347 348 <li class="logout">
348 349 ${h.secure_form(h.route_path('logout'))}
349 350 ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
350 351 ${h.end_form()}
351 352 </li>
352 353 </ol>
353 354 </div>
354 355 %endif
355 356 </div>
356 357 </div>
357 358 %if c.rhodecode_user.username != h.DEFAULT_USER:
358 359 <div class="pill_container">
359 360 % if c.unread_notifications == 0:
360 361 <a class="menu_link_notifications empty" href="${h.url('notifications')}">${c.unread_notifications}</a>
361 362 % else:
362 363 <a class="menu_link_notifications" href="${h.url('notifications')}">${c.unread_notifications}</a>
363 364 % endif
364 365 </div>
365 366 % endif
366 367 </li>
367 368 </%def>
368 369
369 370 <%def name="menu_items(active=None)">
370 371 <%
371 372 def is_active(selected):
372 373 if selected == active:
373 374 return "active"
374 375 return ""
375 376 %>
376 377 <ul id="quick" class="main_nav navigation horizontal-list">
377 378 <!-- repo switcher -->
378 379 <li class="${is_active('repositories')} repo_switcher_li has_select2">
379 380 <input id="repo_switcher" name="repo_switcher" type="hidden">
380 381 </li>
381 382
382 383 ## ROOT MENU
383 384 %if c.rhodecode_user.username != h.DEFAULT_USER:
384 385 <li class="${is_active('journal')}">
385 386 <a class="menulink" title="${_('Show activity journal')}" href="${h.url('journal')}">
386 387 <div class="menulabel">${_('Journal')}</div>
387 388 </a>
388 389 </li>
389 390 %else:
390 391 <li class="${is_active('journal')}">
391 392 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.url('public_journal')}">
392 393 <div class="menulabel">${_('Public journal')}</div>
393 394 </a>
394 395 </li>
395 396 %endif
396 397 <li class="${is_active('gists')}">
397 398 <a class="menulink childs" title="${_('Show Gists')}" href="${h.url('gists')}">
398 399 <div class="menulabel">${_('Gists')}</div>
399 400 </a>
400 401 </li>
401 402 <li class="${is_active('search')}">
402 403 <a class="menulink" title="${_('Search in repositories you have access to')}" href="${h.route_path('search')}">
403 404 <div class="menulabel">${_('Search')}</div>
404 405 </a>
405 406 </li>
406 407 % if h.HasPermissionAll('hg.admin')('access admin main page'):
407 408 <li class="${is_active('admin')}">
408 409 <a class="menulink childs" title="${_('Admin settings')}" href="#" onclick="return false;">
409 410 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
410 411 </a>
411 412 ${admin_menu()}
412 413 </li>
413 414 % elif c.rhodecode_user.repositories_admin or c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin:
414 415 <li class="${is_active('admin')}">
415 416 <a class="menulink childs" title="${_('Delegated Admin settings')}">
416 417 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
417 418 </a>
418 419 ${admin_menu_simple(c.rhodecode_user.repositories_admin,
419 420 c.rhodecode_user.repository_groups_admin,
420 421 c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
421 422 </li>
422 423 % endif
423 424 % if c.debug_style:
424 425 <li class="${is_active('debug_style')}">
425 426 <a class="menulink" title="${_('Style')}" href="${h.url('debug_style_home')}">
426 427 <div class="menulabel">${_('Style')}</div>
427 428 </a>
428 429 </li>
429 430 % endif
430 431 ## render extra user menu
431 432 ${usermenu(active=(active=='my_account'))}
432 433 </ul>
433 434
434 435 <script type="text/javascript">
435 436 var visual_show_public_icon = "${c.visual.show_public_icon}" == "True";
436 437
437 438 /*format the look of items in the list*/
438 439 var format = function(state, escapeMarkup){
439 440 if (!state.id){
440 441 return state.text; // optgroup
441 442 }
442 443 var obj_dict = state.obj;
443 444 var tmpl = '';
444 445
445 446 if(obj_dict && state.type == 'repo'){
446 447 if(obj_dict['repo_type'] === 'hg'){
447 448 tmpl += '<i class="icon-hg"></i> ';
448 449 }
449 450 else if(obj_dict['repo_type'] === 'git'){
450 451 tmpl += '<i class="icon-git"></i> ';
451 452 }
452 453 else if(obj_dict['repo_type'] === 'svn'){
453 454 tmpl += '<i class="icon-svn"></i> ';
454 455 }
455 456 if(obj_dict['private']){
456 457 tmpl += '<i class="icon-lock" ></i> ';
457 458 }
458 459 else if(visual_show_public_icon){
459 460 tmpl += '<i class="icon-unlock-alt"></i> ';
460 461 }
461 462 }
462 463 if(obj_dict && state.type == 'commit') {
463 464 tmpl += '<i class="icon-tag"></i>';
464 465 }
465 466 if(obj_dict && state.type == 'group'){
466 467 tmpl += '<i class="icon-folder-close"></i> ';
467 468 }
468 469 tmpl += escapeMarkup(state.text);
469 470 return tmpl;
470 471 };
471 472
472 473 var formatResult = function(result, container, query, escapeMarkup) {
473 474 return format(result, escapeMarkup);
474 475 };
475 476
476 477 var formatSelection = function(data, container, escapeMarkup) {
477 478 return format(data, escapeMarkup);
478 479 };
479 480
480 481 $("#repo_switcher").select2({
481 482 cachedDataSource: {},
482 483 minimumInputLength: 2,
483 484 placeholder: '<div class="menulabel">${_('Go to')} <div class="show_more"></div></div>',
484 485 dropdownAutoWidth: true,
485 486 formatResult: formatResult,
486 487 formatSelection: formatSelection,
487 488 containerCssClass: "repo-switcher",
488 489 dropdownCssClass: "repo-switcher-dropdown",
489 490 escapeMarkup: function(m){
490 491 // don't escape our custom placeholder
491 492 if(m.substr(0,23) == '<div class="menulabel">'){
492 493 return m;
493 494 }
494 495
495 496 return Select2.util.escapeMarkup(m);
496 497 },
497 498 query: $.debounce(250, function(query){
498 499 self = this;
499 500 var cacheKey = query.term;
500 501 var cachedData = self.cachedDataSource[cacheKey];
501 502
502 503 if (cachedData) {
503 504 query.callback({results: cachedData.results});
504 505 } else {
505 506 $.ajax({
506 507 url: pyroutes.url('goto_switcher_data'),
507 508 data: {'query': query.term},
508 509 dataType: 'json',
509 510 type: 'GET',
510 511 success: function(data) {
511 512 self.cachedDataSource[cacheKey] = data;
512 513 query.callback({results: data.results});
513 514 },
514 515 error: function(data, textStatus, errorThrown) {
515 516 alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText));
516 517 }
517 518 })
518 519 }
519 520 })
520 521 });
521 522
522 523 $("#repo_switcher").on('select2-selecting', function(e){
523 524 e.preventDefault();
524 525 window.location = e.choice.url;
525 526 });
526 527
527 528 </script>
528 529 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
529 530 </%def>
530 531
531 532 <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
532 533 <div class="modal-dialog">
533 534 <div class="modal-content">
534 535 <div class="modal-header">
535 536 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
536 537 <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
537 538 </div>
538 539 <div class="modal-body">
539 540 <div class="block-left">
540 541 <table class="keyboard-mappings">
541 542 <tbody>
542 543 <tr>
543 544 <th></th>
544 545 <th>${_('Site-wide shortcuts')}</th>
545 546 </tr>
546 547 <%
547 548 elems = [
548 549 ('/', 'Open quick search box'),
549 550 ('g h', 'Goto home page'),
550 551 ('g g', 'Goto my private gists page'),
551 552 ('g G', 'Goto my public gists page'),
552 553 ('n r', 'New repository page'),
553 554 ('n g', 'New gist page'),
554 555 ]
555 556 %>
556 557 %for key, desc in elems:
557 558 <tr>
558 559 <td class="keys">
559 560 <span class="key tag">${key}</span>
560 561 </td>
561 562 <td>${desc}</td>
562 563 </tr>
563 564 %endfor
564 565 </tbody>
565 566 </table>
566 567 </div>
567 568 <div class="block-left">
568 569 <table class="keyboard-mappings">
569 570 <tbody>
570 571 <tr>
571 572 <th></th>
572 573 <th>${_('Repositories')}</th>
573 574 </tr>
574 575 <%
575 576 elems = [
576 577 ('g s', 'Goto summary page'),
577 578 ('g c', 'Goto changelog page'),
578 579 ('g f', 'Goto files page'),
579 580 ('g F', 'Goto files page with file search activated'),
580 581 ('g p', 'Goto pull requests page'),
581 582 ('g o', 'Goto repository settings'),
582 583 ('g O', 'Goto repository permissions settings'),
583 584 ]
584 585 %>
585 586 %for key, desc in elems:
586 587 <tr>
587 588 <td class="keys">
588 589 <span class="key tag">${key}</span>
589 590 </td>
590 591 <td>${desc}</td>
591 592 </tr>
592 593 %endfor
593 594 </tbody>
594 595 </table>
595 596 </div>
596 597 </div>
597 598 <div class="modal-footer">
598 599 </div>
599 600 </div><!-- /.modal-content -->
600 601 </div><!-- /.modal-dialog -->
601 602 </div><!-- /.modal -->
General Comments 0
You need to be logged in to leave comments. Login now