Mercurial > kallithea
changeset 3609:2ea981f9da79 beta
templates: enforce more consistency by being less flexible in templates
All pages must define page_nav.
context_bar may only be used on relevant repository pages, and the 'current'
parameter is mandatory.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 26 Mar 2013 23:21:40 +0100 |
parents | 87b0a652b6b1 |
children | 5f1f77948355 |
files | rhodecode/templates/base/base.html rhodecode/templates/forks/forks.html rhodecode/templates/pullrequests/pullrequest.html rhodecode/templates/pullrequests/pullrequest_show.html rhodecode/templates/pullrequests/pullrequest_show_all.html rhodecode/templates/search/search.html |
diffstat | 6 files changed, 19 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/templates/base/base.html Mon Mar 25 16:30:40 2013 +0100 +++ b/rhodecode/templates/base/base.html Tue Mar 26 23:21:40 2013 +0100 @@ -51,20 +51,14 @@ <!-- END FOOTER --> ### MAKO DEFS ### -<%def name="page_nav()"> - ${self.menu()} -</%def> - <%def name="breadcrumbs()"> <div class="breadcrumbs"> ${self.breadcrumbs_links()} </div> </%def> -<%def name="context_bar(current=None)"> - %if c.repo_name: +<%def name="context_bar(current)"> ${repo_context_bar(current)} - %endif </%def> <%def name="admin_menu()">
--- a/rhodecode/templates/forks/forks.html Mon Mar 25 16:30:40 2013 +0100 +++ b/rhodecode/templates/forks/forks.html Tue Mar 26 23:21:40 2013 +0100 @@ -9,6 +9,10 @@ ${_('Forks')} </%def> +<%def name="page_nav()"> + ${self.menu('repositories')} +</%def> + <%def name="main()"> ${self.context_bar('showforks')} <div class="box">
--- a/rhodecode/templates/pullrequests/pullrequest.html Mon Mar 25 16:30:40 2013 +0100 +++ b/rhodecode/templates/pullrequests/pullrequest.html Tue Mar 26 23:21:40 2013 +0100 @@ -8,6 +8,10 @@ ${_('New pull request')} </%def> +<%def name="page_nav()"> + ${self.menu('repositories')} +</%def> + <%def name="main()"> ${self.context_bar('showpullrequest')} <div class="box">
--- a/rhodecode/templates/pullrequests/pullrequest_show.html Mon Mar 25 16:30:40 2013 +0100 +++ b/rhodecode/templates/pullrequests/pullrequest_show.html Tue Mar 26 23:21:40 2013 +0100 @@ -8,6 +8,10 @@ ${_('Pull request #%s') % c.pull_request.pull_request_id} </%def> +<%def name="page_nav()"> + ${self.menu('repositories')} +</%def> + <%def name="main()"> ${self.context_bar('showpullrequest')} <div class="box">
--- a/rhodecode/templates/pullrequests/pullrequest_show_all.html Mon Mar 25 16:30:40 2013 +0100 +++ b/rhodecode/templates/pullrequests/pullrequest_show_all.html Tue Mar 26 23:21:40 2013 +0100 @@ -8,6 +8,10 @@ ${_('Pull requests')} </%def> +<%def name="page_nav()"> + ${self.menu('repositories')} +</%def> + <%def name="main()"> ${self.context_bar('showpullrequest')} <div class="box">
--- a/rhodecode/templates/search/search.html Mon Mar 25 16:30:40 2013 +0100 +++ b/rhodecode/templates/search/search.html Tue Mar 26 23:21:40 2013 +0100 @@ -29,7 +29,9 @@ %endif </%def> <%def name="main()"> +%if c.repo_name: ${self.context_bar('options')} +%endif <div class="box"> <!-- box / title --> <div class="title">