diff --git a/rhodecode/templates/base/base.html b/rhodecode/templates/base/base.html --- a/rhodecode/templates/base/base.html +++ b/rhodecode/templates/base/base.html @@ -61,6 +61,146 @@ +<%def name="context_bar(current=None)"> + %if c.repo_name: + ${repo_context_bar(current)} + %endif + + +<%def name="repo_context_bar(current=None)"> + <% + def follow_class(): + if c.repository_following: + return h.literal('following') + else: + return h.literal('follow') + %> + <% + def is_current(selected): + if selected == current: + return h.literal('class="current"') + %> + + +
+
+ + ## TODO: this check feels wrong, it would be better to have a check for permissions + ## also it feels like a job for the controller + %if c.rhodecode_user.username != 'default': + + %endif +
+
+ + +
+
+ + + + <%def name="usermenu()"> ## USER MENU
  • @@ -164,109 +304,6 @@ ## we render this menu only not for those pages %if current not in ['home','admin', 'search', 'journal']: ##REGULAR MENU -
  • - - - ${_('Summary')} - - ${_('Summary')} - -
  • -
  • - - - ${_('Changelog')} - - ${_('Changelog')} - -
  • -
  • - - - ${_('Switch to')} - - ${_('Switch to')} - - -
  • -
  • - - - ${_('Files')} - - ${_('Files')} - -
  • -
  • - - - ${_('Admin')} - - ${_('Options')} - - -
  • @@ -283,14 +320,6 @@ ${c.repository_forks}
  • -
  • - - - ${_('Pull requests')} - - ${c.repository_pull_requests} - -
  • ${usermenu()}