##// END OF EJS Templates
it's safer to user user_id for IMC
it's safer to user user_id for IMC

File last commit:

r3422:b5ce7216 beta
r3487:b39cb4d4 beta
Show More
base.html
390 lines | 16.8 KiB | text/html | HtmlLexer
renamed project to rhodecode
r547 ## -*- coding: utf-8 -*-
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <%inherit file="root.html"/>
<!-- HEADER -->
Mads Kiilerich
header: don't use fixed position...
r3299 <div id="header-dd"></div>
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <div id="header">
Mads Kiilerich
header: don't use fixed position...
r3299 <div id="header-inner" class="title">
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <div id="logo">
<h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
</div>
<!-- MENU -->
${self.page_nav()}
<!-- END MENU -->
${self.body()}
</div>
White-space cleanup
r1888 </div>
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <!-- END HEADER -->
White-space cleanup
r1888
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <!-- CONTENT -->
White-space cleanup
r1888 <div id="content">
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <div class="flash_msg">
<% messages = h.flash.pop_messages() %>
% if messages:
<ul id="flash-messages">
% for message in messages:
<li class="${message.category}_msg">${message}</li>
% endfor
renamed project to rhodecode
r547 </ul>
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 % endif
White-space cleanup
r1888 </div>
<div id="main">
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 ${next.main()}
</div>
White-space cleanup
r1888 </div>
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <!-- END CONTENT -->
renamed project to rhodecode
r547
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <!-- FOOTER -->
<div id="footer">
beatify !
r1470 <div id="footer-inner" class="title">
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <div>
<p class="footer-link">
<a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
</p>
Mads Kiilerich
html: don't use tabs
r3197 <p class="footer-link-right">
<a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a>
${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
</p>
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 </div>
</div>
</div>
<!-- END FOOTER -->
renamed project to rhodecode
r547
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 ### MAKO DEFS ###
<%def name="page_nav()">
${self.menu()}
</%def>
renamed project to rhodecode
r547
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157 <%def name="breadcrumbs()">
<div class="breadcrumbs">
${self.breadcrumbs_links()}
</div>
renamed project to rhodecode
r547 </%def>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <%def name="usermenu()">
Mads Kiilerich
top menu: show user menu when hovering instead of using js - like other menus
r3206 ## USER MENU
Mads Kiilerich
top menu: show user menu as a menu option like others, now also with login name...
r3205 <li>
make gravatar icon little bit bigger, re-use same img src like on other menu items,...
r3207 <a class="menu_link" id="quick_login_link">
<span class="icon" style="padding:5px 5px 0px 5px">
<img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar">
</span>
%if c.rhodecode_user.username != 'default':
<span class="menu_link_user">${c.rhodecode_user.username}</span>
%if c.unread_notifications != 0:
<span class="menu_link_notifications">${c.unread_notifications}</span>
%endif
%else:
<span>${_('Not logged in')}</span>
%endif
</a>
Mads Kiilerich
top menu: show user menu as a menu option like others, now also with login name...
r3205
removed upper menu to save space and did little rip off menu similar to G+
r1926 <div class="user-menu">
Mads Kiilerich
top menu: show user menu when hovering instead of using js - like other menus
r3206 <div id="quick_login">
removed upper menu to save space and did little rip off menu similar to G+
r1926 %if c.rhodecode_user.username == 'default':
<h4>${_('Login to your account')}</h4>
${h.form(h.url('login_home',came_from=h.url.current()))}
<div class="form">
<div class="fields">
<div class="field">
<div class="label">
<label for="username">${_('Username')}:</label>
</div>
<div class="input">
fixed login input sizes
r3422 ${h.text('username',class_='focus')}
removed upper menu to save space and did little rip off menu similar to G+
r1926 </div>
white space cleanup
r1944
removed upper menu to save space and did little rip off menu similar to G+
r1926 </div>
<div class="field">
<div class="label">
<label for="password">${_('Password')}:</label>
</div>
<div class="input">
fixed login input sizes
r3422 ${h.password('password',class_='focus')}
removed upper menu to save space and did little rip off menu similar to G+
r1926 </div>
white space cleanup
r1944
removed upper menu to save space and did little rip off menu similar to G+
r1926 </div>
<div class="buttons">
<div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
<div class="register">
%if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
${h.link_to(_("Don't have an account ?"),h.url('register'))}
%endif
</div>
<div class="submit">
user menu fixes
r1935 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
removed upper menu to save space and did little rip off menu similar to G+
r1926 </div>
</div>
</div>
</div>
${h.end_form()}
%else:
<div class="links_left">
#344 optional firstname lastname on user creation...
r1950 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <div class="email">${c.rhodecode_user.email}</div>
<div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
Mads Kiilerich
user menu: call 'notifications' for what it is in the rest of the system - not 'inbox'
r3280 <div class="notifications"><a href="${h.url('notifications')}">${_('Notifications')}</a></div>
make unread also a link, constantly was clicking that...
r3297 <div class="unread"><a href="${h.url('notifications')}">${_('Unread')}: ${c.unread_notifications}</a></div>
removed upper menu to save space and did little rip off menu similar to G+
r1926 </div>
<div class="links_right">
<ol class="links">
<li>${h.link_to(_(u'Home'),h.url('home'))}</li>
Aras Pranckevicius
quick login: add link to Journal to popup menu
r1975 <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li>
<li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
</ol>
</div>
%endif
white space cleanup
r1944 </div>
Mads Kiilerich
top menu: show user menu when hovering instead of using js - like other menus
r3206 </div>
</li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 </%def>
rewrote templates, all small pages will inherit from root for easier changes and controll
r1157
renamed project to rhodecode
r547 <%def name="menu(current=None)">
Mads Kiilerich
html: don't use tabs
r3197 <%
def is_current(selected):
if selected == current:
return h.literal('class="current"')
%>
Implements #734 repo switcher should be available in all views
r3209 <ul id="quick">
<!-- repo switcher -->
Mads Kiilerich
top menu: 'Repositories' is really also a 'Home' button...
r3282 <li ${is_current('home')}>
<a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}">
Implements #734 repo switcher should be available in all views
r3209 <span class="icon">
<img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" />
</span>
<span>${_('Repositories')}</span>
</a>
<ul id="repo_switcher_list" class="repo_switcher">
<li>
<a href="#">${_('loading...')}</a>
</li>
</ul>
</li>
whitespace cleanup
r3216 ## we render this menu only not for those pages
Set current pages indication for search and journal
r3208 %if current not in ['home','admin', 'search', 'journal']:
Mads Kiilerich
html: random indentation fixes
r3198 ##REGULAR MENU
Implements #734 repo switcher should be available in all views
r3209 <li ${is_current('summary')}>
Mads Kiilerich
top menu: make 'alt' texts / tool tips more descriptive
r3287 <a class="menu_link" title="${_('Summary page')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
Implements #734 repo switcher should be available in all views
r3209 <span class="icon">
<img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
</span>
<span>${_('Summary')}</span>
</a>
</li>
<li ${is_current('changelog')}>
Mads Kiilerich
top menu: make 'alt' texts / tool tips more descriptive
r3287 <a class="menu_link" title="${_('Changeset list')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
Implements #734 repo switcher should be available in all views
r3209 <span class="icon">
<img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
</span>
<span>${_('Changelog')}</span>
</a>
</li>
<li ${is_current('switch_to')}>
<a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#">
<span class="icon">
<img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" />
</span>
<span>${_('Switch to')}</span>
</a>
<ul id="switch_to_list" class="switch_to">
<li><a href="#">${_('loading...')}</a></li>
</ul>
</li>
<li ${is_current('files')}>
Mads Kiilerich
top menu: make 'alt' texts / tool tips more descriptive
r3287 <a class="menu_link" title="${_('Show repository content')}" href="${h.url('files_home',repo_name=c.repo_name)}">
Implements #734 repo switcher should be available in all views
r3209 <span class="icon">
<img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
</span>
<span>${_('Files')}</span>
</a>
</li>
<li ${is_current('options')}>
<a class="menu_link" title="${_('Options')}" href="#">
<span class="icon">
<img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" />
</span>
<span>${_('Options')}</span>
</a>
<ul>
%if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
%if h.HasPermissionAll('hg.admin')('access settings on repository'):
<li>${h.link_to(_('repository settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
%else:
<li>${h.link_to(_('repository settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
%endif
%endif
White-space cleanup
r1888
Implements #734 repo switcher should be available in all views
r3209 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
%if h.is_hg(c.rhodecode_repo):
<li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li>
%endif
%if c.rhodecode_db_repo.fork:
Mads Kiilerich
compare: swap org and other when they refer to different repos, ie are pull request style...
r3322 <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'),class_='compare_request')}</li>
Implements #734 repo switcher should be available in all views
r3209 %endif
move old shortlog as lightweight changelog into option, it's still useful to have since it's less resources to generate data for it.
r3290 <li>${h.link_to(_('lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
Mads Kiilerich
search: repo search is a repo thing - show it that way in ui and url
r3289 <li>${h.link_to(_('search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
Add quick toggle link for locking for users with write or admin permissions
r2833
Implements #734 repo switcher should be available in all views
r3209 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
%if c.rhodecode_db_repo.locked[0]:
<li>${h.link_to(_('unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
%else:
<li>${h.link_to(_('lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
%endif
%endif
White-space cleanup
r1888
Implements #734 repo switcher should be available in all views
r3209 % if h.HasPermissionAll('hg.admin')('access admin main page'):
Show admin dropdown for users who are admin of repo groups
r3371 <li>
${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
<%def name="admin_menu()">
<ul>
<li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal')}</li>
<li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
Mads Kiilerich
"Users groups" is grammatically incorrect English - rename to "user groups"...
r3410 <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
Show admin dropdown for users who are admin of repo groups
r3371 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
Mads Kiilerich
"Users groups" is grammatically incorrect English - rename to "user groups"...
r3410 <li>${h.link_to(_('user groups'),h.url('users_groups'),class_='groups')}</li>
Show admin dropdown for users who are admin of repo groups
r3371 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
<li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
<li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
<li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
</ul>
</%def>
## ADMIN MENU
${admin_menu()}
</li>
## if you're a admin of any groups, show admin menu for it
% elif c.rhodecode_user.groups_admin:
<li>
${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
<%def name="admin_menu_simple()">
<ul>
Mads Kiilerich
"Users groups" is grammatically incorrect English - rename to "user groups"...
r3410 <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
Show admin dropdown for users who are admin of repo groups
r3371 </ul>
</%def>
## ADMIN MENU
${admin_menu_simple()}
</li>
Implements #734 repo switcher should be available in all views
r3209 % endif
</ul>
</li>
<li>
<a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
<span class="icon_short">
<img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" />
</span>
<span id="current_followers_count" class="short">${c.repository_followers}</span>
</a>
</li>
<li>
<a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
<span class="icon_short">
<img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" />
</span>
<span class="short">${c.repository_forks}</span>
</a>
</li>
<li>
<a class="menu_link" title="${_('Pull requests')}" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}">
<span class="icon_short">
<img src="${h.url('/images/icons/arrow_join.png')}" alt="${_('Pull requests')}" />
</span>
<span class="short">${c.repository_pull_requests}</span>
</a>
</li>
${usermenu()}
lazy load of branches and tags menu...
r1608 <script type="text/javascript">
Implements #734 repo switcher should be available in all views
r3209 YUE.on('branch_tag_switcher','mouseover',function(){
var loaded = YUD.hasClass('branch_tag_switcher','loaded');
lazy load of branches and tags menu...
r1608 if(!loaded){
Implements #734 repo switcher should be available in all views
r3209 YUD.addClass('branch_tag_switcher','loaded');
ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list',
function(o){},
function(o){YUD.removeClass('branch_tag_switcher','loaded');}
lazy load of branches and tags menu...
r1608 ,null);
}
return false;
Implements #734 repo switcher should be available in all views
r3209 });
White-space cleanup
r1888 </script>
Mads Kiilerich
html: don't use tabs
r3197 %else:
##ROOT MENU
Implements #734 repo switcher should be available in all views
r3209 %if c.rhodecode_user.username != 'default':
<li ${is_current('journal')}>
Mads Kiilerich
top menu: make 'alt' texts / tool tips more descriptive
r3287 <a class="menu_link" title="${_('Show recent activity')}" href="${h.url('journal')}">
Implements #734 repo switcher should be available in all views
r3209 <span class="icon">
<img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" />
</span>
<span>${_('Journal')}</span>
</a>
</li>
%else:
<li ${is_current('journal')}>
<a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}">
<span class="icon">
<img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" />
</span>
<span>${_('Public journal')}</span>
</a>
</li>
%endif
<li ${is_current('search')}>
Mads Kiilerich
top menu: make 'alt' texts / tool tips more descriptive
r3287 <a class="menu_link" title="${_('Search in repositories')}" href="${h.url('search')}">
Implements #734 repo switcher should be available in all views
r3209 <span class="icon">
<img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" />
</span>
<span>${_('Search')}</span>
</a>
</li>
Show admin dropdown for users who are admin of repo groups
r3371 % if h.HasPermissionAll('hg.admin')('access admin main page'):
Implements #734 repo switcher should be available in all views
r3209 <li ${is_current('admin')}>
<a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
<span class="icon">
<img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" />
</span>
<span>${_('Admin')}</span>
</a>
${admin_menu()}
</li>
Show admin dropdown for users who are admin of repo groups
r3371 % elif c.rhodecode_user.groups_admin:
<li ${is_current('admin')}>
<a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
<span class="icon">
<img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" />
</span>
<span>${_('Admin')}</span>
</a>
${admin_menu_simple()}
whitespace cleanup
r3394 </li>
Show admin dropdown for users who are admin of repo groups
r3371 % endif
Implements #734 repo switcher should be available in all views
r3209 ${usermenu()}
Mads Kiilerich
html: don't use tabs
r3197 %endif
autofocus when quick repo switcher is on
r3211 <script type="text/javascript">
YUE.on('repo_switcher','mouseover',function(){
var target = 'q_filter_rs';
var qfilter_activate = function(){
var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
var func = function(node){
return node.parentNode;
}
q_filter(target,nodes,func);
}
whitespace cleanup
r3216
autofocus when quick repo switcher is on
r3211 var loaded = YUD.hasClass('repo_switcher','loaded');
if(!loaded){
YUD.addClass('repo_switcher','loaded');
ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
function(o){qfilter_activate();YUD.get(target).focus()},
function(o){YUD.removeClass('repo_switcher','loaded');}
,null);
}else{
Mads Kiilerich
coding style: fix trailing and leading spaces and tabs
r3267 YUD.get(target).focus();
autofocus when quick repo switcher is on
r3211 }
return false;
Implements #734 repo switcher should be available in all views
r3209 });
Mads Kiilerich
header: don't use fixed position...
r3299
YUE.on('header-dd', 'click',function(e){
whitespace cleanup
r3315 YUD.addClass('header-inner', 'hover');
drop down hover menu now fixes whole page padding
r3341 YUD.addClass('content', 'hover');
Mads Kiilerich
header: don't use fixed position...
r3299 });
autofocus when quick repo switcher is on
r3211 </script>
Augusto Herrmann
Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
r1472 </%def>