Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2020-08-01 00:13:23 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2020-08-01 00:13:23 +0300
commita6be96fd90ab5040cbeb578d9a25d2576bfebdf9 (patch)
tree17cc9f1b3233d8deb639be73d23f2661c09fe40e /layouts/versions_dropdown.html
parentafe22ea888b592d25b87df8fcf34d283ff990356 (diff)
Add latest major versions to dropdown
Diffstat (limited to 'layouts/versions_dropdown.html')
-rw-r--r--layouts/versions_dropdown.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/layouts/versions_dropdown.html b/layouts/versions_dropdown.html
index 9fee13f7..a97bd869 100644
--- a/layouts/versions_dropdown.html
+++ b/layouts/versions_dropdown.html
@@ -31,6 +31,7 @@ Version
<i class="fa fa-question-circle-o" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Latest pre-release version of GitLab (master), with features available or about to become available on GitLab.com. For self-managed GitLab installations, select your version number as listed at your GitLab instance's /help URL."></i>
</a>
</li>
+ <!-- Start of online versions -->
<li class="dropdown-divider"></li>
<% @items['/_data/versions.yaml'][:online].each do |version| %>
<!--
@@ -54,6 +55,32 @@ Version
</li>
<% end %>
<% end %>
+ <!-- End of online versions -->
+ <!-- Start of last major versions -->
+ <li class="dropdown-divider"></li>
+ <% @items['/_data/versions.yaml'][:previous_majors].each do |version| %>
+ <!--
+ 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? %>
+ <li>
+ <a href='/archives/'>
+ <%= version %>
+ </a>
+ </li>
+ <% else %>
+ <li>
+ <a<%= active_dropdown(version) %> href='/<%= version %><%= @item.identifier.without_ext + '.html' %>'>
+ <%= version %>
+ </a>
+ </li>
+ <% end %>
+ <% end %>
+ <!-- End of last major versions -->
<li class="dropdown-divider"></li>
<li><a<%= active_dropdown('archives') %> href='/archives/'>Archives</a></li>
</ul>