-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
taleksovska
committed
Jul 4, 2024
1 parent
4964eb9
commit 4a81767
Showing
2 changed files
with
108 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,107 @@ | ||
{# | ||
Copyright (c) 2020 Keitaro AB | ||
{% block header_wrapper %} {% block header_account %} | ||
<div class="account-masthead"> | ||
<div class="container"> | ||
{% block header_account_container_content %} {% if c.userobj %} | ||
<div class="account avatar authed" data-module="me" data-me="{{ c.userobj.id }}"> | ||
<ul class="list-unstyled"> | ||
{% block header_account_logged %} {% if c.userobj.sysadmin %} | ||
<li> | ||
<a href="{{ h.url_for(controller='admin', action='index') }}" title="{{ _('Sysadmin settings') }}"> | ||
<i class="fa fa-gavel" aria-hidden="true"></i> | ||
<span class="text">{{ _('Admin') }}</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
<li> | ||
<a href="{{ h.url_for('user.read', id=c.userobj.name) }}" class="image" title="{{ _('View profile') }}"> | ||
{{ h.user_image((c.user if c and c.user else ''), size=22) }} | ||
<span class="username">{{ c.userobj.display_name }}</span> | ||
</a> | ||
</li> | ||
{% set new_activities = h.new_activities() %} | ||
<li class="notifications {% if new_activities > 0 %}notifications-important{% endif %}"> | ||
{% set notifications_tooltip = ngettext('Dashboard (%(num)d new item)', 'Dashboard (%(num)d new items)', new_activities) | ||
%} | ||
<a href="{{ h.url_for('dashboard.index') }}" title="{{ notifications_tooltip }}"> | ||
<i class="fa fa-tachometer" aria-hidden="true"></i> | ||
<span class="text">{{ _('Dashboard') }}</span> | ||
<span class="badge">{{ new_activities }}</span> | ||
</a> | ||
</li> | ||
{% block header_account_settings_link %} | ||
<li> | ||
<a href="{{ h.url_for('user.edit', id=c.userobj.name) }}" title="{{ _('Profile settings') }}"> | ||
<i class="fa fa-cog" aria-hidden="true"></i> | ||
<span class="text">{{ _('Profile settings') }}</span> | ||
</a> | ||
</li> | ||
{% endblock %} {% block header_account_log_out_link %} | ||
<li> | ||
<a href="{{ h.url_for('/user/_logout') }}" title="{{ _('Log out') }}"> | ||
<i class="fa fa-sign-out" aria-hidden="true"></i> | ||
<span class="text">{{ _('Log out') }}</span> | ||
</a> | ||
</li> | ||
{% endblock %} {% endblock %} | ||
</ul> | ||
</div> | ||
{% else %} | ||
<nav class="account not-authed" aria-label="{{ _('Account') }}"> | ||
<ul class="list-unstyled"> | ||
{% block header_account_notlogged %} | ||
<li>{% link_for _('Log in'), named_route='user.login' %}</li> | ||
{% endblock %} | ||
</ul> | ||
</nav> | ||
{% endif %} {% endblock %} | ||
</div> | ||
</div> | ||
{% endblock %} | ||
<header class="navbar navbar-static-top 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"> | ||
<div class="navbar-right"> | ||
<button data-target="#main-navigation-toggle" data-toggle="collapse" class="navbar-toggle collapsed" type="button" aria-label="expand or collapse" aria-expanded="false"> | ||
<span class="sr-only">{{ _('Toggle navigation') }}</span> | ||
<span class="fa fa-bars"></span> | ||
</button> | ||
</div> | ||
<hgroup class="{{ g.header_class }} navbar-left"> | ||
{% block header_logo %} {% if g.site_logo %} | ||
<a class="logo" href="{{ h.url_for('home.index') }}"><img src="{{ h.url_for_static_or_external(g.site_logo) }}" alt="{{ g.site_title }}" title="{{ g.site_title }}" /></a> | ||
{% else %} | ||
<h1> | ||
<a href="{{ h.url_for('home.index') }}">{{ g.site_title }}</a> | ||
</h1> | ||
{% if g.site_description %} | ||
<h2>{{ g.site_description }}</h2>{% endif %} {% endif %} {% endblock %} | ||
</hgroup> | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as | ||
published by the Free Software Foundation, either version 3 of the | ||
License, or (at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
|
||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
#} | ||
|
||
{% ckan_extends %} | ||
{% block header_account_notlogged %} | ||
|
||
<li>{% link_for _('Log in'), named_route='user.login' %}</li> | ||
|
||
{% endblock %} | ||
<div class="collapse navbar-collapse" id="main-navigation-toggle"> | ||
{% block header_site_navigation %} | ||
<nav class="section navigation"> | ||
<ul class="nav nav-pills"> | ||
{% block header_site_navigation_tabs %} | ||
{{ h.build_nav_main( | ||
('dataset.search', _('Datasets')), | ||
('organization.index', _('Organizations')), | ||
('group.index', _('Groups')), | ||
('home.about', _('About')) ) }} | ||
{% endblock %} | ||
</ul> | ||
</nav> | ||
{% endblock %} {% block header_site_search %} | ||
<form class="section site-search simple-input" action="{% url_for 'dataset.search' %}" method="get"> | ||
<div class="field"> | ||
<label for="field-sitewide-search">{% block header_site_search_label %}{{ _('Search Datasets') }}{% endblock %}</label> | ||
<input id="field-sitewide-search" type="text" class="form-control" name="q" placeholder="{{ _('Search') }}" aria-label="{{ _('Search datasets') }}"/> | ||
<button class="btn-search" type="submit" aria-label="{{ _('Submit') }}"><i class="fa fa-search"></i></button> | ||
</div> | ||
</form> | ||
{% endblock %} | ||
</div> | ||
</div> | ||
</header> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters