blob: 73363ec46feadfb76743bf85657808debef3fcba (
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
|
<% 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 -->
</span>
<!-- nav categories -->
<% if sec[:section_categories] %>
<% 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] -->
</span>
<!-- nav docs -->
<% if cat[:docs] %>
<% 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] -->
<% end %><!-- end of if cat[:docs].nil? -->
<% end %><!-- end of sec[:section_categories] -->
<% 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>
|