Administrators can easily switch between skins (without affecting their
[platal.git] / templates / skin / common.menu.tpl
index 5bb7c46..58004c8 100644 (file)
@@ -68,9 +68,7 @@
 {if $smarty.session.user->googleapps}
 <div class="menu_item"><a href="http://gmail.polytechnique.org/">Emails Google Apps</a></div>
 {/if}
-{if $smarty.session.user->checkPerms('lists')}
 <div class="menu_item"><a href="lists">Listes de diffusion</a></div>
-{/if}
 {if $smarty.session.user->checkPerms('payment')}
 <div class="menu_item"><a href="payment">TĂ©lĂ©paiements</a></div>
 {/if}
 <div class="menu_item"><a href="marketing">Marketing</a></div>
 <div class="menu_item"><a href="admin/">Administration</a></div>
 <div class="menu_item"><a href="purge_cache?token={xsrf_token}">Clear cache</a></div>
-<div class="menu_item"><a href="get_rights/user">Devenir utilisateur</a></div>
 <div class="menu_item"><a href="http://trackers.polytechnique.org">Trackers</a></div>
 <div class="menu_item"><a href="http://support.polytechnique.org">Support</a></div>
+<form method="post" action="set_skin">
+  {xsrf_token_field}
+  <div class="menu_item" style="clear: both">
+    Skin
+    <select name="change_skin" onchange="this.form.submit()" style="margin: 0; padding: 0; float:
+    right">
+      {foreach from=$skin_list item=name key=tpl}
+      <option value="{$tpl}" {if $smarty.session.skin eq $tpl}selected="selected"{/if}>{$name}</option>
+      {/foreach}
+    </select>
+  </div>
+</form>
+<form method="post" action="get_rights">
+  {xsrf_token_field}
+  <div class="menu_item" style="clear: both">
+    Droits
+    <select name="account_type" onchange="this.form.submit()" style="margin: 0; padding: 0; float:
+    right">
+      <option value="admin">Administrateur</option>
+      {foreach from=$account_types_list item=type}
+      <option value="{$type}">{$type}</option>
+      {/foreach}
+    </select>
+  </div>
+</form>
 
 <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
   <tr><th>Validations</th></tr>