1<!-- list_menu.tt2 -->
2
3[%# Note: When is_listmaster is set, is_privileged_owner is also set. %]
4[%~ SET owner_item = owner.item(user.email) %]
5[%~ SET editor_item = editor.item(user.email) %]
6[% IF is_listmaster || owner_item || is_editor || is_subscriber %]
7    <li class="nolink role">
8        <span>
9            [%# Show picture and higher privilege of user on this list. %]
10            [%~ IF is_subscriber && pictures_display && pictures_url ~%]
11                <img class="Pictures" src="[% pictures_url %]"
12                     alt="[%|loc%]Your picture[%END%]" />
13            [%~ ELSIF owner_item || is_editor || is_subscriber ~%]
14                <i class="fa fa-user"></i>
15            [%~ END %]
16            [%~ IF is_listmaster ~%]
17                <i class="fa fa-star" style="color: #669900;"
18                   title="[%|loc%]You are listmaster.[%END%]"></i>
19            [%~ ELSIF owner_item ~%]
20                <i class="fa fa-star" title="[%|loc%]You are owner.[%END%]"></i>
21            [%~ ELSIF is_editor ~%]
22                <i class="fa fa-star-o" title="[%|loc%]You are moderator.[%END%]"></i>
23            [%~ END %]
24
25            [%# Show display name of user specific to this list. %]
26            [%~ IF top_menu ~%]
27                [%~ IF is_subscriber ~%]
28                    [% subscriber.gecos || user.gecos || user.email %]<br/>
29                [%~ ELSIF owner_item ~%]
30                    [% owner_item.gecos || user.gecos || user.email %]<br/>
31                [%~ ELSIF is_editor ~%]
32                    [% editor_item.gecos || user.gecos || user.email %]<br/>
33                [%~ END %]
34            [%~ END ~%]
35
36            [%# Show roles on this list. %]
37            [%~ IF is_listmaster ~%]
38                [%|loc%]Listmaster[%END%]
39                [%~ IF owner_item || is_editor || is_subscriber %]
40                    [%|loc%], [%END%]
41                [% END %]
42            [%~ END %]
43            [%~ IF owner_item || is_editor %]
44                [%~ IF is_privileged_owner ~%]
45                    [%|loc%]Privileged owner[%END%]
46                    [%~ IF is_subscriber %]
47                        [%|loc%], [%END%]
48                    [% END %]
49                [%~ ELSIF is_owner ~%]
50                    [%|loc%]Owner[%END%]
51                    [%~ IF is_subscriber %]
52                        [%|loc%], [%END%]
53                    [% END %]
54                [%~ ELSIF is_editor ~%]
55                    [%|loc%]Moderator[%END%]
56                    [%~ IF is_subscriber %]
57                        [%|loc%], [%END%]
58                    [% END %]
59                [%~ END %]
60            [%~ END %]
61            [%~ IF is_subscriber ~%]
62                [%|loc%]Subscriber[%END%]
63            [%~ END %]
64        </span>
65    </li>
66[%~ END %]
67<li class="menu_title[%IF top_menu%] nolink[%END%]">
68    <label>
69        <i class="fa fa-envelope-square fa-lg"></i>
70        [%|loc%]List Options[%END%]
71    </label>
72</li>
73
74[% PROCESS 'list_panel.tt2' %]
75
76<li class="divider" role="separator"></li>
77<li></li>
78[% IF action == 'info'%]
79    [% SET class = 'active' %]
80[% ELSE %]
81    [% SET class = '' %]
82[% END %]
83<li class="[% class %]">
84    <a href="[% 'info' | url_rel([list]) %]">[%|loc%]List Home[%END%]</a>
85</li>
86[% IF is_owner || is_editor %]
87    [% IF action == 'admin' || action_type == 'admin' %]
88        [% SET class = 'active' %]
89    [% ELSE %]
90        [% SET class = '' %]
91    [% END %]
92    <li class="[% class %]">
93        <a href="[% 'admin' | url_rel([list]) %]">[%|loc%]Admin[%END%]</a>
94    </li>
95[% END %]
96[% IF is_owner ||  is_editor %]
97    <li>
98        <a href="[% 'modindex' | url_rel([list]) %]">[%|loc%]Moderate[% END %]</a>
99        <ul class="vertical menu">
100            [% IF is_editor %]
101                [% IF action == 'modindex' %]
102                    [% SET class = 'active' %]
103                [% ELSE %]
104                    [% SET class = '' %]
105                [% END %]
106                <li class="[% class %]">
107                    <a href="[% 'modindex' | url_rel([list]) %]">[%|loc%]Message[%END%] ([% mod_message %]) </a>
108                </li>
109                [% IF action == 'docindex' %]
110                    [% SET class = 'active' %]
111                [% ELSE %]
112                    [% SET class = '' %]
113                [% END %]
114                [% IF is_shared_allowed && shared == 'exist' ~%]
115                    <li class="[% class %]">
116                        <a href="[% 'docindex' | url_rel([list]) %]">[%|loc%]Document[%END%] ([% mod_total_shared %])</a>
117                    </li>
118                [%~ END %]
119            [% END %]
120            [% IF is_owner %]
121                [% IF action == 'subindex' %]
122                    [% SET class = 'active' %]
123                [% ELSE %]
124                    [% SET class = '' %]
125                [% END %]
126                <li class="[% class %]">
127                    <a href="[% 'subindex' | url_rel([list]) %]">[%|loc%]Subscriptions[%END%] ([% mod_subscription %])</a>
128                </li>
129                [% IF action == 'sigindex' %]
130                    [% SET class = 'active' %]
131                [% ELSE %]
132                    [% SET class = '' %]
133                [% END %]
134                <li class="[% class %]">
135                    <a href="[% 'sigindex' | url_rel([list]) %]">[%|loc%]Unsubscriptions[%END%] ([% mod_signoff %])</a>
136                </li>
137            [% END %]
138        </ul>
139    </li>
140[% END %]
141
142[% IF is_owner %]
143    [% IF action == 'stats' %]
144        [% SET class = 'active' %]
145    [% ELSE %]
146        [% SET class = '' %]
147    [% END %]
148    <li class="[% class %]">
149        <a href="[% 'stats' | url_rel([list]) %]">[%|loc%]Statistics[%END%]</a>
150    </li>
151[% END %]
152
153[% IF (is_subscriber == '1') %]
154    [% IF may_suboptions == '1' %]
155        [% IF action == 'suboptions' %]
156            [% SET class = 'active' %]
157        [% ELSE %]
158            [% SET class = '' %]
159        [% END %]
160        <li class="[% class %]">
161            <a href="[% 'suboptions' | url_rel([list]) %]" >[%|loc%]Subscriber Options[%END%]</a>
162        </li>
163    [% END %]
164    [% IF may_signoff == '1' %]
165        [% IF action == 'signoff' %]
166            [% SET class = 'active' %]
167        [% ELSE %]
168            [% SET class = '' %]
169        [% END %]
170        <li class="[% class %]">
171            <a href="[% 'signoff' | url_rel([list],{previous_action=>action}) %]">[%|loc%]Unsubscribe[%END%]</a>
172        </li>
173    [% END %]
174[% ELSE %]
175    [% IF may_subscribe %]
176        [% IF action == 'subscribe' %]
177            [% SET class = 'active' %]
178        [% ELSE %]
179            [% SET class = '' %]
180        [% END %]
181        <li class="[% class %]">
182            <a href="[% 'subscribe' | url_rel([list],{previous_action=>action}) %]">[%|loc%]Subscribe[%END%]</a>
183        </li>
184    [% END %]
185
186    [% IF ! user.email %]
187        [% IF action == 'signoff' %]
188            [% SET class = 'active' %]
189        [% ELSE %]
190            [% SET class = '' %]
191        [% END %]
192        <li class="[% class %]">
193            <a href="[% 'signoff' | url_rel([list]) %]">[%|loc%]Unsubscribe[%END%]</a>
194        </li>
195    [% END %]
196[% END %]
197
198<li class="divider" role="separator"></li>
199<li></li>
200[% IF is_archived %]
201    [% IF user.email && arc_access || !user.email && arc_public_access %]
202        [% IF action == 'arc' || action == 'arcsearch_form' || action == 'arcsearch' %]
203            [% SET class = 'active' %]
204        [% ELSE %]
205            [% SET class = '' %]
206        [% END %]
207        <li class="[% class %]">
208            <a href="[% 'arc' | url_rel([list]) %]" >[%|loc%]Archive[%END%]</a>
209        </li>
210    [% ELSE %]
211        <li class="menuInactive2">
212            <span>[%|loc%]Archive[%END%]</span>
213        </li>
214    [% END %]
215[% END %]
216
217[% IF may_post %]
218    [% IF action == 'compose_mail' %]
219        [% SET class = 'active' %]
220    [% ELSE %]
221        [% SET class = '' %]
222    [% END %]
223    <li class="[% class %]">
224        <a href="[% 'compose_mail' | url_rel([list]) %]" >[%|loc%]Post[%END%]</a>
225    </li>
226[% ELSE %]
227    <li class="menuInactive2">
228        <span>[%|loc%]Post[%END%]</span>
229    </li>
230[% END %]
231
232[% IF 0 %][%# Change if you want to display menu item. %]
233    [% IF action == 'rss_request' %]
234        [% SET class = 'active' %]
235    [% ELSE %]
236        [% SET class = '' %]
237    [% END %]
238    <li class="[% class %]">
239        <a href="[% 'rss_request' | url_rel([list]) %]" >[%|loc%]RSS[%END%]</a>
240    </li>
241[% END %]
242
243[% IF is_shared_allowed && shared == 'exist' %]
244    [% IF may_d_read %]
245        [% IF action == 'd_read' || action == 'd_edit' || action == 'd_properties' %]
246            [% SET class = 'active' %]
247        [% ELSE %]
248            [% SET class = '' %]
249        [% END %]
250        <li class="[% class %]"><a href="[% 'd_read' | url_rel([list,'']) %]" >[%|loc%]Shared documents[%END%]</a></li>
251    [% ELSE %]
252        <li class="menuInactive2">
253            <span>[%|loc%]Shared documents[%END%]</span>
254        </li>
255    [% END %]
256[% END %]
257
258[% TRY %]
259    [% PROCESS additional_list_menu_links.tt2 %]
260[% CATCH %]
261[% END %]
262
263[% IF conf.show_report_abuse == 'on' %]
264    <li>
265        [% PROCESS report_abuse.tt2 ~%]
266    </li>
267[% END %]
268<!-- end list_menu.tt2 -->
269