1<!-- serveradmin.tt2 -->
2
3[% IF subaction == '' or subaction == 'm_lists' %]
4    <h2>[%|loc%]Lists[%END%]</h2>
5
6    <h3>[%|loc%]Information[%END%]</h3>
7        <ul>
8            <li><a href="[% 'get_pending_lists' | url_rel %]">[%|loc%]View Pending (Requested) lists[%END%]</a></li>
9            <li><a href="[% 'get_closed_lists' | url_rel %]">[%|loc%]View Closed Lists[%END%]</a></li>
10            <li><a href="[% 'get_latest_lists' | url_rel %]">[%|loc%]View Lists sorted by Creation Date[%END%]</a></li>
11            <li><a href="[% 'get_inactive_lists' | url_rel %]">[%|loc%]View Lists sorted by Last Message Date[%END%]</a></li>
12       </ul>
13[% END %]
14
15[% IF main_robot %]
16    [% IF subaction == 'vhosts' %]
17        <h2>[%|loc%]Virtual Robots[%END%]</h2> <br />
18        [% IF robots %]
19            <p>
20                [%|loc%]The following virtual robots are running on this server:[%END%]
21            </p>
22            [% FOREACH vr = robots %]
23                <h4>
24                    [% IF vr.value.wwsympa_url ~%]
25                        <a href="[% vr.value.wwsympa_url %]/serveradmin">
26                            [% vr.value.title || vr.key %]
27                        </a>
28                    [%~ ELSE ~%]
29                        [% vr.value.title || vr.key %]
30                    [%~ END %]
31                </h4>
32                <ul>
33                    <li>
34                        <i>[%|loc%]Mail domain:[%END%]</i>
35                        <b>[% vr.key %]</b>
36                    </li>
37                    [% IF vr.value.wwsympa_url ~%]
38                        <li>
39                            <i>[%|loc%]Sympa URL:[%END%]</i>
40                            <b>[% vr.value.wwsympa_url %]</b>
41                        </li>
42                    [%~ END %]
43                    <li>
44                        <i>[%|loc%]Listmaster(s):[%END%]</i>
45                        [% FOREACH admin = vr.value.listmasters ~%]
46                            [% UNLESS loop.first ~%]
47                                [% UNLESS loop.last ~%]
48                                    [%|loc%], [%END%]
49                                [%~ ELSE ~%]
50                                    [%|loc%], and [%END%]
51                                [%~ END %]
52                            [%~ END ~%]
53                            <b>[% admin %]</b>
54                        [%~ END %]
55                    </li>
56                </ul>
57            [% END %]
58        [% ELSE %]
59            <p>[%|loc%]No Virtual Robot defined on this server[%END%]</p>
60        [% END %]
61    [% END %]
62[% END %]
63
64[% IF families -%]
65    [% IF subaction == 'families' %]
66        <h2>[%|loc%]Families[%END%]</h2><br />
67        <form action="[% path_cgi %]" method="post">
68            <fieldset>
69                <select name="family_name">
70                    [% FOREACH f = families %]
71                        <option value='[% f %]'>[% f %]</option>
72                    [% END %]
73                </select>
74                <input class="MainMenuLinks" type="submit" name="action_review_family" value="[%|loc%]Review lists from this family[%END%]" />
75            </fieldset>
76        </form>
77    [% END %]
78[% END %]
79[% IF subaction == 'users' %]
80    <hr>
81    <h2>[%|loc%]Users[%END%]</h2>
82    <p>[%|loc%]Enter an email address of a user to view lists that they are subscribed to:[%END%]</p>
83    <form action="[% path_cgi %]" method="post">
84        <fieldset>
85            <div style="padding-bottom:1.0em;">
86                <input type="text" name="email" size="30" value="[% email %]" />
87            </div>
88            <input type="hidden" name="action" value="search_user" />
89            <input class="MainMenuLinks" type="submit" name="action_search_user" value="[%|loc%]Search User[%END%]" />
90        </fieldset>
91    </form>
92
93    <hr>
94    <h2>[%|loc%]Sessions[%END%]</h2>
95    <form class="bold_label" action="[% path_cgi %]" method="post">
96        <fieldset>
97            <span>[%|loc%]View session information for users connected to this web interface:[%END%]</span>
98            <label for="session_delay">[%|loc%]Delay for active sessions (minutes)[%END%] </label>
99            <input type="text" id="session_delay" name="session_delay" size="2" value="10" />
100            <input type="checkbox" id="connected_only" name="connected_only" /> <label for="connected_only">[%|loc%]Show only currently connected users[%END%] </label><br />
101            <input type="submit" name="action_show_sessions" value="[%|loc%]Show Sessions[%END%]" />
102        </fieldset>
103    </form>
104
105    <hr>
106    <h2>[%|loc%]Changing user's email[%END%]</h2>
107    <p>[%|loc%]You can update a user's email address for all their list memberships at once. If they are also list owner or list moderator, their email address for these roles will also be updated.[%END%]</p>
108    <form class="bold_label" action="[% path_cgi %]" method="post">
109        <fieldset>
110            <div>
111                <label for="current_email">[%|loc%]Current email address:[%END%]</label>
112                <input id="current_email" type="text" name="current_email" size="30" />
113            </div>
114            <div>
115                <label for="email">[%|loc%]New email address:[%END%]</label>
116                <input id="email" type="text" name="email" size="30" />
117            </div>
118            <input type="hidden" name="action" value="move_user" />
119            <input type="hidden" name="previous_action" value="serveradmin" />
120            <input class="MainMenuLinks" type="submit" name="action_move_user" value="[%|loc%]Update user's email[%END%]" />
121        </fieldset>
122    </form>
123
124    <hr>
125    <h2>[%|loc%]Impersonate another User[%END%]</h2>
126    <p>[%|loc%]Listmasters can switch context (impersonate) other users; this may be useful when providing assistance or when testing privileges.  Enter the email address of the user you'd like to switch context to:[%END%]</p>
127    <form class="bold_label" action="[% path_cgi %]" method="post">
128        <fieldset>
129            <input id="session_email" type="text" name="email" size="50"/>
130            <div style="padding-top:1.0em; clear:both;">
131                <input class="MainMenuLinks" type="submit" name="action_set_session_email" value="[%|loc%]Switch User Context[%END%]" />
132            </div>
133        </fieldset>
134    </form>
135[% END %]
136
137[% IF subaction == 'archives' %]
138    <h2>[%|loc%]Archives[%END%]</h2>
139    [%|loc%]It is possible to rebuild HTML archives for an individual list or for all lists (in batch).[%END%]
140    <hr>
141    <h3>[%|loc%]Rebuild archives for an individual list[%END%]</h3>
142    <p>[%|loc%]Enter the name of the list that you'd like to rebuild HTML archives for:[%END%]</p>
143
144    <form action="[% path_cgi %]" method="post">
145        <fieldset>
146            <label for="list"></label>
147            <input id="list" type="text" name="list" size="20" />
148            <div style="padding-top:1.0em; padding-bottom:0.25em; float:clear;">
149                <input class="MainMenuLinks" type="submit" name="action_rebuildarc" value="[%|loc%]Rebuild archive[%END%]" />
150            </div>
151
152            <h3>[%|loc%]Rebuild archives for all lists[%END%]</h3>
153            <p>
154                <b>[%|loc%]Note:[%END%]</b> [%|loc%]As this option may take a long time to complete, it is recommended (if possible) to use it during non-busy times.[%END%]
155            </p>
156            <div style="padding-bottom: 1.0em; float:clear;">
157                <input class="MainMenuLinks" type="submit" name="action_rebuildallarc" value="[%|loc%]Rebuild all[%END%]" />
158            </div>
159        </fieldset>
160    </form>
161[% END %]
162
163[% IF subaction == 'logs' %]
164    <h2>[%|loc%]System log[%END%]</h2>
165    <h3>[%|loc%]Sympa log level[%END%]</h3>
166    <p>[%|loc%]Set debug level for logs written to disk.  This setting is temporary, applying only for the lifetime of the fastcgi session hosting this interface.[%END%]</p>
167    <form class="bold_label" action="[% path_cgi %]" method="post">
168        <fieldset>
169            [%|loc%]Log level:[%END%]
170            <input id="log_level_0" type="radio" name="log_level" value="0" [%IF log_level == 0 %]checked="checked"[%END%]/>
171            <label class="inlineLabel" for="log_level_0">0 </label>
172            <input id="log_level_1" type="radio" name="log_level" value="1" [%IF log_level == 1 %]checked="checked"[%END%]/>
173            <label class="inlineLabel" for="log_level_1">1 </label>
174            <input id="log_level_2" type="radio" name="log_level" value="2" [%IF log_level == 2 %]checked="checked"[%END%]/>
175            <label class="inlineLabel" for="log_level_2">2 </label>
176            <input id="log_level_3" type="radio" name="log_level" value="3" [%IF log_level == 3 %]checked="checked"[%END%]/>
177            <label class="inlineLabel" for="log_level_3">3 </label>
178            <input id="log_level_4" type="radio" name="log_level" value="4" [%IF log_level == 4 %]checked="checked"[%END%]/>
179            <label class="inlineLabel" for="log_level_4">4 </label>
180            <input type="submit" name="action_set_loglevel" value="[%|loc%]Set log level[%END%]" />
181        </fieldset>
182    </form>
183[% END %]
184
185[% IF subaction == 'templates' %]
186    <h2>[%|loc%]Templates[%END%]</h2>
187    <form class="bold_label" action="[% path_cgi %]" method="post">
188        <fieldset>
189            <h3>[%|loc%]Edit default list template[%END%]</h3>
190            <select id="file" name="file">
191                [% FOREACH f = lists_default_files %]
192                    <option value='[% f.key %]' [% f.value.selected %]>[% f.value.complete %]</option>
193                [% END %]
194            </select>
195            <input type="submit" name="action_editfile" value="[%|loc%]Edit[%END%]" />
196        </fieldset>
197    </form>
198
199    <form class="bold_label" action="[% path_cgi %]" method="post">
200        <fieldset>
201            <h3>[%|loc%]Edit site-wide templates[%END%]</h3>
202            <select id="file" name="file">
203                [% FOREACH f = server_files %]
204                    <option value='[% f.key %]' [% f.value.selected %]>[% f.value.complete %]</option>
205                [% END %]
206            </select>
207            <input class="MainMenuLinks" type="submit" name="action_editfile" value="[%|loc%]Edit[%END%]" />
208        </fieldset>
209    </form>
210    <br />
211    <p>
212        <a class="actionMenuLinks" href="https://translate.sympa.org/">
213            [%|loc%]view translations[%END%]
214        </a>
215        <a class="actionMenuLinks" href="[% 'ls_templates' | url_rel %]">
216            [%|loc%]Customize templates[%END%]
217        </a>
218    </p>
219
220    <div>
221        <h3>[%|loc%]Dump TT2 Variables[%END%]</h3>
222        <p>[%|loc%]Toggle the dumping of available TT2 variables when rendering web interface pages. This may be useful when developing or debugging custom TT2 templates. This setting is temporary, applying only for the lifetime of the web interface fastcgi process.[%END%]</p>
223        <form class="bold_label" action="[% path_cgi %]" method="post">
224            <fieldset>
225                [% IF dumpvars == 'true' %]
226                    <input class="MainMenuLinks" type="submit" name="action_unset_dumpvars" value="[%|loc%]Disable template variables dump[%END%]" />
227                [% ELSE %]
228                    <input class="MainMenuLinks" type="submit" name="action_set_dumpvars" value="[%|loc%]Enable template variables dump[%END%]" />
229                [% END %]
230            </fieldset>
231        </form>
232    </div>
233[% END %]
234
235[% IF subaction == 'skins' %]
236    <h2>[%|loc%]Skins, CSS and colors[%END%]</h2><br />
237    <div>
238        <a class="actionMenuLinks" href="[% 'skinsedit' | url_rel %]">
239            [%|loc%]Skins administration page[%END%]
240        </a>
241    </div>
242[% END %]
243
244[% IF subaction == 'edit_config' %]
245    <h2>[%|loc%]View main config[%END%]</h2><br />
246    <div>
247        [% SET close_table = '' %]
248        [% FOREACH confparam IN editable_params %]
249            [% IF confparam.title %]
250                [% close_table %]
251                <h4> [% confparam.title %] </h4>
252                <table class="responsive listOfItems">
253                    <tr>
254                        <th>[%|loc%]parameter name[%END%]</th>
255                        <th>value</th>
256                        <th>[%|loc%]default[%END%]</th>
257                        <th>[%|loc%]semantic[%END%]</th>
258                    </tr>
259            [% ELSE %]
260                [% IF dark == '1' %]
261                    [% SET dark='0'%]
262                    <tr>
263                [% ELSE %]
264                    [% SET dark='1'%]
265                    <tr class="color0">
266                [% END %]
267                        <td>[% confparam.name  %]</td>
268                        <td>
269                            [% IF confparam.edit == '1' %]
270                                <form action="[% path_cgi %]" method="post">
271                                    <fieldset>
272                                        <input type="text" name="new_value"  value="[% confparam.current_value %]" style="width:75%"/>
273                                        <input type="hidden" name="conf_parameter_name" value="[% confparam.name  %]" />
274                                        <input class="MainMenuLinks" type="submit" name="action_set_param" value="[%|loc%]Set[%END%]" style="width:20%" />
275                                    </fieldset>
276                                </form>
277                            [% ELSE %]
278                                [% confparam.current_value %]
279                            [% END %]
280                        </td>
281                        <td>[% confparam.default %]</td>
282                        <td>[% confparam.query %]</td>
283                    </tr>
284                [% SET close_table = '</table>' %]
285            [% END %]
286        [% END %]
287        [% close_table %]
288    </div>
289[% END %]
290[% IF subaction == 'translation' %]
291    <h2>[%|loc%]Translating Sympa[%END%]</h2><br />
292    <div>
293        [%|loc%]Sympa is designed to allow easy internationalization of its user interface (service email messages and web interface). All translations for a language are gathered into a single PO file that can be manipulated by the standard GNU gettext tools.[%END%]
294    </div>
295    <div>
296        [%|loc%]Check our translation FAQ if you wish to translate the Sympa GUI into your native language: [%END%] <a href="https://translate.sympa.org/pages/help">https://translate.sympa.org/pages/help</a>
297    </div>
298[% END %]
299
300[% IF subaction == 'tracker' %]
301    <h2>[%|loc%]Submitting a bug, a feature request[%END%]</h2><br />
302    <div>
303        [%|loc%]You can submit a problem or request a new feature: [%END%]<a href="https://github.com/sympa-community/sympa/issues/new/choose">https://github.com/sympa-community/sympa/issues/new/choose</a>
304    </div>
305[% END %]
306
307
308[% IF subaction == 'logs' %]
309    [% IF loop_count %]
310        <p class="bottom_page">
311            [%|loc(process_id,loop_count,start_time)%]This FastCGI process (%1) has served %2 pages since %3.[%END%]
312        </p>
313    [% END %]
314[% END %]
315<!-- end serveradmin.tt2 (distrib) -->
316