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

versions_dropdown.html « layouts - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8f6fa632a2a53b72d342a3b8fc975a5ec753c6d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!-- versions dropdown-->
<div class="choose-version">
Choose version
</div>
<div class="dropdown">
  <a role="button" class="btn btn-versions dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="versions" href="#">
    <!--
      Name the label dropdown after the release version so that you know
      which version you're browsing. For `/archives` show 'Archives' since
      they're supposed to be versionless.
      If we build on master and stable branches (versions), show the branch
      name in the dropdown menu. For local development and review apps, show
      "Versions".
    -->
    <% if archives? %>
    Archives
    <% else %>
      <% if ENV['NANOC_ENV'] == 'production' %>
        <%= ENV['CI_COMMIT_REF_NAME'] %>
      <% else %>
        Versions
      <% end %>
    <% end %>
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu versions-menu" aria-labelledby="versions">
    <li>
      <a<%= active_dropdown('master') %> href='<%= @item.identifier.without_ext + '.html' %>' class="versions-tooltip">master
        <i class="fa fa-question-circle-o" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="This documentation reflects the latest pre-release version of GitLab. Be sure to select the correct version."></i>
      </a>
    </li>
    <li class="dropdown-divider"></li>
    <% @items['/_data/versions.yaml'][:online].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 %>
    <li class="dropdown-divider"></li>
    <li><a<%= active_dropdown('archives') %> href='/archives/'>Archives</a></li>
  </ul>
</div>
<!-- versions dropdown-->