[#14] Couple of minor template tweaks

This commit is contained in:
John Martin 2013-03-08 12:38:41 +00:00
parent 14e51ec587
commit 2a53e4a2e4
2 changed files with 12 additions and 3 deletions

View File

@ -18,7 +18,7 @@ Example:
{% set truncate_title = truncate_title or 80 %}
{% set title = source.title or source.name %}
{% 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" }}">
<div class="dataset-content">

View File

@ -6,6 +6,12 @@
<div class="clearfix">
<h1 class="hide-heading">{{ _('Harvest Sources') }}</h1>
<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">
{%- if c.page.item_count -%}
{{ c.page.item_count }} harvest sources{{ _(" found for \"{query}\"").format(query=c.q) if c.q }}
@ -15,7 +21,11 @@
{{ _('Harvest Sources') }}
{%- endif -%}
</h3>
{% snippet 'snippets/source_list.html', sources=c.page.items, within_organization=true %}
{% if c.page.item_count %}
{% snippet 'snippets/source_list.html', sources=c.page.items, within_organization=true %}
{% else %}
<p class="empty">{{ _('Sorry no harvest sources found') }}</p>
{% endif %}
</div>
<aside class="tertiary">
<form method="GET">
@ -30,4 +40,3 @@
</div>
{{ c.page.pager() }}
{% endblock %}