diff --git a/ckanext/harvest/templates_new/snippets/search_result_text.html b/ckanext/harvest/templates_new/snippets/search_result_text.html new file mode 100644 index 0000000..a267c3f --- /dev/null +++ b/ckanext/harvest/templates_new/snippets/search_result_text.html @@ -0,0 +1,8 @@ +{% ckan_extends %} + +{% if type == 'harvest' %} + {% set text_query = ungettext('{number} harvest source found for "{query}"', '{number} harvest sources found for "{query}"', count) %} + {% set text_query_none = _('Sorry no harvest sources found for "{query}"') %} + {% set text_no_query = ungettext('{number} harvest source found', '{number} harvest sources found', count) %} + {% set text_no_query_none = _('Sorry no harvest sources found') %} +{%- endif -%} diff --git a/ckanext/harvest/templates_new/source/admin_base.html b/ckanext/harvest/templates_new/source/admin_base.html index 94fdf69..6bf1a4e 100644 --- a/ckanext/harvest/templates_new/source/admin_base.html +++ b/ckanext/harvest/templates_new/source/admin_base.html @@ -7,30 +7,42 @@
  • {{ _('Admin') }}
  • {% endblock %} -{% block actions_content %} +{% block action_links %} + {% set show_li = c.__version == '2.0' %} {% if source.status.last_job and (source.status.last_job.status == 'New' or source.status.last_job.status == 'Running') %} -
  • Reharvest
  • + {{ '
  • ' if show_li }} Reharvest{{ '
  • ' if show_li }} {% else %} {% set locale = h.dump_json({'content': _('This will re-run the harvesting for this source. Any updates at the source will overwrite the local datasets. Sources with a large number of datasets may take a significant amount of time to finish harvesting. Please confirm you would like us to start reharvesting.')}) %} -
  • + {{ '
  • ' if show_li }} {{ _('Reharvest') }} -
  • + {{ '' if show_li }} {% endif %} {% set locale = h.dump_json({'content': _('Warning: This will remove all datasets for this source, as well as all previous job reports. Are you sure you want to continue?')}) %} -
  • + {{ '
  • ' if show_li }} {{ _('Clear') }} -
  • + {{ '' if show_li }} -
  • {{ h.nav_named_link(_('View harvest source'), '{0}_read'.format(c.dataset_type), id=source.name, class_='btn', icon='eye-open')}}
  • + {{ '
  • ' if show_li }}{{ h.nav_named_link(_('View harvest source'), '{0}_read'.format(c.dataset_type), id=source.name, class_='btn', icon='eye-open')}}{{ '
  • ' if show_li }} {% endblock %} +{# CKAN 2.0 #} +{% block actions_content %} + {{ self.action_links() }} +{% endblock %} + +{# CKAN 2.1 #} +{% block content_action %} +
    + {{ self.action_links() }} +
    +{% endblock %} {% block page_header_tabs %} {{ h.build_nav_icon('{0}_admin'.format(c.dataset_type), _('Dashboard'), id=source.name, icon='dashboard') }} diff --git a/ckanext/harvest/templates_new/source/read_base.html b/ckanext/harvest/templates_new/source/read_base.html index 9e48e1d..2e7911f 100644 --- a/ckanext/harvest/templates_new/source/read_base.html +++ b/ckanext/harvest/templates_new/source/read_base.html @@ -1,8 +1,13 @@ {% extends "source/base.html" %} +{% block admin_link %} + {{ h.nav_named_link(_('Admin'), '{0}_admin'.format(c.dataset_type), id=c.harvest_source.name, class_='btn btn-primary', icon='wrench')}} +{% endblock %} + +{# CKAN 2.0 #} {% block actions_content %} {% if authorized_user %} -
  • {{ h.nav_named_link(_('Admin'), '{0}_admin'.format(c.dataset_type), id=c.harvest_source.name, class_='btn btn-primary', icon='wrench')}}
  • +
  • {{ self.admin_link() }}
  • {% endif %} {% endblock %} @@ -33,6 +38,14 @@
    {% block page_header %}