aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/tpl/nav.tpl
blob: c5b378b4f777f7576352532d94bc2051f1cab8bc (plain) (blame)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
{{if $nav.login && !$userinfo}}
<div class="d-md-none p-1">
	<a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-toggle="modal" data-target="#nav-login">
		{{$nav.loginmenu.1.1}}
	</a>
	{{if $nav.register}}
	<a class="btn btn-warning btn-sm text-white" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}" >
		{{$nav.register.1}}
	</a>
	{{/if}}
</div>
{{/if}}
{{if $userinfo}}
<div class="dropdown usermenu">
	<div class="fakelink" data-toggle="dropdown">
		<img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}">
		<i class="fa fa-caret-down"></i>
	</div>
	{{if $localuser}}
	<div class="dropdown-menu">
		{{foreach $nav.usermenu as $usermenu}}
		<a class="dropdown-item"  href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a>
		{{/foreach}}
		{{if $nav.manage}}
		<a class="dropdown-item" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a>
		{{/if}}	
		{{if $nav.channels}}
		{{foreach $nav.channels as $chan}}
		<a class="dropdown-item" href="manage/{{$chan.channel_id}}" title="{{$chan.channel_name}}" role="menuitem">{{$chan.channel_name}}</a>
		{{/foreach}}
		{{/if}}
		{{if $nav.profiles}}
		<a class="dropdown-item" href="{{$nav.profiles.0}}" title="{{$nav.profiles.3}}" role="menuitem" id="{{$nav.profiles.4}}">{{$nav.profiles.1}}</a>
		{{/if}}
		{{if $nav.settings}}
		<div class="dropdown-divider"></div>
		<a class="dropdown-item" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a>
		{{/if}}
		{{if $nav.admin}}
		<div class="dropdown-divider"></div>
		<a class="dropdown-item" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a>
		{{/if}}
		{{if $nav.logout}}
		<div class="dropdown-divider"></div>
		<a class="dropdown-item" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" role="menuitem" id="{{$nav.logout.4}}">{{$nav.logout.1}}</a>
		{{/if}}
	</div>
	{{else}}
	{{if $nav.rusermenu}}
	<div class="dropdown-menu" role="menu" aria-labelledby="avatar">
		<a class="dropdown-item" href="{{$nav.rusermenu.0}}" role="menuitem">{{$nav.rusermenu.1}}</a>
		<a class="dropdown-item" href="{{$nav.rusermenu.2}}" role="menuitem">{{$nav.rusermenu.3}}</a>
	</div>
	{{/if}}
	{{/if}}
