{# this template checks for sysadmin and shows a 404 if not. This is a hack as the harvest extension has no way for restricting access #} {% extends "page.html" %} {% block subtitle %} {% if c.userobj.sysadmin %} {{ _("Harvest sources") }} {% else %} {{ gettext('Error %(error_code)s', error_code=c.code[0]) }} {% endif %} {% endblock %} {% block breadcrumb_content %}
  • {{ h.nav_link(_('Harvest Sources'), named_route='{0}_search'.format(c.dataset_type)) }}
  • {% endblock %} {% block primary_content %} {% if c.userobj.sysadmin %}
    {% block page_primary_action %}
    {{ h.snippet('snippets/add_source_button.html', dataset_type=c.dataset_type) }}
    {% endblock %} {% set facets = { 'fields': c.fields_grouped, 'search': c.search_facets, 'titles': c.facet_titles, 'translated_fields': c.translated_fields, 'remove_field': c.remove_field } %} {% set sorting = [ (_('Relevance'), 'score desc, metadata_modified desc'), (_('Name Ascending'), 'title_string asc'), (_('Name Descending'), 'title_string desc'), (_('Last Modified'), 'metadata_modified desc'), (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] %} {% snippet 'snippets/search_form.html', type='harvest', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.args, error=c.query_error, placeholder=_("Search harvest sources...") %} {{ h.snippet('snippets/source_list.html', sources=c.page.items, show_organization=true) }}
    {{ c.page.pager(q=c.q) }}
    {% else %}
    {{ _('HTTP Status 404') }}

    {{ _('Page not found') }}

    {{ _('How do I find the content I am looking for in the state portal?') }}

    {{ _('To the home page of the open data portal') }}

    {{ _('Contact') }}

    {{ _('If you have any questions or problems with the open data portal, please send an email to opendata@lr.landsh.de or use the contact form:') }}

    {{ _('To contact form') }}

    {% endif %} {% endblock %} {% block secondary_content %} {% for facet in c.facet_titles %} {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, alternative_url=h.url_for('{0}.search'.format(c.dataset_type))) }} {% endfor %} {% endblock %}