Moving to GitHub.
[platal.git] / templates / googleapps / admin.user.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2014 Polytechnique.org                             *}
4 {*  http://opensource.polytechnique.org/                                  *}
5 {*                                                                        *}
6 {*  This program is free software; you can redistribute it and/or modify  *}
7 {*  it under the terms of the GNU General Public License as published by  *}
8 {*  the Free Software Foundation; either version 2 of the License, or     *}
9 {*  (at your option) any later version.                                   *}
10 {*                                                                        *}
11 {*  This program is distributed in the hope that it will be useful,       *}
12 {*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
13 {*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
14 {*  GNU General Public License for more details.                          *}
15 {*                                                                        *}
16 {*  You should have received a copy of the GNU General Public License     *}
17 {*  along with this program; if not, write to the Free Software           *}
18 {*  Foundation, Inc.,                                                     *}
19 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
20 {*                                                                        *}
21 {**************************************************************************}
22
23 <h1>Compte Google Apps</h1>
24
25 {if $account && $account->provisioned()}
26 {assign var=a value=$account}
27 <table class="bicol">
28   <col width="50%" />
29   <col width="50%" />
30   <tr>
31     <th colspan="2" style="text-align: left">
32       <div style="float: left; text-align: left">
33         Compte = <a href="admin/user/{$a->g_account_name}">{$a->g_account_name}</a>
34       </div>
35       <div style="float: right; text-align: right">
36         Google id = {$a->g_account_id}<br />
37         Plat/al id = {$user}
38       </div>
39     </th>
40   </tr>
41
42   <tr class="impair">
43     <td class="titre">Statut du compte</td>
44     <td>
45       <strong>{$a->g_status}</strong>
46       {if $admin_account}<br /><strong>Compte administrateur de Google Apps</strong>{/if}
47     </td>
48   </tr>
49   {if $a->suspended()}
50   <tr class="impair">
51     <td class="titre">Raison de suspension</td><td>{$a->g_suspension}</td>
52   </tr>
53   {/if}
54   <tr class="impair">
55     <td class="titre">Mots de passes synchronisés</td>
56     <td>{if $a->sync_password}oui{else}non{/if}</td>
57   </tr>
58   <tr class="impair">
59     <td class="titre">Redirection des emails</td><td>{if $googleapps_storage}activée{else}désactivee{/if}</td>
60   </tr>
61
62   <tr class="pair">
63     <td class="titre">Date de création</td><td>{$a->r_creation|date_format:"%Y-%m-%d"}</td>
64   </tr>
65   <tr class="pair">
66     <td class="titre">Dernière connexion</td><td>{$a->r_last_login|date_format:"%Y-%m-%d"}</td>
67   </tr>
68   <tr class="pair">
69     <td class="titre">Dernière utilisation du webmail</td><td>{$a->r_last_webmail|date_format:"%Y-%m-%d"}</td>
70   </tr>
71   <tr class="pair">
72     <td class="titre">Utilisation du quota d'emails</td><td>{$a->r_disk_usage/1024/1024|string_format:"%.2f"}MB</td>
73   </tr>
74
75   <tr class="impair">
76     <td class="titre">Alias email du compte</td>
77     <td>{foreach from=$a->nicknames() item=nickname}{$nickname}<br />{/foreach}{$a->g_account_name}</td>
78   </tr>
79 </table><br />
80
81 <form action="admin/googleapps/user/{$a->g_account_name}" method="post">
82   {xsrf_token_field}
83   <table class="bicol">
84     <tr>
85       <th colspan="2" style="text-align: left">Actions sur le compte</th>
86     </tr>
87
88     <tr class="impair">
89       <td colspan="2" class="titre">Statut du compte</td>
90     </tr>
91     <tr class="impair">
92       <td>&nbsp;</td>
93       <td>
94         {if $a->pending_update_suspension}
95         <div class="erreur smaller">Le statut du compte est en cours de changement. Aucune opération n'est possible.</div>
96         {elseif $a->active()}
97         <input type="submit" name="suspend" value="Suspendre le compte" />
98         {elseif $a->suspended()}
99         <input type="submit" name="unsuspend" value="Réactiver le compte" />
100         {/if}
101       </td>
102     </tr>
103
104     <tr class="pair">
105       <td colspan="2" class="titre">Mot de passe</td>
106     </tr>
107     <tr class="pair">
108       <td>&nbsp;</td>
109       <td>
110         {if !$a->active()}
111         <div class="erreur smaller">Aucune opération n'est possible sur un compte inactif.</div>
112         {elseif $a->pending_update_password}
113         <div class="erreur smaller">Le mot de passe du compte est en cours de changement. Aucune opération n'est possible.</div>
114         {elseif $a->sync_password}
115         <input type="submit" name="forcesync" value="Synchroniser les mots de passes maintenant" />
116         <input type="submit" name="nosync" value="Désactiver la synchronisation automatique" />
117         {else}
118         <input type="submit" name="sync" value="Activer la synchronisation automatique" />
119         {/if}
120       </td>
121     </tr>
122   </table>
123 </form><br />
124
125 <table class="bicol" style="text-align: center">
126   <tr>
127     <th colspan="4" style="text-align: left">Requêtes en attente</th>
128   </tr>
129   <tr>
130     <th>qid</th>
131     <th>date</th>
132     <th>statut</th>
133     <th>type</th>
134   </tr>
135   {iterate from=$requests item=r}
136   <tr class="{cycle values="impair,pair"}">
137     <td><a href="admin/googleapps/job/{$r.q_id}">{$r.q_id}</a></td>
138     <td>{$r.p_entry_date|date_format:"%Y-%m-%d %H:%M"}</td>
139     <td>{$r.p_status}</td>
140     <td>{$r.j_type}</td>
141   </tr>
142   {/iterate}
143 </table>
144 {elseif $account}
145 <p><strong>Cet utilisateur n'a pas de compte Google Apps.</strong></p>
146 {else}
147 <p><strong>Aucun utilisateur n'a été trouvé.</strong></p>
148 {/if}
149
150 <p>Retourner à la <a href="admin/googleapps">page d'administration de Google Apps</a>.</p>
151
152 {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}