Skip to content

Commit

Permalink
versions: display only active versions
Browse files Browse the repository at this point in the history
  • Loading branch information
anikachurilova committed Nov 9, 2023
1 parent 4da79be commit bb56d2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/semantic-ui/zenodo_rdm/macros/record_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@
</p>

{# 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 %}

<p>
<small>{{ record.versions.index - 1 }} {{ text_content }}</small>
<small>{{ record.versions.versions_count - 1 }} {{ text_content }}</small>
</p>
{% endif %}
</div>
Expand Down

0 comments on commit bb56d2b

Please sign in to comment.