{# Copyright 2020 Karlsruhe Institute of Technology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #}
{% if query_params.extras is not defined %}
{% else %}
{% endif %}
{% for arg, values in query_params.items() %} {% if arg not in ["query", "sort", "page", "per_page", "extras"] %} {% if isinstance(values, list) %} {% for val in values %} {% endfor %} {% else %} {% endif %} {% endif %} {% endfor %}
{% set options = [ ("_score", _("Relevance")), ("-last_modified", "{} ({})".format(_("Last modified"), _("newest first"))), ("last_modified", "{} ({})".format(_("Last modified"), _("oldest first"))), ("-created_at", "{} ({})".format(_("Created at"), _("newest first"))), ("created_at", "{} ({})".format(_("Created at"), _("oldest first"))), ("title", "{} ({})".format(_("Title"), _("ascending"))), ("-title", "{} ({})".format(_("Title"), _("descending"))), ("identifier", "{} ({})".format(_("Identifier"), _("ascending"))), ("-identifier", "{} ({})".format(_("Identifier"), _("descending"))), ] %}
{% if query_params.extras is defined %}
{% trans %}Search extras{% endtrans %}
{% endif %}
{% if query_params.extras is defined %} {% endif %}