File tree Expand file tree Collapse file tree
invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,9 +99,13 @@ <h3 class="active title panel-heading {{ record.ui.access_status.id }} m-0">
9999 < th class >
100100 {%- if config.RDM_ARCHIVE_DOWNLOAD_ENABLED %}
101101 {% set archive_download_url = record.links.archive_media if is_media else record.links.archive %}
102- < a role ="button " class ="ui compact mini button right floated archive-link " href ="{{ archive_download_url }} ">
103- < i class ="file archive icon button " aria-hidden ="true "> </ i > {{_("Download all")}}
104- </ a >
102+ {%- set archive_max_size = config.RECORDS_RESOURCES_ARCHIVE_DOWNLOAD_MAX_SIZE %}
103+ {%- set archive_total_bytes = files|map(attribute='size', default=0)|sum() %}
104+ {%- if not archive_max_size or archive_total_bytes < = archive_max_size %}
105+ < a role ="button " class ="ui compact mini button right floated archive-link " href ="{{ archive_download_url }} ">
106+ < i class ="file archive icon button " aria-hidden ="true "> </ i > {{_("Download all")}}
107+ </ a >
108+ {%- endif %}
105109 {%- endif %}
106110 </ th >
107111 </ tr >
You can’t perform that action at this time.
0 commit comments