0337d704 |
1 | {**************************************************************************} |
2 | {* *} |
8d84c630 |
3 | {* Copyright (C) 2003-2009 Polytechnique.org *} |
0337d704 |
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> |
24 | Synchronisation depuis l'AX |
25 | </h1> |
26 | |
33ae80b5 |
27 | {if $no_private_key} |
28 | <p> |
a7de4ef7 |
29 | Impossible d'utiliser ce service, il manque la clef privée AX dans la configuration de plat/al. |
33ae80b5 |
30 | </p> |
31 | {else} |
86f0a6af |
32 | <form action='admin/synchro_ax' method='post'> |
0337d704 |
33 | <table class="tinybicol"> |
34 | <tr> |
35 | <th>Synchroniser un utilisateur</th> |
36 | </tr> |
37 | <tr> |
38 | <td style='padding:5px'> |
39 | <input type='text' name='user' value='{$smarty.request.user}' size='40' maxlength='255'/> |
40 | <input type='submit' value='Chercher' /> |
41 | </td> |
42 | </tr> |
43 | </table> |
44 | </form> |
33ae80b5 |
45 | {/if} |
86f0a6af |
46 | {if $x} |
47 | <form action='admin/synchro_ax/{$x.forlife}/import' method='post'> |
0337d704 |
48 | {if $x.profile_from_ax} |
49 | <div style="text-align:center;margin:5px;background:green"> |
a7de4ef7 |
50 | <strong>Cet utilisateur a accepeté la synchronisation</strong> |
0337d704 |
51 | </div> |
52 | {else} |
53 | <div style="text-align:center;margin:5px;background:red"> |
a7de4ef7 |
54 | <strong>ATTENTION ! Cet utilisateur n'a pas accepté la synchronisation</strong> |
0337d704 |
55 | </div> |
56 | {/if} |
e8439508 |
57 | <div>Les fiches de cet utilisateur : |
dd502514 |
58 | <ul> |
7b2413f6 |
59 | <li><a href='profile/{$x.user_id}' class='popup2'>polytechnique.org</a></li> |
a3ad3d44 |
60 | <li><a href='profile/ax/{$x.user_id}'>polytechniciens.com</a></li> |
dd502514 |
61 | </ul> |
62 | </div> |
63 | {if $diff} |
0337d704 |
64 | <table class="bicol" cellpadding="0" cellspacing="0" border="1"> |
dd502514 |
65 | {foreach from=$diff key='k' item='i'} |
66 | {if ($k neq 'adr') and ($k neq 'adr_pro')} |
67 | <tr class="pair"> |
0337d704 |
68 | <td> |
dd502514 |
69 | {$k} |
0337d704 |
70 | </td> |
71 | <td> |
dd502514 |
72 | {$x[$k]} |
0337d704 |
73 | </td> |
74 | <td class='center'> |
0337d704 |
75 | </td> |
76 | <td> |
dd502514 |
77 | {$i} |
0337d704 |
78 | </td> |
79 | </tr> |
dd502514 |
80 | {/if} |
0337d704 |
81 | {/foreach} |
0337d704 |
82 | |
dd502514 |
83 | {if $diff.adr} |
84 | <tr><th> |
85 | Adresses |
86 | </th></tr> |
87 | {foreach from=$diff.adr item='adr'} |
88 | <tr><td> |
89 | {if $adr.remove} |
90 | Effacer l'adresse {$adr.adrid}. |
0337d704 |
91 | {else} |
e8439508 |
92 | {if $adr.adrid}Modifier l'adresse {$adr.adrid} :{else}Ajouter l'adresse :{/if} |
3641a0e6 |
93 | {include file='geoloc/address.tpl' address=$adr no_div=1 for="`$x.prenom` `$x.nom`"} |
0337d704 |
94 | {/if} |
dd502514 |
95 | </td></tr> |
96 | {/foreach} |
0337d704 |
97 | {/if} |
0337d704 |
98 | |
dd502514 |
99 | {if $diff.adr_pro} |
100 | <tr><th> |
101 | Emplois |
102 | </th></tr> |
103 | {foreach from=$diff.adr_pro item='pro'} |
104 | <tr><td> |
105 | {if $pro.remove} |
106 | Effacer l'emploi {$pro.entrid}. |
0337d704 |
107 | {else} |
e8439508 |
108 | {if $pro.entrid || $pro.entrid === 0}Modifier l'emploi {$pro.entrid} :{else}Ajouter l'emploi :{/if} |
dd502514 |
109 | {if $pro.entreprise} |
110 | <div> |
e8439508 |
111 | <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong> |
dd502514 |
112 | </div> |
0337d704 |
113 | {/if} |
dd502514 |
114 | {if $pro.secteur} |
115 | <div> |
e8439508 |
116 | <em>Secteur : </em> |
dd502514 |
117 | <strong>{$pro.secteur}{if $pro.ss_secteur} ({$pro.ss_secteur}){/if}</strong> |
118 | </div> |
119 | {/if} |
120 | {if $pro.fonction} |
121 | <div> |
e8439508 |
122 | <em>Fonction : </em> <strong>{$pro.fonction}</strong> |
dd502514 |
123 | </div> |
124 | {/if} |
125 | {if $pro.poste} |
126 | <div> |
e8439508 |
127 | <em>Poste : </em> <strong>{$pro.poste}</strong> |
dd502514 |
128 | </div> |
129 | {/if} |
3641a0e6 |
130 | {include file='geoloc/address.tpl' address=$pro no_div=1 for=$pro.entreprise} |
dd502514 |
131 | {/if} |
132 | </td></tr> |
133 | {/foreach} |
0337d704 |
134 | {/if} |
0337d704 |
135 | </table> |
136 | <div class='center'> |
86f0a6af |
137 | <input type='submit' value='Importer' /> |
0337d704 |
138 | </div> |
dd502514 |
139 | {else} |
140 | <div class='center'> |
a7de4ef7 |
141 | Le profil actuel est synchronisé avec les données de l'AX. |
dd502514 |
142 | </div> |
143 | {/if} |
144 | |
0337d704 |
145 | </form> |
146 | {/if} |
147 | |
a7de4ef7 |
148 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |