From 4dc4a6f04a946c5df60c3fd3f1279a25c3d99a8e Mon Sep 17 00:00:00 2001 From: anikachurilova Date: Thu, 9 Nov 2023 10:07:09 +0100 Subject: [PATCH] versions: display only active versions * closes https://github.com/zenodo/rdm-project/issues/515 --- templates/semantic-ui/zenodo_rdm/macros/record_item.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/semantic-ui/zenodo_rdm/macros/record_item.html b/templates/semantic-ui/zenodo_rdm/macros/record_item.html index 30c528af..22ada061 100644 --- a/templates/semantic-ui/zenodo_rdm/macros/record_item.html +++ b/templates/semantic-ui/zenodo_rdm/macros/record_item.html @@ -134,15 +134,15 @@

{# Versions info desktop/tablet #} - {% if record.versions.index > 1 %} - {% set num_versions = record.versions.index %} + {% if record.versions.versions_count > 1 %} + {% set num_versions = record.versions.versions_count %} {% set text_content = _("more versions exist for this record") %} {% if num_versions == 2 %} {% set text_content = _("more version exist for this record") %} {% endif %}

- {{ record.versions.index - 1 }} {{ text_content }} + {{ record.versions.versions_count - 1 }} {{ text_content }}

{% endif %}