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 Aug 14, 2024
1 parent 5c922a9 commit 4dc4a6f
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 @@ -134,15 +134,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 4dc4a6f

Please sign in to comment.