{# # This file is part of Invenio. # Copyright (C) 2012, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. #} {% extends "search/searchbar_frame.html" %} {% from "search/results.html" import render_search_results with context %} {% block global_bundles %} {{ super() }} {% bundles "formatter.css", "tags.js" %} {% endblock %} {%- set portalboxes = dict() -%} {%- for k,l in collection.portalboxes_ln|groupby('position') -%} {%- do portalboxes.update({k:l}) -%} {%- endfor -%} {% block title %} {{ portalboxes.tp }} {{ super() }} {{ portalboxes.te }} {% endblock %} {% block header %} {{ super() }} {%- set args = request.args.copy().to_dict() -%} {%- set jrec = (pagination.page-2)*pagination.per_page+1 if pagination.has_prev else 1 -%} {%- do args.update({'jrec': jrec}) -%} {%- if pagination.has_prev -%} {%- endif -%} {%- if pagination.has_next -%} {%- set jrec = (pagination.page)*pagination.per_page+1 if pagination.has_next else (pagination.pages-1)*pagination.per_page+1 -%} {%- do args.update({'jrec': jrec}) -%} {%- endif -%} {% endblock %} {%- block inner_content -%} {%- block index -%} {%- if not recids|length -%} {%- block index_noresult -%}

{{ _('Your search did not match any records. Please try again.') }}

{{ create_nearest_terms_box()|safe }}
{%- endblock index_noresult -%} {%- else -%} {%- block index_results -%}
{%- block facets %}
{%- endblock facets %} {%- block index_right -%}
{%- block facets_filter %}
{%- endblock facets_filter %} {%- block results %}
{%- block search_results -%} {{ render_search_results(recids, collection, pagination, format_record) }} {%- endblock search_results -%}
{%- endblock results %}
{%- endblock index_right -%}
{%- block filter_modal -%} {%- endblock filter_modal -%} {%- endblock index_results -%} {%- endif -%} {%- endblock index -%} {%- endblock -%} {% block javascript %} {{ super() }} {% if recids|length %} {% endif %} {% endblock %}