</div>
{{/if}}
<div class="navbar-toggler-right">
	{{if $nav.help.6}}
	<button id="context-help-btn" class="navbar-toggler border-0" type="button" onclick="contextualHelp(); return false;">
		<i class="fa fa-question-circle"></i>
	</button>
	{{/if}}
	<button id="expand-aside" type="button" class="navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1">
		<i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i>
	</button>
	{{if $localuser}}
	<button id="notifications-btn" type="button" class="navbar-toggler border-0 text-white" data-toggle="collapse" data-target="#navbar-collapse-1">
		<i class="fa fa-exclamation-circle"></i>
	</button>
	{{/if}}
	<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapse-2">
		<i class="fa fa-bars"></i>
	</button>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
	<ul class="navbar-nav mr-auto">
		{{if $nav.network}}
		<li class="nav-item dropdown net-button" style="display: none;">
			<a class="nav-link" href="#" title="{{$nav.network.3}}" id="{{$nav.network.4}}" data-toggle="dropdown" rel="#nav-network-menu">
				<i class="fa fa-fw fa-th"></i>
				<span class="badge badge-pill badge-default net-update"></span>
			</a>
			<div id="nav-network-menu" class="dropdown-menu" rel="network">
				<a class="dropdown-item" id="nav-network-see-all" href="{{$nav.network.all.0}}">{{$nav.network.all.1}}</a>
				<a class="dropdown-item" id="nav-network-mark-all"href="#" onclick="markRead('network'); return false;">{{$nav.network.mark.1}}</a>
				{{$emptynotifications}}
			</div>
		</li>
		{{/if}}
		{{if $nav.home}}
		<li class="nav-item dropdown home-button" style="display: none;">
			<a class="nav-link" href="#" title="{{$nav.home.3}}" id="{{$nav.home.4}}" data-toggle="dropdown" rel="#nav-home-menu">
				<i class="fa fa-fw fa-home"></i>
				<span class="badge badge-pill badge-danger home-update"></span>
			</a>
			<div id="nav-home-menu" class="dropdown-menu" rel="home">
				<a class="dropdown-item" id="nav-home-see-all" href="{{$nav.home.all.0}}">{{$nav.home.all.1}}</a>
				<a class="dropdown-item" id="nav-home-mark-all" href="#" onclick="markRead('home'); return false;">{{$nav.home.mark.1}}</a>
				{{$emptynotifications}}
			</div>
		</li>
		{{/if}}
		{{if $nav.messages}}
		<li class="nav-item dropdown mail-button" style="display: none;">
			<a class="nav-link" href="#" title="{{$nav.messages.3}}" id="{{$nav.messages.4}}" data-toggle="dropdown" rel="#nav-messages-menu">
				<i class="fa fa-fw fa-envelope"></i>
				<span class="badge badge-pill badge-danger mail-update"></span>
			</a>
			<div id="nav-messages-menu" class="dropdown-menu" rel="messages">
				<a class="dropdown-item" id="nav-messages-see-all" href="{{$nav.messages.all.0}}">{{$nav.messages.all.1}}</a>
				<a class="dropdown-item" id="nav-messages-mark-all" href="#" onclick="markRead('messages'); return false;">{{$nav.messages.mark.1}}</a>
				{{$emptynotifications}}
			</div>
		</li>
		{{/if}}
		{{if $nav.all_events}}
		<li class="nav-item dropdown all_events-button" style="display: none;">
			<a class="nav-link" href="#" title="{{$nav.all_events.3}}" id="{{$nav.all_events.4}}" data-toggle="dropdown" rel="#nav-all_events-menu">
				<i class="fa fa-fw fa-calendar"></i>
				<span class="badge badge-pill badge-default all_events-update"></span>
			</a>
			<div id="nav-all_events-menu" class="dropdown-menu" rel="all_events">
				<a class="dropdown-item" id="nav-all_events-see-all" href="{{$nav.all_events.all.0}}">{{$nav.all_events.all.1}}</a>
				<a class="dropdown-item" id="nav-all_events-mark-all" href="#" onclick="markRead('all_events'); return false;">{{$nav.all_events.mark.1}}</a>
				{{$emptynotifications}}
			</div>
		</li>
		{{/if}}
		{{if $nav.intros}}
		<li class="nav-item dropdown intro-button" style="display: none;">
			<a class="nav-link" href="{{$nav.intros.0}}" title="{{$nav.intros.3}}" id="{{$nav.intros.4}}" data-toggle="dropdown" rel="#nav-intros-menu">
				<i class="fa fa-fw fa-users"></i>
				<span class="badge badge-pill badge-danger intro-update"></span>
			</a>
			<div id="nav-intros-menu" class="dropdown-menu" rel="intros">
				<a class="dropdown-item" id="nav-intros-see-all" href="{{$nav.intros.all.0}}">{{$nav.intros.all.1}}</a>
				{{$emptynotifications}}
			</div>
		</li>
		{{/if}}
		{{if $nav.notifications}}
		<li class="nav-item dropdown notify-button" style="display: none;">
			<a class="nav-link" href="{{$nav.notifications.0}}" title="{{$nav.notifications.1}}" id="{{$nav.notifications.4}}" data-toggle="dropdown" rel="#nav-notify-menu">
				<i class="fa fa-fw fa-exclamation"></i>
				<span class="badge badge-pill badge-danger notify-update"></span>
			</a>
			<div id="nav-notify-menu" class="dropdown-menu" rel="notify">
				<a class="dropdown-item" id="nav-notify-see-all" href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a>
				<a class="dropdown-item" id="nav-notify-mark-all" href="#" onclick="markRead('notify'); return false;">{{$nav.notifications.mark.1}}</a>
				{{$emptynotifications}}
			</div>
		</li>
		{{/if}}
		{{if $nav.login && !$userinfo}}
		<li class="nav-item">
			<a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.1.1}}</a>
		</li>
		{{/if}}
		{{if $nav.register}}
		<li class="nav-item {{$nav.register.2}} d-none d-md-flex">
			<a class="nav-link" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a>
		</li>
		{{/if}}
		{{if $nav.alogout}}
		<li class="nav-item {{$nav.alogout.2}} d-none d-md-flex">
			<a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a>
		</li>
		{{/if}}
	</ul>

	<div id="banner" class="navbar-text d-none d-md-flex">{{$banner}}</div>

	<ul id="nav-right" class="navbar-nav ml-auto d-none d-md-flex">
		<li class="nav-item collapse clearfix" id="nav-search">
			<form class="form-inline" method="get" action="search" role="search">
				<input class="form-control form-control-sm mt-1 mr-2" id="nav-search-text" type="text" value="" placeholder="&#xf002; {{$help}}" name="search" title="{{$nav.search.3}}" onclick="this.submit();" onblur="closeMenu('nav-search'); openMenu('nav-search-btn');"/>
			</form>
			<div id="nav-search-spinner"></div>
		</li>
		<li class="nav-item" id="nav-search-btn">
			<a class="nav-link" href="#nav-search" title="{{$nav.search.3}}" onclick="openMenu('nav-search'); closeMenu('nav-search-btn'); $('#nav-search-text').focus(); return false;"><i class="fa fa-fw fa-search"></i></a>
		</li>
		{{if $nav.help.6}}
		<li class="nav-item dropdown {{$sel.help}}">
			<a class="nav-link {{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}" onclick="contextualHelp(); return false;"><i class="fa fa-fw fa-question-circle"></i></a>
		</li>
		{{/if}}
		<li class="nav-item dropdown" id="app-menu">
			<a class="nav-link" href="#" data-toggle="dropdown"><i class="fa fa-fw fa-bars"></i></a>
			<div class="dropdown-menu dropdown-menu-right">
				{{foreach $navapps as $navapp}}
				{{$navapp}}
				{{/foreach}}
				{{if $localuser}}
				<div class="dropdown-divider"></div>
				<a class="dropdown-item" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a>
				{{/if}}
			</div>
		</li>
	</ul>
</div>
<div class="collapse d-md-none" id="navbar-collapse-2">
	<div class="navbar-nav mr-auto">
		{{foreach $navapps as $navapp}}
		{{$navapp|replace:'dropdown-item':'nav-link'}}
		{{/foreach}}
		{{if $localuser}}
		<div class="dropdown-divider"></div>
		<a class="nav-link" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a>
		{{/if}}
	</div>
</div>
{{if $nav.help.6}}
<div id="contextual-help-content" class="contextual-help-content">
	{{$nav.help.5}}
	<div class="float-right">
		<a class="btn btn-primary btn-sm" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}"><i class="fa fa-question"></i>&nbsp;{{$fulldocs}}</a>
		<a class="contextual-help-tool" href="#" onclick="contextualHelp(); return false;"><i class="fa fa-times"></i></a>
	</div>
</div>
{{/if}}