blob: dd563e0197dfe7b8cb9bd4636148a556f6e98f18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<!--
If we are on the archives page, the link here is hardcoded to always
point to `/archives/`. If you visit https://docs.gitlab.com/archives/
and select a version from the dropdown, that version's archives page
will be shown. We want to always show the latest archives page as it
contains all current versions and offline archives.
-->
<% if archives? %>
<a class="dropdown-item" href='/archives/'>
<%= version %>
</a>
<% else %>
<!-- Use canonical URLs. If the URL contains 'index', remove it. -->
<% if @item.identifier.without_ext.split('/').last == 'index' %>
<a class="dropdown-item" <%= active_dropdown(version) %> href='/<%= version %><%= @item.identifier.without_ext.gsub('index', '') %>'>
<% else %>
<a class="dropdown-item" <%= active_dropdown(version) %> href='/<%= version %><%= @item.identifier.without_ext + '.html' %>'>
<% end %>
<%= version %>
</a>
<% end %>
|