{# -*- coding: utf-8 -*- Copyright (C) 2021 Graz University of Technology. Invenio-Records-Marc21 is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. For the original code see the NOTE below. #} {# NOTE: copy pasted code from invenio_app_rdm/records/macros/files.html it was necessary to copy paste it to override the endpoint from invenio_app_rdm_records to invenio_records_marc21 #} {%- macro preview_file(preview_endpoint, pid_value, filename, is_preview, id='preview-iframe', width='100%', height='400' ) %} {% if is_preview %} {%- set preview_url = url_for(preview_endpoint, pid_value=pid_value, filename=filename, preview=1) -%} {% else %} {%- set preview_url = url_for(preview_endpoint, pid_value=pid_value, filename=filename) -%} {% endif %} {%- endmacro %} {% macro preview_file_box(file, pid, is_preview, record) %}
{{_('Name')}} | {{_('Size')}} | |
---|---|---|
{{ file.key }}
{{ file.checksum }} |
{{ file.size|filesizeformat }} | {% if with_preview and file_type|lower is previewable %} {{_("Preview")}} {% endif %} {{_('Download')}} |