/
side.tt
90 lines (85 loc) · 5.07 KB
/
side.tt
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
84
85
86
87
88
89
90
<div class="flexcol flex-nowrap gap-0 w-[200px] h-full [% IF menu_states.exists('cl') && menu_states.cl == 1 %]collapsed[% END %]" id="nav-container" onmouseover="resetRefresh()">
<header class="header flex-shrink-0 hidden lg:flex h-[50px]">
<a href="[% c.config.home_link %]" target="_blank" class="m-auto block">
<img src="[% url_prefix %]themes/[% theme %]/images/logo_thruk_small.png" alt="Thruk" title="Thruk" class="h-[42px]" />
<img src="[% url_prefix %]themes/[% theme %]/images/logo_thruk_small_icon.png" alt="Thruk" title="Thruk" class="h-[36px] collapsed-only" />
</a>
</header>
<div class="navsectionlinks sticky scrollauto overflow-x-hidden grow">
<ul class="p-1 pt-0">
[% FOREACH section = navigation %]
[% cookie_section_name = section.name.replace(' ', '_') | lower %]
<li>
<a class="navsectiontitle navitem">
<i class="uil [% IF section.defined('icon') && section.icon != "" %][% section.icon | html %][% ELSE %]uil-folder[% END %] text-base h-fit"></i>
<span>[% section.name | html %]</span>
<i class="uil uil-angle-down h-fit ml-auto text-2xl"></i>
</a>
<ul class="navsectionlinks" [% IF !menu_states.exists(cookie_section_name) || menu_states.$cookie_section_name == 0 %] style="display:none;"[% END %]>
[% FOREACH link = section.links %]
[% IF link.href %]
<li class="relative">
<a class="navsectionsubtitle navitem" href="[% escape_html(link.href) %]" target="[% link.target %]">
[% link.name | html %]
</a>
[% IF link.defined("html") %][% link.html %][% END %]
[% IF link.links.size > 0 %]
<i class="uil uil-angle-down w-fit h-fit absolute right-0 top-0 mr-[-2px] px-1 rounded text-lg clickable hoverable navsectionsubtoggle"></i>
[% cookie_section_sub_name = cookie_section_name _ '.' _ link.name.replace(' ', '_') | lower %]
<ul class="navsectionsublinks" [% IF !menu_states.exists(cookie_section_sub_name) || menu_states.$cookie_section_sub_name == 0 %] style="display:none;"[% END %]>
[% FOREACH sublink = link.links %]
[% IF sublink.defined("href") && sublink.href %]
<li>
<a class="sublink navitem" href="[% escape_html(sublink.href) %]" target="[% sublink.target %]">[% sublink.name | html %]</a>
[% IF sublink.defined("html") %][% sublink.html %][% END %]
</li>
[% FOREACH addlink = sublink.links %]
<li>
<a class="sublink navitem" href="[% escape_html(addlink.href) %]" target="[% addlink.target %]">[% addlink.name | html %]</a>
</li>
[% END %]
[% ELSIF sublink.defined("html") %]
<li>[% sublink.html %]</li>
[% END %]
[% END %]
</ul>
[% END %]
</li>
[% ELSIF link.defined("search") && link.search %]
<li>
<div>
<form method="GET" action="[% url_prefix %]cgi-bin/status.cgi" target="[% link.target %]" class="pl-6 pr-[10px]">
<fieldset>
[% IF link.defined("name") && link.name != "" %]
<span class="searchlabel">[% link.name | html %]</span>
[% END %]
<input type='hidden' name='style' value='detail' />
<input type='hidden' name='s0_op' value='~' id="s0_to" />
<input type='hidden' name='s0_type' value='search' />
<input type='hidden' name='add_default_service_filter' value='1' />
<input type='search' name='s0_value' class="deletable autosubmit w-full my-[1px]" id="s0_value" placeholder="search..." />
</fieldset>
</form>
</div>
</li>
[% ELSIF link.defined("html") %]
<li>[% link.html %]</li>
[% END %]
[% END %]
</ul>
</li>
[% END %]
</ul>
</div>
<div class="h-8 flex-shrink-0 mt-auto w-full m-0 hidden lg:block collapse-btn">
<div class="flexrow flex-nowrap gap-0">
<button class="iconOnly w-full py-0 px-1.5 pl-[15px] m-0 h-8 block text-left hoverable js-menu-collapse" title="toggle collapsed side navigation.">
<i class="uil uil-angle-double-left text-2xl contents" title="collapse navigation"></i>
</button>
<button class="iconOnly w-full py-0 px-1.5 pl-[15px] m-0 h-8 block hoverable btn-nav-hide js-menu-hide" title="toggle hover side navigation.">
<i class="uil uil-angle-double-up text-2xl contents" title="hide navigation"></i>
</button>
</div>
</div>
</div>
[% PROCESS _ajax_search.tt %]