Link to previous/next versions from relation version pages

This commit is contained in:
Anton Khorev 2024-01-17 21:25:07 +03:00
parent d951e4f82e
commit bfc021edf3
2 changed files with 42 additions and 4 deletions

View file

@ -9,3 +9,15 @@
<%= link_to t("browse.download_xml"), relation_version_path(*@feature.id) %>
</div>
<% end %>
<div class='secondary-actions'>
<% if @feature.version > 1 %>
<%= link_to "<< #{t('browse.version')} ##{@feature.version - 1}", old_relation_path(@feature.relation_id, @feature.version - 1) %>
&middot;
<% end %>
<%= link_to t("browse.view_history"), relation_history_path(@feature.relation_id) %>
<% if @feature.version < @feature.current_relation.version %>
&middot;
<%= link_to "#{t('browse.version')} ##{@feature.version + 1} >>", old_relation_path(@feature.relation_id, @feature.version + 1) %>
<% end %>
</div>