9e570fe0 |
1 | {**************************************************************************} |
2 | {* *} |
3 | {* Copyright (C) 2003-2006 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>Gestion des adresses en doublon</h1> |
24 | |
25 | {if $action eq "list"} |
26 | <table class="bicol"> |
27 | <tr> |
28 | <th>Adresse</th> |
29 | <th>Etat</th> |
30 | <th>Utilisateurs</th> |
31 | <th></th> |
32 | </tr> |
33 | <tr> |
34 | <tr class="impair"> |
35 | <td colspan="2"> |
36 | <strong>Ajouter une entrée manuellement</strong> |
37 | </td> |
38 | <td colspan="2" class="right"> |
39 | <strong><a href="admin/emails/duplicated/create">créer{icon name=add}</a></strong> |
40 | </td> |
41 | </tr> |
42 | {foreach from=$table item=doublon} |
43 | <tr class="{cycle values="pair,impair"}"> |
44 | <td> |
45 | <strong>{$doublon.mail}</strong><br /> |
46 | Détecté le {$doublon.detection|date_format} |
47 | </td> |
48 | <td> |
49 | {$doublon.state} |
50 | </td> |
51 | <td class="right"> |
52 | {foreach from=$doublon.users item=user name=all} |
3bfc5bfe |
53 | <a href="profile/{$user}" class="popup2">{$user}{icon name=user_suit title="Fiche"}</a> |
9e570fe0 |
54 | <a href="admin/user/{$user}">{icon name=wrench title="Administrer}</a>{if !$smarty.foreach.all.last}<br />{/if} |
55 | {/foreach} |
56 | </td> |
57 | <td class="right"> |
58 | <a href="admin/emails/duplicated/edit/{$doublon.mail}">{icon name=page_edit title="Editer"}</a> |
59 | <a href="admin/emails/duplicated/delete/{$doublon.mail}">{icon name=delete title="Supprimer"}</a> |
60 | </td> |
61 | </tr> |
62 | {/foreach} |
63 | </table> |
64 | {elseif $action eq "create" || $action eq "edit"} |
65 | [<a href="admin/emails/duplicated">Retour à la liste des doublons</a>]<br /><br /> |
66 | <form method="post" action="admin/emails/duplicated"> |
67 | <table class="tinybicol"> |
68 | <tr> |
3bfc5bfe |
69 | <th colspan="2">Commenter le doublon</th> |
9e570fe0 |
70 | </tr> |
71 | <tr class="impair"> |
3bfc5bfe |
72 | <td class="titre">Adresse mail</td> |
9e570fe0 |
73 | {if $action eq "create"} |
74 | <td><input type="text" name="emailN" /></td> |
75 | {else} |
76 | <td> |
77 | <a href="mailto:{$doublon.mail}">{icon name=email title="Envoyer un mail"}</a> |
78 | {$doublon.mail} |
79 | <input type="hidden" name="emailN" value="{$doublon.mail}" /> |
80 | </td> |
81 | {foreach from=$doublon.users key=i name=all item=user} |
82 | {if $i is even}<tr class="impair">{/if} |
83 | <td> |
3bfc5bfe |
84 | <a href="profile/{$user}" class="popup2">{$user}{icon name=user_suit title="Fiche"}</a> |
9e570fe0 |
85 | <a href="admin/user/{$user}">{icon name=wrench title="Administrer}</a>{if !$smarty.foreach.all.last}<br />{/if} |
86 | </td> |
87 | {if $i is even && $smarty.foreach.all.last}<td></td>{/if} |
88 | {if $id is odd || $smarty.foreach.all.last}</tr>{/if} |
89 | {/foreach} |
90 | </tr> |
91 | <tr class="pair"> |
3bfc5bfe |
92 | <td class="titre">Date de détection</td> |
9e570fe0 |
93 | <td>{$doublon.detection|date_format}</td> |
94 | {/if} |
95 | </tr> |
96 | <tr class="pair"> |
3bfc5bfe |
97 | <td class="titre">Danger</td> |
9e570fe0 |
98 | <td> |
99 | <select name="stateN"> |
100 | {foreach from=$states key=state item=text} |
101 | <option value="{$state}"{if $doublon.state eq $state} selected="selected"{/if}>{$text}</option> |
102 | {/foreach} |
103 | </select> |
104 | </td> |
105 | </tr> |
106 | <tr class="impair"> |
3bfc5bfe |
107 | <td colspan="2" class="titre">Description</td> |
108 | {if $doublon.edit} |
109 | <td colspan="2"> |
110 | <small>Dernière édition par {$doublon.edit} le {$doublon.last|date_format}</small> |
9e570fe0 |
111 | </td> |
3bfc5bfe |
112 | {/if} |
9e570fe0 |
113 | </tr> |
114 | <tr class="impair"> |
115 | <td colspan="2" class="center"> |
116 | <textarea cols="50" rows="10" name="descriptionN">{$doublon.description}</textarea> |
117 | </td> |
118 | </tr> |
119 | <tr> |
120 | <th colspan="2"> |
121 | <input type="hidden" name="action" value="{$action}" /> |
122 | <input type="submit" name="valid" value="Valider" /> |
123 | </th> |
124 | </tr> |
125 | </table> |
126 | </form> |
127 | {/if} |
128 | |
129 | {* vim:set et sw=2 sts=2 sws=2: *} |