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