base.html
346 lines
| 14.6 KiB
| text/html
|
HtmlLexer
r547 | ## -*- coding: utf-8 -*- | |||
r1157 | <%inherit file="root.html"/> | |||
<!-- HEADER --> | ||||
<div id="header"> | ||||
r2001 | <div id="header-inner" class="title hover"> | |||
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> | ||||
r1888 | </div> | |||
r1157 | <!-- END HEADER --> | |||
r1888 | ||||
r1157 | <!-- CONTENT --> | |||
r1888 | <div id="content"> | |||
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 | ||||
r547 | </ul> | |||
r1157 | % endif | |||
r1888 | </div> | |||
<div id="main"> | ||||
r1157 | ${next.main()} | |||
</div> | ||||
r1888 | </div> | |||
r1157 | <!-- END CONTENT --> | |||
r547 | ||||
r1157 | <!-- FOOTER --> | |||
<div id="footer"> | ||||
r1470 | <div id="footer-inner" class="title"> | |||
r1157 | <div> | |||
<p class="footer-link"> | ||||
<a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> | ||||
</p> | ||||
<p class="footer-link-right"> | ||||
r2016 | <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a> | |||
r1157 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski | |||
</p> | ||||
</div> | ||||
</div> | ||||
</div> | ||||
<!-- END FOOTER --> | ||||
r547 | ||||
r1157 | ### MAKO DEFS ### | |||
<%def name="page_nav()"> | ||||
${self.menu()} | ||||
</%def> | ||||
r547 | ||||
r1157 | <%def name="breadcrumbs()"> | |||
<div class="breadcrumbs"> | ||||
${self.breadcrumbs_links()} | ||||
</div> | ||||
r547 | </%def> | |||
r1926 | <%def name="usermenu()"> | |||
<div class="user-menu"> | ||||
<div class="container"> | ||||
<div class="gravatar" id="quick_login_link"> | ||||
r1931 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" /> | |||
r1926 | </div> | |||
r1931 | %if c.rhodecode_user.username != 'default' and c.unread_notifications != 0: | |||
r1926 | <div class="notifications"> | |||
<a id="notification_counter" href="${h.url('notifications')}">${c.unread_notifications}</a> | ||||
</div> | ||||
%endif | ||||
</div> | ||||
<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> | ||||
r1944 | ||||
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> | ||||
r1944 | ||||
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"> | ||||
r1935 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} | |||
r1926 | </div> | |||
</div> | ||||
</div> | ||||
</div> | ||||
${h.end_form()} | ||||
%else: | ||||
<div class="links_left"> | ||||
r1950 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> | |||
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> | ||||
r2001 | <div class="inbox"><a href="${h.url('notifications')}">${_('Inbox')}: ${c.unread_notifications}</a></div> | |||
r1926 | </div> | |||
<div class="links_right"> | ||||
<ol class="links"> | ||||
<li>${h.link_to(_(u'Home'),h.url('home'))}</li> | ||||
Aras Pranckevicius
|
r1975 | <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li> | ||
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 | ||||
r1944 | </div> | |||
r1926 | </div> | |||
</%def> | ||||
r1157 | ||||
r547 | <%def name="menu(current=None)"> | |||
r1888 | <% | |||
r547 | def is_current(selected): | |||
if selected == current: | ||||
return h.literal('class="current"') | ||||
%> | ||||
r1888 | %if current not in ['home','admin']: | |||
##REGULAR MENU | ||||
r547 | <ul id="quick"> | |||
<!-- repo switcher --> | ||||
<li> | ||||
r1926 | <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#"> | |||
r547 | <span class="icon"> | |||
r1316 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> | |||
r547 | </span> | |||
r1888 | <span>↓</span> | |||
r547 | </a> | |||
r1158 | <ul id="repo_switcher_list" class="repo_switcher"> | |||
<li> | ||||
<a href="#">${_('loading...')}</a> | ||||
</li> | ||||
</ul> | ||||
r547 | </li> | |||
r1888 | ||||
r547 | <li ${is_current('summary')}> | |||
r1926 | <a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> | |||
r547 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> | |||
r547 | </span> | |||
r1888 | <span>${_('Summary')}</span> | |||
</a> | ||||
r547 | </li> | |||
<li ${is_current('changelog')}> | ||||
r1926 | <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> | |||
r547 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> | |||
r547 | </span> | |||
r1888 | <span>${_('Changelog')}</span> | |||
</a> | ||||
</li> | ||||
r547 | <li ${is_current('switch_to')}> | |||
r1926 | <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#"> | |||
r547 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> | |||
r547 | </span> | |||
r1888 | <span>${_('Switch to')}</span> | |||
</a> | ||||
r1608 | <ul id="switch_to_list" class="switch_to"> | |||
<li><a href="#">${_('loading...')}</a></li> | ||||
r1888 | </ul> | |||
r547 | </li> | |||
<li ${is_current('files')}> | ||||
r1926 | <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> | |||
r547 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> | |||
r547 | </span> | |||
r1888 | <span>${_('Files')}</span> | |||
</a> | ||||
</li> | ||||
r547 | <li ${is_current('options')}> | |||
r1926 | <a class="menu_link" title="${_('Options')}" href="#"> | |||
r547 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> | |||
r547 | </span> | |||
r1888 | <span>${_('Options')}</span> | |||
r547 | </a> | |||
<ul> | ||||
%if h.HasRepoPermissionAll('repository.admin')(c.repo_name): | ||||
r917 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): | |||
r916 | <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> | |||
%else: | ||||
<li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> | ||||
%endif | ||||
r1054 | %endif | |||
r547 | <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> | |||
<li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> | ||||
r1888 | ||||
r1305 | % if h.HasPermissionAll('hg.admin')('access admin main page'): | |||
<li> | ||||
r1888 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} | |||
r769 | <%def name="admin_menu()"> | |||
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> | ||||
r1345 | <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> | |||
r613 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> | |||
r956 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> | |||
r613 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> | |||
r769 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> | |||
r1888 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> | |||
r613 | </ul> | |||
r769 | </%def> | |||
r1888 | ||||
r769 | ${admin_menu()} | |||
r1305 | </li> | |||
% endif | ||||
r1888 | </ul> | |||
r547 | </li> | |||
r1888 | ||||
r747 | <li> | |||
r1926 | <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> | |||
r747 | <span class="icon_short"> | |||
r1318 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> | |||
r747 | </span> | |||
r1070 | <span id="current_followers_count" class="short">${c.repository_followers}</span> | |||
r747 | </a> | |||
</li> | ||||
<li> | ||||
r1926 | <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> | |||
r747 | <span class="icon_short"> | |||
r1318 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> | |||
r747 | </span> | |||
<span class="short">${c.repository_forks}</span> | ||||
</a> | ||||
r1888 | </li> | |||
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> | ||||
r1926 | ${usermenu()} | |||
r547 | </ul> | |||
r1608 | <script type="text/javascript"> | |||
YUE.on('repo_switcher','mouseover',function(){ | ||||
function qfilter(){ | ||||
r1653 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); | |||
var target = 'q_filter_rs'; | ||||
var func = function(node){ | ||||
return node.parentNode; | ||||
r1888 | } | |||
q_filter(target,nodes,func); | ||||
r1653 | } | |||
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; | ||||
}); | ||||
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; | ||||
}); | ||||
r1888 | </script> | |||
r547 | %else: | |||
##ROOT MENU | ||||
<ul id="quick"> | ||||
<li> | ||||
r1926 | <a class="menu_link" title="${_('Home')}" href="${h.url('home')}"> | |||
r547 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> | |||
r547 | </span> | |||
r1888 | <span>${_('Home')}</span> | |||
</a> | ||||
r547 | </li> | |||
r1926 | %if c.rhodecode_user.username != 'default': | |||
r1305 | <li> | |||
r1926 | <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}"> | |||
r734 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> | |||
r734 | </span> | |||
r1888 | <span>${_('Journal')}</span> | |||
</a> | ||||
r1305 | </li> | |||
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 | ||||
r734 | <li> | |||
r1926 | <a class="menu_link" title="${_('Search')}" href="${h.url('search')}"> | |||
r547 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> | |||
r547 | </span> | |||
r1888 | <span>${_('Search')}</span> | |||
</a> | ||||
r547 | </li> | |||
r1888 | ||||
r547 | %if h.HasPermissionAll('hg.admin')('access admin main page'): | |||
<li ${is_current('admin')}> | ||||
r1926 | <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}"> | |||
r547 | <span class="icon"> | |||
r1318 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> | |||
r547 | </span> | |||
r1888 | <span>${_('Admin')}</span> | |||
r769 | </a> | |||
${admin_menu()} | ||||
r547 | </li> | |||
%endif | ||||
r1926 | ${usermenu()} | |||
r547 | </ul> | |||
r1608 | %endif | |||
Augusto Herrmann
|
r1472 | </%def> | ||