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

global_nav.html « layouts - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9d856262a311f2b02a322fce5595579ff9c0f98c (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<% dir = @item.identifier.to_s[%r{(?<=/)[^/]+}] %>
<nav class="global-nav-content">
  <!-- nav sections -->
  <% @items['/_data/global-nav.yaml'][:sections].each do |sec| %>
    <div class="global-nav-section">
      <span class="global-nav-block-top nav-link">
        <% if dir != 'ce' %>
          <a class="global-nav-link level-0 <% if @item.path == "/#{dir}/#{sec[:section_url]}" %>active<% end %>" href="/ee/<%= sec[:section_url] %>">
          <%= sec[:section_title] %>
          </a>
        <% else %>
          <a class="global-nav-link level-0 <% if @item.path == "/#{dir}/#{sec[:section_url]}" %>active<% end %>" href="/<%= dir %>/<%= sec[:section_url] %>">
            <%= sec[:section_title] %>
          </a>
        <% end %><!-- end of if dir -->
        <div class="section-title <% if sec[:section_categories] %>collapse-toggle<% end %> <% if @item.path == "/#{dir}/#{sec[:section_url]}" %>active<% else %>collapsed<% end %>" data-toggle="collapse" aria-expanded="false" data-target="#<%= sec[:section_title].gsub(/[\s\/]/, '') %>"></div>
      </span>

      <!-- nav categories -->
      <% if sec[:section_categories] %>
      <div class="collapse <% if @item.path == "/#{dir}/#{sec[:section_url]}" %>show<% end %>" id="<%= sec[:section_title].delete(' ') %>">
        <% sec[:section_categories].each do |cat| %>
          <span class="global-nav-cat nav-link">
            <% if cat[:external_url] %>
              <a class="global-nav-link level-1" href="<%= cat[:category_url] %>" target="_blank">
                <%= cat[:category_title] %>
              </a>
            <% else %>
             <% if dir != 'ce' %>
                <a class="global-nav-link level-1 <% if @item.path == "/#{dir}/#{cat[:category_url]}" %>active<% end %>" href="/ee/<%= cat[:category_url] %>">
                  <%= cat[:category_title] %>
                  <% if cat[:ee_only] %>
                    <span class="badges-drop global-nav-badges" data-toggle="tooltip" data-placement="top" title="Available in <%= cat[:ee_tier] %>"><i class="fa fa-info-circle" aria-hidden="true"></i></span>
                  <% end %><!-- end of if cat[:ee_only] -->
                </a>
              <% else %>
                <a class="global-nav-link level-1 <% if @item.path == "/#{dir}/#{cat[:category_url]}" %>active<% end %>" href="/<%= dir %>/<%= cat[:category_url] %>">
                  <%= cat[:category_title] %>
                  <% if cat[:ee_only] %>
                    <span class="badges-drop global-nav-badges" data-toggle="tooltip" data-placement="top" title="Available in <%= cat[:ee_tier] %>"><i class="fa fa-info-circle" aria-hidden="true"></i></span>
                  <% end %><!-- end of if cat[:ee_only] -->
                </a>
              <% end %><!-- end of if dir != 'ce' -->
            <% end %><!-- end of if cat[:external_url] -->
            <div class="<% if cat[:docs] %>collapse-toggle<% end %> <% if @item.path == "/#{dir}/#{cat[:category_url]}" %>active<% else %>collapsed<% end %>" data-toggle="collapse" aria-expanded="false" data-target="#<%= cat[:category_title].gsub(/[\s\/]/, '') %>"></div>
          </span>

          <!-- nav docs -->
          <% if cat[:docs] %>
            <div class="collapse <% if @item.path == "/#{dir}/#{cat[:category_url]}" %>show<% end %>" id="<%= cat[:category_title].gsub(/[\s\/]/, '') %>">
            <% cat[:docs].each do |doc| %>
              <span class="nav-link">
                <% if doc[:external_url] %>
                  <a class="global-nav-link level-2" href="<%= doc[:doc_url] %>" target="_blank">
                    <%= doc[:doc_title] %>
                  </a>
                <% else%>
                  <% if dir != 'ce' %>
                    <a class="global-nav-link level-2 <% if @item.path == "/#{dir}/#{doc[:doc_url]}" %>active<% end %>" href="/ee/<%= doc[:doc_url] %>">
                      <%= doc[:doc_title] %>
                      <% if doc[:ee_only] %>
                        <span class="badges-drop global-nav-badges" data-toggle="tooltip" data-placement="top" title="Available in <%= doc[:ee_tier] %>"><i class="fa fa-info-circle" aria-hidden="true"></i></span>
                      <% end %><!-- end if doc[:ee_only] -->
                    </a>
                  <% else %>
                    <a class="global-nav-link level-2 <% if @item.path == "/#{dir}/#{doc[:doc_url]}" %>active<% end %>" href="/<%= dir %>/<%= doc[:doc_url] %>">
                      <%= doc[:doc_title] %>
                      <% if doc[:ee_only] %>
                        <span class="badges-drop global-nav-badges" data-toggle="tooltip" data-placement="top" title="Available in <%= doc[:ee_tier] %>"><i class="fa fa-info-circle" aria-hidden="true"></i></span>
                      <% end %><!-- end if doc[:ee_only] -->
                    </a>
                  <% end %><!-- end of if dir != 'ce' -->
                <% end %><!-- end of if doc[:external_url] -->
              </span>
            <% end %><!-- end of cat[:docs] -->
            </div>
          <% end %><!-- end of if cat[:docs].nil? -->
        <% end %><!-- end of sec[:section_categories] -->
      </div>
      <% end %><!-- end of if sec[:section_categories].nil? -->
    </div><!-- end of div class="global-nav-section" -->
  <% end %><!-- end of @items['/_data/global-nav.yaml'] -->
</nav>