<!-- $Id: serveradmin.tt2 6514 2010-06-14 16:53:37Z david.verdin $ -->

<div class="block">
[% IF subaction == '' or subaction == 'm_lists' %]
<h2>[%|loc%]Lists[%END%]</h2>
<div>
    <h3>[%|loc%]Manage lists[%END%]</h3><br/>
    <div>
        <a class="actionMenuLinks" href="[% path_cgi %]/get_pending_lists">[%|loc%]Pending lists[%END%]</a>
        <a class="actionMenuLinks" href="[% path_cgi %]/get_closed_lists">[%|loc%]Closed lists[%END%]</a>
    </div>
    <h3>[%|loc%]Consult lists[%END%]</h3><br/>
    <div>
         <a class="actionMenuLinks" href="[% path_cgi %]/get_latest_lists">[%|loc%]Lists sorted by creation date[%END%]</a>
         <a class="actionMenuLinks" href="[% path_cgi %]/get_inactive_lists">[%|loc%]Lists sorted by last message date[%END%]</a>
    </div>
</div>
[% END %] 

[% IF main_robot %]
  [% IF subaction == 'vhosts' %]
<h2>[%|loc%]Virtual Robots[%END%]</h2> <br />
<div>
  [% IF robots %]
    [%|loc%]The following virtual robots are running on this server:[%END%]
    <ul>
    [% FOREACH vr = robots %]<li><a href="[% vr.value.wwsympa_url %]/serveradmin">[% vr.key %]</a> - <i>[%|loc%]Sympa URL:[%END%]</i> <b>[% vr.value.wwsympa_url %]</b> - <i>[%|loc%]Mail domain:[%END%]</i> <b>[% vr.value.host %]</b> - <i>[%|loc%]Listmaster(s):[%END%]</i> <b>[% FOREACH admin = vr.value.listmaster %][% admin %] [% END %]</b></li>[% END %]
    </ul>
  [% ELSE %]
    [%|loc%]No Virtual Robot defined on this server[%END%]
  [% END %]
</div>
  [% END %]
[% END %]

[% IF families -%]
  [% IF subaction == 'families' %]
<h2>[%|loc%]Families[%END%]</h2><br />
<div>
  <form action="[% path_cgi %]" method="post">
  <fieldset>
  <select name="family_name">
    [% FOREACH f = families %]
	<option value='[% f %]'>[% f %]</option>[% END %]
  </select>
  <input class="MainMenuLinks" type="submit" name="action_review_family" value="[%|loc%]Review lists from this family[%END%]" />
  </fieldset>
  </form>     

</div>
  [% END %]
[% END %] 
[% IF subaction == 'users' %]
<h2>[%|loc%]Users[%END%]</h2><br />
<div>
        <form action="[% path_cgi %]" method="post">
	<fieldset>
	  <input type="text" name="email" size="30" value="[% email %]" />
	  <input type="hidden" name="action" value="search_user" />
	  <input class="MainMenuLinks" type="submit" name="action_search_user" value="[%|loc%]Search User[%END%]" />
	</fieldset>
	</form>
</div>

<div>
<form class="bold_label" action="[% path_cgi %]" method="post">
<fieldset>

<label for="session_delay">[%|loc%]Delay for active sessions (minutes)[%END%] </label>
<input type="text" id="session_delay" name="session_delay" size="2" value="10" /><br /> 
<label for="connected_only">[%|loc%]Show only connected users[%END%] </label>
<input type="checkbox" id="connected_only" name="connected_only" />
<input class="MainMenuLinks" type="submit" name="action_show_sessions" value="[%|loc%]Show sessions[%END%]" />
<br />
</fieldset>
</form>
</div>

<h3>[%|loc%]You can change your users email address here:[%END%]</h3><br />

[%|loc%]Changing a user's email address will apply the change his memberships but it will also apply to his ownerships if he is owner of some lists.[%END%]<br />

<div>
<form class="bold_label" action="[% path_cgi %]" method="post">
<fieldset>
<label for="old_email">[%|loc%]Current user email address: [%END%]</label><input id="old_email" type="text" name="old_email" size="30" /><br />

