Skip to content

Commit

Permalink
[#688] Adds a few more generic blocks to header
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Mar 26, 2013
1 parent cbc72c9 commit cfaf732
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ckan/templates/header.html
Expand Up @@ -5,6 +5,7 @@
{% if c.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
<ul class="unstyled">
{% block header_account_logged %}
{% if c.userobj.sysadmin %}
<li>
<a href="{{ h.url_for(controller='admin', action='index') }}" title="{{ _('Sysadmin settings') }}">
Expand Down Expand Up @@ -35,23 +36,28 @@
<i class="icon-signout"></i>
</a>
</li>
{% endblock %}
</ul>
</div>
{% else %}
<nav class="account not-authed">
<ul class="unstyled">
{% block header_account_notlogged %}
<li>{% link_for _('Log in'), controller='user', action='login' %}</li>
<li>{% link_for _('Register'), controller='user', action='register', class_='sub' %}</li>
{% endblock %}
</ul>
</nav>
{% endif %}
</div>
</header>
{% endblock %}
<header class="masthead">
{% block header_debug %}
{% if g.debug and not g.debug_supress_header %}
<div class="debug">Controller : {{ c.controller }}<br/>Action : {{ c.action }}</div>
{% endif %}
{% endblock %}
<div class="container">
{# The .header-image class hides the main text and uses image replacement for the title #}
<hgroup class="{{ g.header_class }}">
Expand All @@ -74,12 +80,14 @@ <h1>
{% block header_site_navigation %}
<nav class="section navigation">
<ul class="nav nav-pills">
{% block header_site_navigation_tabs %}
{{ h.build_nav_main(
('search', _('Datasets')),
('organizations_index', _('Organizations')),
('group_index', _('Groups')),
('about', _('About'))
) }}
{% endblock %}
</ul>
</nav>
{% endblock %}
Expand Down

0 comments on commit cfaf732

Please sign in to comment.