% if archives? %>
<%= version %>
<% else %>
<% if @item.identifier.without_ext.split('/').last == 'index' %>
href='/<%= version %><%= @item.identifier.without_ext.gsub('index', '') %>'>
<% else %>
href='/<%= version %><%= @item.identifier.without_ext + '.html' %>'>
<% end %>
<%= version %>
<% end %>