<label for="new_email">[%|loc%]New user email address: [%END%]</label><input id="new_email" type="text" name="new_email" size="30" />
<input type="hidden" name="action" value="change_email">
<input class="MainMenuLinks" type="submit" name="action_change_email" value="[%|loc%]Update user memberships[%END%]" />
</fieldset>
</form>
</div>

<h3>[%|loc%]Change identity[%END%]</h3><br />
<div>
[%|loc%]As listmaster, you can change your identity and act as someone else. This is may be usefull when providing assistance or to test users privileges. The new identity is attached to the current session[%END%]<br/>

<form class="bold_label" action="[% path_cgi %]" method="post">
<fieldset>
<input class="MainMenuLinks" type="submit" name="action_set_session_email" value="[%|loc%]change identity as: [%END%]" />
<input id="session_email" type="text" name="email" size="50"/> 
</fieldset>
</form>
</div>
[% END %] 

[% IF subaction == 'archives' %]
<h2>[%|loc%]Archives[%END%]</h2><br />
<div>
[%|loc%]Rebuild HTML archives using "arctxt" directories as input.[%END%]<br />
<form action="[% path_cgi %]" method="post">
<fieldset>
<label for="list">[%|loc%]listname: [%END%]</label><input id="list" type="text" name="list" size="20" /> <input class="MainMenuLinks" type="submit" name="action_rebuildarc" value="[%|loc%]Rebuild archive[%END%]" />
 <input class="MainMenuLinks" type="submit" name="action_rebuildallarc" value="[%|loc%]Rebuild all[%END%]" />([%|loc%]  May take a lot of CPU time,  be careful![%END%])<br />
</fieldset>
</form>

</div>
[% END %] 

[% IF subaction == 'logs' %]
<h2>[%|loc%]Logs[%END%]</h2><br />
<div>
[%|loc%]You can increase the log level specified by configuration only for your current session. On a production server, this allow to keep logs rather small and to test some features with the maximum log level. [%END%]<br/>

<form class="bold_label" action="[% path_cgi %]" method="post">
<fieldset>
[%|loc%]Log level:[%END%] 
0 <input id="log_level_0" type="radio" name="log_level" value="0" [%IF log_level == 0 %]checked="checked"[%END%]/> |
1 <input id="log_level_1" type="radio" name="log_level" value="1" [%IF log_level == 1 %]checked="checked"[%END%]/> |
2 <input id="log_level_2" type="radio" name="log_level" value="2" [%IF log_level == 2 %]checked="checked"[%END%]/> |
3 <input id="log_level_3" type="radio" name="log_level" value="3" [%IF log_level == 3 %]checked="checked"[%END%]/> |
4 <input id="log_level_4" type="radio" name="log_level" value="4" [%IF log_level == 4 %]checked="checked"[%END%]/>   
<input class="MainMenuLinks" type="submit" name="action_set_loglevel" value="[%|loc%]Set log level[%END%]" /></fieldset>
</form>
</div>
[% END %] 

[% IF subaction == 'templates' %]
<h2>[%|loc%]Templates[%END%]</h2><br />
<div>
<form class="bold_label" action="[% path_cgi %]" method="post">
<fieldset>
  <label for="file">[%|loc%]Setting defaults list templates[%END%]</label><br />
  <select id="file" name="file">
    [% FOREACH f = lists_default_files %]<option value='[% f.key %]' [% f.value.selected %]>[% f.value.complete %]</option>[% END %]
  </select>
  <input class="MainMenuLinks" type="submit" name="action_editfile" value="[%|loc%]Edit[%END%]" />
<br />

</fieldset>
</form>
<br />

<form class="bold_label" action="[% path_cgi %]" method="post">
<fieldset>
  <label for="file">[%|loc%]Setting site templates[%END%]</label><br />
  <select id="file" name="file">
    [% FOREACH f = server_files %]<option value='[% f.key %]' [% f.value.selected %]>[% f.value.complete %]</option>[% END %]
  </select>
  <input class="MainMenuLinks" type="submit" name="action_editfile" value="[%|loc%]Edit[%END%]" />
