forked from metropoleruhr/ckanext-rvr
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from datopian/ckan-2.10.1-support
Upgrade change for CKAN 2.10.x
- Loading branch information
Showing
15 changed files
with
283 additions
and
162 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
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
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
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
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
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,52 +1,133 @@ | ||
{% ckan_extends %} | ||
{% set dataset_type = h.default_package_type() %} | ||
|
||
{% 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')), | ||
('page.faq', _('FAQ')), | ||
('home.about', _('About')) ) }} | ||
{% endblock %} | ||
</ul> | ||
</nav> | ||
{% endblock %} | ||
|
||
{% block header_site_search %} | ||
<div class="menu-right container-fluid"> | ||
<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') }}" /> | ||
<button class="btn-search" type="submit"><i class="fa fa-search"></i></button> | ||
{% 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('admin.index') }}" title="{{ _('Sysadmin settings') }}"> | ||
<i class="fa fa-gavel" aria-hidden="true"></i> | ||
<span class="text">{{ _('Admin') }}</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% block header_account_profile %} | ||
<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> | ||
{% endblock %} | ||
{% block header_dashboard %} | ||
<li> | ||
<a href="{{ h.url_for('dashboard.datasets') }}" title="{{ _("View dashboard") }}"> | ||
<i class="fa fa-tachometer" aria-hidden="true"></i> | ||
<span class="text">{{ _('Dashboard') }}</span> | ||
</a> | ||
</li> | ||
{% endblock %} | ||
{% 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> | ||
</form> | ||
|
||
<div class="social-media navbar-left"> | ||
<div class="social-icons"> | ||
<a href="https://www.facebook.com/RVR.Ruhr" target="blank"><i class="fa fa-facebook"></i></a> | ||
<a href="https://twitter.com/metropole_ruhr" target="blank"><i class="fa fa-twitter"></i></a> | ||
<a href="https://www.instagram.com/rvr.ruhr/"target="blank"><i class="fa fa-instagram"></i></a> | ||
<a href="https://www.youtube.com/channel/UCCJDPVQdYd_TRVqT_sutt7g" target="blank"><i class="fa fa-youtube-play"></i></a> | ||
{% 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> | ||
{% if h.check_access('user_create') %} | ||
<li>{% link_for _('Register'), named_route='user.register', class_='sub' %}</li> | ||
{% endif %} {% endblock %} | ||
</ul> | ||
</nav> | ||
{% endif %} {% endblock %} | ||
</div> | ||
</div> | ||
|
||
</div> | ||
{% endblock %} | ||
<header class="navbar navbar-static-top masthead"> | ||
<div class="container"> | ||
{% block header_debug %} {% if g.debug and not g.debug_supress_header %} | ||
<div class="debug">Blueprint : {{ g.blueprint }}<br />View : {{ g.view }}</div> | ||
{% endif %} {% endblock %} | ||
<nav class="navbar navbar-expand-lg navbar-light"> | ||
<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 %} | ||
|
||
{% endblock%} | ||
</hgroup> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#main-navigation-toggle" | ||
aria-controls="main-navigation-toggle" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="fa fa-bars text-white"></span> | ||
</button> | ||
|
||
<div class="main-navbar collapse navbar-collapse" id="main-navigation-toggle"> | ||
<ul class="navbar-nav ms-auto mb-2 mb-lg-0"> | ||
{% block header_site_navigation %} | ||
{% block header_site_navigation_tabs %} | ||
{% set org_type = h.default_group_type('organization') %} | ||
{% set group_type = h.default_group_type('group') %} | ||
|
||
{% block header_wrapper %} | ||
{{ h.build_nav_main( | ||
(dataset_type ~ '.search', h.humanize_entity_type('package', dataset_type, 'main nav') or _('Datasets'), ["dataset", "resource"]), | ||
(org_type ~ '.index', | ||
h.humanize_entity_type('organization', org_type, 'main nav') or _('Organizations'), ['organization']), | ||
(group_type ~ '.index', | ||
h.humanize_entity_type('group', group_type, 'main nav') or _('Groups'), ['group']), | ||
('page.faq', _('FAQ')), | ||
('home.about', _('About')) ) }} | ||
{% endblock %} | ||
</ul> | ||
|
||
{{ super() }} | ||
{% endblock %} | ||
{% block header_site_search %} | ||
<form class="d-flex site-search" action="{% url_for dataset_type ~ '.search' %}" method="get"> | ||
<label class="d-none" for="field-sitewide-search">{% block header_site_search_label %}{{ h.humanize_entity_type('package', dataset_type, 'search_placeholder') or _('Search Datasets...') }}{% endblock %}</label> | ||
<input id="field-sitewide-search" class="form-control me-2" type="text" name="q" placeholder="{{ _('Search') }}" aria-label="{{ h.humanize_entity_type('package', dataset_type, 'search_placeholder') or _('Search datasets...') }}"/> | ||
<button class="btn" type="submit" aria-label="{{ _('Submit') }}"><i class="fa fa-search"></i></button> | ||
</form> | ||
<div class="social-icons"> | ||
<a href="https://www.facebook.com/RVR.Ruhr" target="blank"><i class="fa-brands fa-facebook"></i></a> | ||
<a href="https://twitter.com/metropole_ruhr" target="blank"><i class="fa-brands fa-twitter"></i></a> | ||
<a href="https://www.instagram.com/rvr.ruhr/" target="blank"><i class="fa-brands fa-instagram"></i></a> | ||
<a href="https://www.youtube.com/channel/UCCJDPVQdYd_TRVqT_sutt7g" target="blank"><i class="fa-brands fa-youtube"></i></a> | ||
</div> | ||
{% endblock %} | ||
</div> | ||
</nav> | ||
</div> | ||
</header> | ||
<div class="jumbotron"> | ||
<header> | ||
<h1> Open Data Portal Metropole Ruhr</h1> | ||
</header> | ||
</div> | ||
|
||
|
||
{% 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
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
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
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
Oops, something went wrong.