##// END OF EJS Templates
top menu: show user menu as a menu option like others, now also with login name...
top menu: show user menu as a menu option like others, now also with login name A minor regression: the message count is not clickable ... but it was hard to hit, and somewhat confusing that different parts of the icon meant different things. The new html/css will probably need some review and cross platform testing.

File last commit:

r3205:f01540c6 beta
r3205:f01540c6 beta
Show More
base.html
369 lines | 16.4 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 -->
<div id="header">
made upper menu always hover, looks nicer and produces less troubles...
r2001 <div id="header-inner" class="title hover">
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 as a menu option like others, now also with login name...
r3205 <li>
<a class="menu_link" id="quick_login_link">
<span class="icon" style="background-image:url(${h.gravatar_url(c.rhodecode_user.email,16)}); background-repeat:no-repeat; background-position:center; ">
%if c.rhodecode_user.username != 'default' and c.unread_notifications != -1:
<span class="notifications" href="${h.url('notifications')}">${c.unread_notifications}</span>
%endif
</span>
<span>
%if c.rhodecode_user.username != 'default':
${c.rhodecode_user.username}
%else:
${_('Not logged in')}
%endif
</span>
</a>
</li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <div class="user-menu">
<div id="quick_login" style="display:none">
%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">
${h.text('username',class_='focus',size=40)}
</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">
${h.password('password',class_='focus',size=40)}
</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>
made upper menu always hover, looks nicer and produces less troubles...
r2001 <div class="inbox"><a href="${h.url('notifications')}">${_('Inbox')}: ${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>
removed upper menu to save space and did little rip off menu similar to G+
r1926 </div>
</%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"')
%>
%if current not in ['home','admin']:
Mads Kiilerich
html: random indentation fixes
r3198 ##REGULAR MENU
Mads Kiilerich
html: don't use tabs
r3197 <ul id="quick">
<!-- repo switcher -->
<li>
<a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#">
renamed project to rhodecode
r547 <span class="icon">
added draft for quick login menu
r1316 <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" />
renamed project to rhodecode
r547 </span>
Mads Kiilerich
top menu: use 'Repositories' instead of down arrow...
r3202 <span>${_('Repositories')}</span>
Mads Kiilerich
html: don't use tabs
r3197 </a>
<ul id="repo_switcher_list" class="repo_switcher">
implemented repo switcher list as dynamically loaded by xhr requestt....
r1158 <li>
<a href="#">${_('loading...')}</a>
</li>
Mads Kiilerich
html: don't use tabs
r3197 </ul>
</li>
White-space cleanup
r1888
Mads Kiilerich
html: don't use tabs
r3197 <li ${is_current('summary')}>
<a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
<span class="icon">
<img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
</span>
<span>${_('Summary')}</span>
</a>
</li>
renamed project to rhodecode
r547 <li ${is_current('changelog')}>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
renamed project to rhodecode
r547 <span class="icon">
quick login toggle
r1318 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
renamed project to rhodecode
r547 </span>
White-space cleanup
r1888 <span>${_('Changelog')}</span>
</a>
</li>
renamed project to rhodecode
r547 <li ${is_current('switch_to')}>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#">
renamed project to rhodecode
r547 <span class="icon">
quick login toggle
r1318 <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" />
renamed project to rhodecode
r547 </span>
White-space cleanup
r1888 <span>${_('Switch to')}</span>
</a>
lazy load of branches and tags menu...
r1608 <ul id="switch_to_list" class="switch_to">
<li><a href="#">${_('loading...')}</a></li>
White-space cleanup
r1888 </ul>
renamed project to rhodecode
r547 </li>
<li ${is_current('files')}>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
renamed project to rhodecode
r547 <span class="icon">
quick login toggle
r1318 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
renamed project to rhodecode
r547 </span>
White-space cleanup
r1888 <span>${_('Files')}</span>
</a>
</li>
renamed project to rhodecode
r547 <li ${is_current('options')}>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Options')}" href="#">
renamed project to rhodecode
r547 <span class="icon">
quick login toggle
r1318 <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" />
renamed project to rhodecode
r547 </span>
White-space cleanup
r1888 <span>${_('Options')}</span>
renamed project to rhodecode
r547 </a>
<ul>
%if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
enabled quick link to enabling statistics in admin page, for admins
r917 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
Better name of repo settings
r2848 <li>${h.link_to(_('repository settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
when logged in as admin the repo settings will point to admin settings.
r916 %else:
Better name of repo settings
r2848 <li>${h.link_to(_('repository settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
when logged in as admin the repo settings will point to admin settings.
r916 %endif
fixed #113 to high permission was required to fork a repository
r1054 %endif
Add quick toggle link for locking for users with write or admin permissions
r2833
Mads Kiilerich
html: random indentation fixes
r3198 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
hide open pull request for git repos
r2773 %if h.is_hg(c.rhodecode_repo):
Mads Kiilerich
make "Open new pull request" option lower case like other options are
r3188 <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li>
hide open pull request for git repos
r2773 %endif
Add compare button into quick menu
r2953 %if c.rhodecode_db_repo.fork:
Mads Kiilerich
make "Open new pull request" option lower case like other options are
r3188 <li>${h.link_to(_('compare fork'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref=request.GET.get('branch') or 'default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name),class_='compare_request')}</li>
Add compare button into quick menu
r2953 %endif
Mads Kiilerich
html: random indentation fixes
r3198 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
White-space cleanup
r1888
Add quick toggle link for locking for users with write or admin permissions
r2833 %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
Added server side file editing with commit
r1305 % if h.HasPermissionAll('hg.admin')('access admin main page'):
<li>
White-space cleanup
r1888 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
fixes #77 moved out ldap config to it's own section
r769 <%def name="admin_menu()">
added admin shortcut menu to options
r613 <ul>
<li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li>
<li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
#47 implemented Adding of new repo_groups+forms+validators. Fixed sorting of repo groups by main names in multiple locations. Removed some unneeded calls to self.sa for exchange to .query() methods....
r1345 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
added admin shortcut menu to options
r613 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
started working on issue #56
r956 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
added admin shortcut menu to options
r613 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
fixes #77 moved out ldap config to it's own section
r769 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
Implemented #379 defaults settings page for creation of repositories...
r3056 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
White-space cleanup
r1888 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
added admin shortcut menu to options
r613 </ul>
fixes #77 moved out ldap config to it's own section
r769 </%def>
Add quick toggle link for locking for users with write or admin permissions
r2833 ## ADMIN MENU
fixes #77 moved out ldap config to it's own section
r769 ${admin_menu()}
Added server side file editing with commit
r1305 </li>
% endif
White-space cleanup
r1888 </ul>
renamed project to rhodecode
r547 </li>
White-space cleanup
r1888
Added icons with numbers of followers and number of forks
r747 <li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
Added icons with numbers of followers and number of forks
r747 <span class="icon_short">
quick login toggle
r1318 <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" />
Added icons with numbers of followers and number of forks
r747 </span>
Added dynamic followers counter change after toggle following action
r1070 <span id="current_followers_count" class="short">${c.repository_followers}</span>
Added icons with numbers of followers and number of forks
r747 </a>
</li>
<li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
Added icons with numbers of followers and number of forks
r747 <span class="icon_short">
quick login toggle
r1318 <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" />
Added icons with numbers of followers and number of forks
r747 </span>
<span class="short">${c.repository_forks}</span>
</a>
White-space cleanup
r1888 </li>
- pull request generates overview based on it's params...
r2440 <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>
removed upper menu to save space and did little rip off menu similar to G+
r1926 ${usermenu()}
Mads Kiilerich
html: don't use tabs
r3197 </ul>
lazy load of branches and tags menu...
r1608 <script type="text/javascript">
YUE.on('repo_switcher','mouseover',function(){
function qfilter(){
one generic qfilter function.
r1653 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
var target = 'q_filter_rs';
var func = function(node){
return node.parentNode;
White-space cleanup
r1888 }
q_filter(target,nodes,func);
one generic qfilter function.
r1653 }
lazy load of branches and tags menu...
r1608 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();},
function(o){YUD.removeClass('repo_switcher','loaded');}
,null);
}
return false;
});
one generic qfilter function.
r1653 YUE.on('branch_tag_switcher','mouseover',function(){
var loaded = YUD.hasClass('branch_tag_switcher','loaded');
if(!loaded){
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');}
,null);
}
return false;
});
White-space cleanup
r1888 </script>
Mads Kiilerich
html: don't use tabs
r3197 %else:
##ROOT MENU
renamed project to rhodecode
r547 <ul id="quick">
Mads Kiilerich
top menu: make 'Home' current for 'Home'
r3204 <li ${is_current('home')}>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Home')}" href="${h.url('home')}">
renamed project to rhodecode
r547 <span class="icon">
quick login toggle
r1318 <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" />
renamed project to rhodecode
r547 </span>
White-space cleanup
r1888 <span>${_('Home')}</span>
</a>
renamed project to rhodecode
r547 </li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 %if c.rhodecode_user.username != 'default':
Added server side file editing with commit
r1305 <li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}">
implemented user dashboards, and following system.
r734 <span class="icon">
quick login toggle
r1318 <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" />
implemented user dashboards, and following system.
r734 </span>
White-space cleanup
r1888 <span>${_('Journal')}</span>
</a>
Added server side file editing with commit
r1305 </li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 %else:
<li>
<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
implemented user dashboards, and following system.
r734 <li>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Search')}" href="${h.url('search')}">
renamed project to rhodecode
r547 <span class="icon">
quick login toggle
r1318 <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" />
renamed project to rhodecode
r547 </span>
White-space cleanup
r1888 <span>${_('Search')}</span>
</a>
renamed project to rhodecode
r547 </li>
White-space cleanup
r1888
Mads Kiilerich
html: don't use tabs
r3197 %if h.HasPermissionAll('hg.admin')('access admin main page'):
renamed project to rhodecode
r547 <li ${is_current('admin')}>
removed upper menu to save space and did little rip off menu similar to G+
r1926 <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
renamed project to rhodecode
r547 <span class="icon">
quick login toggle
r1318 <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" />
renamed project to rhodecode
r547 </span>
White-space cleanup
r1888 <span>${_('Admin')}</span>
fixes #77 moved out ldap config to it's own section
r769 </a>
${admin_menu()}
renamed project to rhodecode
r547 </li>
Mads Kiilerich
html: don't use tabs
r3197 %endif
removed upper menu to save space and did little rip off menu similar to G+
r1926 ${usermenu()}
Mads Kiilerich
html: don't use tabs
r3197 </ul>
%endif
Augusto Herrmann
Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
r1472 </%def>