</fieldset>
</form>
	
<a class="actionMenuLinks" href="http://pootle.sympa.org/">[%|loc%]view translations[%END%]</a>
<a class="actionMenuLinks" href="[% path_cgi %]/ls_templates">[%|loc%]Customize templates[%END%]</a>
</div>
<div>
<form class="bold_label" action="[% path_cgi %]" method="post">
<fieldset>
[%|loc%]When customizing Sympa web templates, it is needed to known which variables can be processed by the tt2 parser.This button is for controlling tt2 vars dump feature:[%END%]<br/>

[% IF dumpvars == 'true' %]
  <input class="MainMenuLinks" type="submit" name="action_unset_dumpvars" value="[%|loc%]Unset template vars dump[%END%]" />
[% ELSE %]
  <input class="MainMenuLinks" type="submit" name="action_set_dumpvars" value="[%|loc%]Set template vars dump[%END%]" />
[% END %]

</fieldset>
</form>
</div>
[% END %] 

[% IF subaction == 'skins' %]
<h2>[%|loc%]Skins, CSS and colors[%END%]</h2><br />
<div>
<a class="actionMenuLinks" href="[% path_cgi %]/skinsedit">[%|loc%]Skins administration page[%END%]</a>
</div>
[% END %] 
[% IF subaction == 'edit_config' %]
<h2>[%|loc%]View main config[%END%]</h2><br />
<div>

[% SET close_table = '' %]
[% FOREACH confparam IN editable_params %]
  [% IF confparam.title %]
     [% close_table %]
     <h4> [% confparam.title %] </h4> <table class="listOfItems"><tr><th>parameter name</th><th>value</th><th>default</th><th>semantic</th></tr> 
  [% ELSE %]
     [% IF dark == '1' %]
       <tr> [% SET dark='0'%]
     [% ELSE  %]
       <tr class="color0">[% SET dark='1'%]
     [% END %]
     <td>[% confparam.name  %]</td>
     <td>
     [% IF confparam.edit == '1' %]
<form action="[% path_cgi %]" method="post">
  <fieldset>
  <input type="text" name="new_value"  value="[% confparam.current_value %]" style="width:75%"/> 
  <input type="hidden" name="conf_parameter_name" value="[% confparam.name  %]" />
  <input class="MainMenuLinks" type="submit" name="action_set_param" value="[%|loc%]Set[%END%]" style="width:20%" />
</fieldset>
</form>
[% ELSE %]
[% confparam.current_value %]
[% END %]
</td>
<td>[% confparam.default %]</td><td>[% confparam.query %]</td></tr>
     [% SET close_table = '</table>' %]
  [% END %]
[% END %]
[% close_table %]

</div>
[% END %] 
[% IF subaction == 'translation' %]
<h2>[%|loc%]Translating Sympa[%END%]</h2><br />
<div>
[%|loc%]Sympa is designed to allow easy internationalization of its user interface (service mail messages and web interface). All translations for one language are gathered in a single PO file that can be manipulated by standard GNU gettext tools.[%END%]
</div>
<div>
[%|loc%]Check our translation FAQ if you wish to translate Sympa GUI in your native language: [%END%] <a href="http://www.sympa.org/howtotranslate.html">http://www.sympa.org/howtotranslate.html</a>
</div>
[% END %] 

[% IF subaction == 'tracker' %]
<h2>[%|loc%]Submitting a bug, a feature request[%END%]</h2><br />
<div>
[%|loc%]You can submit a problem or request a new feature: [%END%]<a href="http://www.sympa.org/tracking">http://www.sympa.org/tracking</a>
</div>
[% END %] 

<br /><br /><br />

[% IF loop_count %]
<span class="bottom_page">
[%|loc(process_id,loop_count,start_time)%]This FastCGI process (%1) has served %2 pages since %3.[%END%]
</span>
[% END %]
</div>
<!-- end serveradmin.tt2 (distrib) -->
