## -*- coding: utf-8 -*- <%inherit file="root.mako"/> <%include file="/ejs_templates/templates.html"/>
${self.menu_bar_nav()}
${self.menu_bar_subnav()}
${next.main()}
### MAKO DEFS ### <%def name="menu_bar_subnav()"> <%def name="breadcrumbs(class_='breadcrumbs')">
${self.breadcrumbs_links()}
<%def name="admin_menu()"> <%def name="dt_info_panel(elements)">
%for dt, dd, title, show_items in elements:
${dt}:
%if callable(dd): ## allow lazy evaluation of elements ${dd()} %else: ${dd} %endif %if show_items: ${_('Show More')} %endif
%if show_items: %endif %endfor
<%def name="gravatar(email, size=16)"> <% if (size > 16): gravatar_class = 'gravatar gravatar-large' else: gravatar_class = 'gravatar' %> <%doc> TODO: johbo: For now we serve double size images to make it smooth for retina. This is how it worked until now. Should be replaced with a better solution at some point. <%def name="gravatar_with_user(contact, size=16, show_disabled=False)"> <% email = h.email_or_none(contact) %>
${self.gravatar(email, size)} ${h.link_to_user(contact)}
## admin menu used for people that have some admin resources <%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)"> <%def name="repo_page_title(repo_instance)">
## SVN/HG/GIT icons %if h.is_hg(repo_instance): %endif %if h.is_git(repo_instance): %endif %if h.is_svn(repo_instance): %endif ## public/private %if repo_instance.private: %else: %endif ## repo name with group name ${h.breadcrumb_repo_link(c.rhodecode_db_repo)}
## FORKED %if repo_instance.fork:

${_('Fork of')} ${h.link_to_if(c.has_origin_repo_read_perm,repo_instance.fork.repo_name, h.route_path('repo_summary', repo_name=repo_instance.fork.repo_name))}

%endif ## IMPORTED FROM REMOTE %if repo_instance.clone_uri:

${_('Clone from')} ${h.hide_credentials(repo_instance.clone_uri)}

%endif ## LOCKING STATUS %if repo_instance.locked[0]:

${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}}

%elif repo_instance.enable_locking:

${_('Repository not locked. Pull repository to lock it.')}

%endif
<%def name="repo_menu(active=None)"> <% def is_active(selected): if selected == active: return "active" %>
% if c.rhodecode_db_repo.archived:
${_('This repository has been archived. It is now read-only.')}
% endif <%def name="usermenu(active=False)"> ## USER MENU
  • ${gravatar(c.rhodecode_user.email, 20)} %if c.rhodecode_user.username != h.DEFAULT_USER: ${c.rhodecode_user.username}
    %else: ${_('Sign in')} %endif
    %if c.rhodecode_user.username != h.DEFAULT_USER:
    ${c.unread_notifications}
    % endif
  • <%def name="menu_items(active=None)"> <% def is_active(selected): if selected == active: return "active" return "" %>