+
+
${next.body()}
%if c.ga_code:
diff --git a/kallithea/templates/bookmarks/bookmarks.html b/kallithea/templates/bookmarks/bookmarks.html
--- a/kallithea/templates/bookmarks/bookmarks.html
+++ b/kallithea/templates/bookmarks/bookmarks.html
@@ -13,9 +13,9 @@
${_('Bookmarks')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('switch-to')}
diff --git a/kallithea/templates/branches/branches.html b/kallithea/templates/branches/branches.html
--- a/kallithea/templates/branches/branches.html
+++ b/kallithea/templates/branches/branches.html
@@ -13,9 +13,9 @@
${_('Branches')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('switch-to')}
diff --git a/kallithea/templates/changelog/changelog.html b/kallithea/templates/changelog/changelog.html
--- a/kallithea/templates/changelog/changelog.html
+++ b/kallithea/templates/changelog/changelog.html
@@ -24,9 +24,9 @@
- ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('changelog', c.first_revision.raw_id if c.first_revision else None)}
diff --git a/kallithea/templates/changeset/changeset.html b/kallithea/templates/changeset/changeset.html
--- a/kallithea/templates/changeset/changeset.html
+++ b/kallithea/templates/changeset/changeset.html
@@ -13,9 +13,9 @@
${_('Changeset')} - ${h.show_id(c.changeset)}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('changelog', c.changeset.raw_id)}
diff --git a/kallithea/templates/changeset/changeset_range.html b/kallithea/templates/changeset/changeset_range.html
--- a/kallithea/templates/changeset/changeset_range.html
+++ b/kallithea/templates/changeset/changeset_range.html
@@ -15,9 +15,9 @@
${h.link_to(h.show_id(c.cs_ranges[-1]),h.url('changeset_home',repo_name=c.repo_name,revision=c.cs_ranges[-1]))}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('changelog')}
diff --git a/kallithea/templates/compare/compare_diff.html b/kallithea/templates/compare/compare_diff.html
--- a/kallithea/templates/compare/compare_diff.html
+++ b/kallithea/templates/compare/compare_diff.html
@@ -16,9 +16,9 @@
${_('Compare Revisions')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('changelog')}
diff --git a/kallithea/templates/files/diff_2way.html b/kallithea/templates/files/diff_2way.html
--- a/kallithea/templates/files/diff_2way.html
+++ b/kallithea/templates/files/diff_2way.html
@@ -22,9 +22,9 @@
${_('File diff')} ${h.show_id(c.changeset_1)} → ${h.show_id(c.changeset_2)}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('changelog')}
diff --git a/kallithea/templates/files/file_diff.html b/kallithea/templates/files/file_diff.html
--- a/kallithea/templates/files/file_diff.html
+++ b/kallithea/templates/files/file_diff.html
@@ -11,9 +11,9 @@
${_('File diff')} ${h.show_id(c.changeset_1)} → ${h.show_id(c.changeset_2)}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('changelog')}
diff --git a/kallithea/templates/files/files.html b/kallithea/templates/files/files.html
--- a/kallithea/templates/files/files.html
+++ b/kallithea/templates/files/files.html
@@ -18,9 +18,9 @@
%endif
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('files', c.revision)}
diff --git a/kallithea/templates/files/files_add.html b/kallithea/templates/files/files_add.html
--- a/kallithea/templates/files/files_add.html
+++ b/kallithea/templates/files/files_add.html
@@ -16,9 +16,9 @@
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="breadcrumbs_links()">
${_('Add New File')} @ ${h.show_id(c.cs)}
diff --git a/kallithea/templates/files/files_delete.html b/kallithea/templates/files/files_delete.html
--- a/kallithea/templates/files/files_delete.html
+++ b/kallithea/templates/files/files_delete.html
@@ -7,9 +7,9 @@
%endif
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="breadcrumbs_links()">
${_('Delete file')} @ ${h.show_id(c.cs)}
diff --git a/kallithea/templates/files/files_edit.html b/kallithea/templates/files/files_edit.html
--- a/kallithea/templates/files/files_edit.html
+++ b/kallithea/templates/files/files_edit.html
@@ -16,9 +16,9 @@
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="breadcrumbs_links()">
${_('Edit file')} @ ${h.show_id(c.cs)}
diff --git a/kallithea/templates/followers/followers.html b/kallithea/templates/followers/followers.html
--- a/kallithea/templates/followers/followers.html
+++ b/kallithea/templates/followers/followers.html
@@ -12,9 +12,9 @@
${_('Followers')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('followers')}
+
+ <%block name="header_menu"/>
+
+
diff --git a/kallithea/templates/forks/fork.html b/kallithea/templates/forks/fork.html
--- a/kallithea/templates/forks/fork.html
+++ b/kallithea/templates/forks/fork.html
@@ -12,9 +12,9 @@
${_('Fork')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('createfork')}
diff --git a/kallithea/templates/forks/forks.html b/kallithea/templates/forks/forks.html
--- a/kallithea/templates/forks/forks.html
+++ b/kallithea/templates/forks/forks.html
@@ -12,9 +12,9 @@
${_('Forks')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('showforks')}
diff --git a/kallithea/templates/index.html b/kallithea/templates/index.html
--- a/kallithea/templates/index.html
+++ b/kallithea/templates/index.html
@@ -11,9 +11,9 @@
<%def name="breadcrumbs()">
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
<%include file="index_base.html" args="parent=self"/>
diff --git a/kallithea/templates/journal/journal.html b/kallithea/templates/journal/journal.html
--- a/kallithea/templates/journal/journal.html
+++ b/kallithea/templates/journal/journal.html
@@ -17,9 +17,9 @@
${h.end_form()}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('journal')}
-%def>
+%block>
<%def name="head_extra()">
diff --git a/kallithea/templates/journal/public_journal.html b/kallithea/templates/journal/public_journal.html
--- a/kallithea/templates/journal/public_journal.html
+++ b/kallithea/templates/journal/public_journal.html
@@ -9,9 +9,9 @@
<%def name="breadcrumbs()">
${c.site_name}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('journal')}
-%def>
+%block>
<%def name="head_extra()">
diff --git a/kallithea/templates/login.html b/kallithea/templates/login.html
--- a/kallithea/templates/login.html
+++ b/kallithea/templates/login.html
@@ -8,22 +8,6 @@
%endif
%def>
-
-
-
<%include file="/base/flash_msg.html"/>
diff --git a/kallithea/templates/password_reset.html b/kallithea/templates/password_reset.html
--- a/kallithea/templates/password_reset.html
+++ b/kallithea/templates/password_reset.html
@@ -8,22 +8,6 @@
%endif
%def>
-
-
-
<%include file="/base/flash_msg.html"/>
diff --git a/kallithea/templates/pullrequests/pullrequest.html b/kallithea/templates/pullrequests/pullrequest.html
--- a/kallithea/templates/pullrequests/pullrequest.html
+++ b/kallithea/templates/pullrequests/pullrequest.html
@@ -8,9 +8,9 @@
${_('New Pull Request')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('showpullrequest')}
diff --git a/kallithea/templates/pullrequests/pullrequest_show.html b/kallithea/templates/pullrequests/pullrequest_show.html
--- a/kallithea/templates/pullrequests/pullrequest_show.html
+++ b/kallithea/templates/pullrequests/pullrequest_show.html
@@ -11,9 +11,9 @@
${_('Pull request #%s from %s#%s') % (c.pull_request.pull_request_id, c.pull_request.org_repo.repo_name, c.cs_branch_name)}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
<% editable = not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.author.user_id == c.authuser.user_id) %>
diff --git a/kallithea/templates/pullrequests/pullrequest_show_all.html b/kallithea/templates/pullrequests/pullrequest_show_all.html
--- a/kallithea/templates/pullrequests/pullrequest_show_all.html
+++ b/kallithea/templates/pullrequests/pullrequest_show_all.html
@@ -15,9 +15,9 @@
%endif
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('showpullrequest')}
diff --git a/kallithea/templates/pullrequests/pullrequest_show_my.html b/kallithea/templates/pullrequests/pullrequest_show_my.html
--- a/kallithea/templates/pullrequests/pullrequest_show_my.html
+++ b/kallithea/templates/pullrequests/pullrequest_show_my.html
@@ -8,9 +8,9 @@
${_('My Pull Requests')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('my_pullrequests')}
-%def>
+%block>
<%def name="main()">
diff --git a/kallithea/templates/register.html b/kallithea/templates/register.html
--- a/kallithea/templates/register.html
+++ b/kallithea/templates/register.html
@@ -7,21 +7,6 @@
· ${c.site_name}
%endif
%def>
-
-
<%include file="/base/flash_msg.html"/>
diff --git a/kallithea/templates/search/search.html b/kallithea/templates/search/search.html
--- a/kallithea/templates/search/search.html
+++ b/kallithea/templates/search/search.html
@@ -24,13 +24,13 @@
%endif
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
%if c.repo_name:
${self.menu('repositories')}
%else:
${self.menu('search')}
%endif
-%def>
+%block>
<%def name="main()">
%if c.repo_name:
${self.repo_context_bar('options')}
diff --git a/kallithea/templates/summary/statistics.html b/kallithea/templates/summary/statistics.html
--- a/kallithea/templates/summary/statistics.html
+++ b/kallithea/templates/summary/statistics.html
@@ -11,9 +11,9 @@
${_('Statistics')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="head_extra()">
diff --git a/kallithea/templates/summary/summary.html b/kallithea/templates/summary/summary.html
--- a/kallithea/templates/summary/summary.html
+++ b/kallithea/templates/summary/summary.html
@@ -34,9 +34,9 @@
%endif
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="head_extra()">
diff --git a/kallithea/templates/tags/tags.html b/kallithea/templates/tags/tags.html
--- a/kallithea/templates/tags/tags.html
+++ b/kallithea/templates/tags/tags.html
@@ -13,9 +13,9 @@
${_('Tags')}
%def>
-<%def name="page_nav()">
+<%block name="header_menu">
${self.menu('repositories')}
-%def>
+%block>
<%def name="main()">
${self.repo_context_bar('switch-to')}