{# Copyright (C) 2020 CERN. Copyright (C) 2020 Northwestern University. Copyright (C) 2021 Graz University of Technology. Copyright (C) 2021 TU Wien. Copyright (C) New York University. Invenio RDM Records is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {%- 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')}} | {{_('Actions')}} |
---|---|---|
{{ file.checksum }}
|
{{ file.size|filesizeformat(binary=binary_sizes) }} | {% if with_preview and file_type|lower is previewable %} {{_("Preview")}} {% endif %} {{_('Download')}} |