Merge branch '14-template-tweaks' into release-v2.0
This commit is contained in:
commit
c957fdf17c
|
@ -18,7 +18,7 @@ Example:
|
||||||
{% set truncate_title = truncate_title or 80 %}
|
{% set truncate_title = truncate_title or 80 %}
|
||||||
{% set title = source.title or source.name %}
|
{% set title = source.title or source.name %}
|
||||||
{% set source_type = h.get_pkg_dict_extra(source, 'source_type') %}
|
{% set source_type = h.get_pkg_dict_extra(source, 'source_type') %}
|
||||||
{% set url = h.url_for('harvest_edit', id=source.name) if within_organization else h.url_for('harvest_read', id=source.name) %}
|
{% set url = h.url_for('harvest_admin', id=source.name) if within_organization else h.url_for('harvest_read', id=source.name) %}
|
||||||
|
|
||||||
<li class="{{ item_class or "dataset-item" }}">
|
<li class="{{ item_class or "dataset-item" }}">
|
||||||
<div class="dataset-content">
|
<div class="dataset-content">
|
||||||
|
|
|
@ -11,14 +11,11 @@
|
||||||
|
|
||||||
{% block breadcrumb_content_root_selected %} class="active"{% endblock %}
|
{% block breadcrumb_content_root_selected %} class="active"{% endblock %}
|
||||||
|
|
||||||
{#
|
|
||||||
TODO: once #354 is merged in CKAN core we can re-adjust the truncation
|
|
||||||
lengths here (as the breadcrumbs are a little different in #354)
|
|
||||||
#}
|
|
||||||
{% block breadcrumb_content %}
|
{% block breadcrumb_content %}
|
||||||
{% if source.organization %}
|
{% if source.organization %}
|
||||||
|
{% set org = source.organization %}
|
||||||
<li>{{ h.nav_named_link(_('Organizations'), 'organizations_index') }}</li>
|
<li>{{ h.nav_named_link(_('Organizations'), 'organizations_index') }}</li>
|
||||||
<li>{{ h.nav_named_link(source.organization.title or source.organization.name|truncate(10), 'organization_read', id=source.organization.name) }}</li>
|
<li>{{ h.nav_named_link(org.title or org.name|truncate(10), 'organization_read', id=org.name) }}</li>
|
||||||
<li>{{ h.nav_named_link(_('Harvest Sources'), '{0}_search'.format(c.dataset_type)) }}</li>
|
<li>{{ h.nav_named_link(_('Harvest Sources'), '{0}_search'.format(c.dataset_type)) }}</li>
|
||||||
<li{{ self.breadcrumb_content_root_selected() }}>{{ h.nav_named_link(c.harvest_source.title|truncate(10), '{0}_read'.format(c.dataset_type), id=c.harvest_source.name) }}</li>
|
<li{{ self.breadcrumb_content_root_selected() }}>{{ h.nav_named_link(c.harvest_source.title|truncate(10), '{0}_read'.format(c.dataset_type), id=c.harvest_source.name) }}</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<h1 class="hide-heading">{{ _('Harvest Sources') }}</h1>
|
<h1 class="hide-heading">{{ _('Harvest Sources') }}</h1>
|
||||||
<div class="primary">
|
<div class="primary">
|
||||||
|
<div class="m-bottom">
|
||||||
|
<a href="{{ h.url_for('harvest_new', group=c.group_dict.id) }}" class="btn btn-primary">
|
||||||
|
<i class="icon-plus-sign-alt"></i>
|
||||||
|
{{ _('Add Harvest Source') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<h3 class="results">
|
<h3 class="results">
|
||||||
{%- if c.page.item_count -%}
|
{%- if c.page.item_count -%}
|
||||||
{{ c.page.item_count }} harvest sources{{ _(" found for \"{query}\"").format(query=c.q) if c.q }}
|
{{ c.page.item_count }} harvest sources{{ _(" found for \"{query}\"").format(query=c.q) if c.q }}
|
||||||
|
@ -15,7 +21,11 @@
|
||||||
{{ _('Harvest Sources') }}
|
{{ _('Harvest Sources') }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</h3>
|
</h3>
|
||||||
|
{% if c.page.item_count %}
|
||||||
{% snippet 'snippets/source_list.html', sources=c.page.items, within_organization=true %}
|
{% snippet 'snippets/source_list.html', sources=c.page.items, within_organization=true %}
|
||||||
|
{% else %}
|
||||||
|
<p class="empty">{{ _('Sorry no harvest sources found') }}</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<aside class="tertiary">
|
<aside class="tertiary">
|
||||||
<form method="GET">
|
<form method="GET">
|
||||||
|
@ -30,4 +40,3 @@
|
||||||
</div>
|
</div>
|
||||||
{{ c.page.pager() }}
|
{{ c.page.pager() }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue