{# 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 resources %} {% for resource in resources %}
{% set has_preview = preview_image and getattr(resource, preview_image_attr, None) %} {% if preview_image %} {% if has_preview %}
{% endif %} {% endif %}
{% snippet "resources/visibility", resource=resource %} {{ resource.title }} {% if resource.__class__.__tablename__ == "record" %} {% snippet "type", _module="records", resource=resource %} {% endif %}

@{{ resource.identifier }}

{% trans %}Created{% endtrans %}
{% trans %}Last modified{% endtrans %}
{% if resource.plain_description %}
{% if "plain_description" in resource._highlights %} {{ resource._highlights["plain_description"] | safe }} {% else %} {{ resource.plain_description | truncate(300, True) }} {% endif %}
{% else %} {% trans %}No description.{% endtrans %} {% endif %}
{% if resource.extras %}
{% else %}
{% endif %} {% trans %}Created by{% endtrans %}
{% if resource.extras %}
{% trans %}Extra metadata{% endtrans %}
{% endif %}
{% if has_preview %}
{% endif %}
{% if resource.extras %}
{% endif %}
{% endfor %} {% else %}
{% trans %}No results.{% endtrans %}
{% endif %}