0337d704 |
1 | {**************************************************************************} |
2 | {* *} |
3 | {* Copyright (C) 2003-2004 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> |
24 | Synchronisation depuis l'AX |
25 | </h1> |
26 | |
27 | <form action='{$smarty.request.PHP_SELF}' method='get'> |
28 | <table class="tinybicol"> |
29 | <tr> |
30 | <th>Synchroniser un utilisateur</th> |
31 | </tr> |
32 | <tr> |
33 | <td style='padding:5px'> |
34 | <input type='text' name='user' value='{$smarty.request.user}' size='40' maxlength='255'/> |
35 | <input type='submit' value='Chercher' /> |
36 | </td> |
37 | </tr> |
38 | </table> |
39 | </form> |
40 | |
41 | {if $x} |
42 | <form action='{$smarty.request.PHP_SELF}' method='post'> |
43 | {if $x.profile_from_ax} |
44 | <div style="text-align:center;margin:5px;background:green"> |
45 | <strong>Cet utilisateur a accepeté la synchronisation</strong> |
46 | </div> |
47 | {else} |
48 | <div style="text-align:center;margin:5px;background:red"> |
49 | <strong>ATTENTION ! Cet utilisateur n'a pas accepté la synchronisation</strong> |
50 | </div> |
51 | {/if} |
52 | <table class="bicol" cellpadding="0" cellspacing="0" border="1"> |
53 | <tr> |
54 | <th>champ</th> |
55 | <th style='width:50%'>x.org</th> |
56 | <th>importer</th> |
57 | <th style='width:50%'>AX</th> |
58 | </tr> |
59 | <tr class="impair"> |
60 | <td>fiche</td> |
61 | <td> |
62 | <a href='{rel}/fiche.php?user={$x.user_id}' class='popup2'>polytechnique.org</a> |
63 | </td> |
64 | <td> |
65 | </td> |
66 | <td> |
67 | <a href='http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&anc_id={$x.matricule_ax}'>polytechniciens.com</a> |
68 | </td> |
69 | </tr> |
70 | {foreach from=$watch_champs item='i'} |
71 | {if $x[$i] or $ax[$i]} |
72 | <tr class="{if ($x[$i] eq $ax[$i]) or !$ax[$i]}im{/if}pair"> |
73 | <td> |
74 | {$i} |
75 | </td> |
76 | <td> |
77 | {$x[$i]} |
78 | </td> |
79 | <td class='center'> |
80 | {if $x[$i] eq $ax[$i]} |
81 | == |
82 | {else} |
83 | {if $ax[$i]} |
84 | <input style='flat:right' type='checkbox' name='{$i}' /> |
85 | {/if} |
86 | {/if} |
87 | </td> |
88 | <td> |
89 | {$ax[$i]} |
90 | </td> |
91 | </tr> |
92 | {/if} |
93 | {/foreach} |
94 | </table> |
95 | |
96 | <table> |
97 | <tr> |
98 | <td> |
99 | {if $ax.adr[0]} |
100 | {if $x.adr} |
101 | <div> |
102 | Supprimer les adresses suivantes : |
103 | </div> |
104 | <table> |
105 | {foreach from=$x.adr item='adr'} |
106 | <tr style="padding:5px"> |
107 | <td> |
108 | <input type='checkbox' name='del_address{$adr.adrid}' /> |
109 | </td> |
110 | <td> |
111 | {include file='geoloc/address.tpl' address=$adr no_div=1} |
112 | </td> |
113 | </tr> |
114 | {/foreach} |
115 | </table> |
116 | <div> |
117 | et les remplacer par les adresses suivantes de l'AX : |
118 | </div> |
119 | {else} |
120 | <div> |
121 | Importer les adresses AX suivantes : |
122 | </div> |
123 | {/if} |
124 | <table> |
125 | {foreach from=$ax.adr item='adr' key='adrid'} |
126 | <tr style='padding:5px'> |
127 | <td> |
128 | <input type='checkbox' name='add_address{$adrid}' /> |
129 | </td> |
130 | <td> |
131 | {include file='geoloc/address.tpl' address=$adr no_div=1} |
132 | </td> |
133 | </tr> |
134 | {/foreach} |
135 | </table> |
136 | {/if} |
137 | </td> |
138 | |
139 | <td> |
140 | {if $ax.adr_pro[0].entreprise} |
141 | {if $x.adr_pro} |
142 | <div> |
143 | Supprimer les emplois suivants : |
144 | </div> |
145 | <table> |
146 | {foreach from=$x.adr_pro item='pro'} |
147 | {if ($pro.poste) or ($pro.fonction) or ($pro.entreprise)} |
148 | <tr style='padding:5px'> |
149 | <td> |
150 | <input type='checkbox' name='del_pro{$pro.entrid}' /> |
151 | </td> |
152 | <td> |
153 | {if $pro.entreprise} |
154 | <div> |
155 | <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong> |
156 | </div> |
157 | {/if} |
158 | {if $pro.secteur} |
159 | <div> |
160 | <em>Secteur : </em> |
161 | <strong>{$pro.secteur}{if $pro.ss_secteur} ({$pro.ss_secteur}){/if}</strong> |
162 | </div> |
163 | {/if} |
164 | {if $pro.fonction} |
165 | <div> |
166 | <em>Fonction : </em> <strong>{$pro.fonction}</strong> |
167 | </div> |
168 | {/if} |
169 | {if $pro.poste} |
170 | <div> |
171 | <em>Poste : </em> <strong>{$pro.poste}</strong> |
172 | </div> |
173 | {/if} |
174 | {include file='geoloc/address.tpl' address=$pro no_div=1} |
175 | </td> |
176 | </tr> |
177 | {/if} |
178 | {/foreach} |
179 | </table> |
180 | |
181 | <div> |
182 | et les remplacer par les emplois suivants de l'AX : |
183 | </div> |
184 | {else} |
185 | <div> |
186 | Importer les emplois suivants depuis l'AX : |
187 | </div> |
188 | {/if} |
189 | <table> |
190 | {foreach from=$ax.adr_pro item='pro' key='proid'} |
191 | {if ($pro.poste) or ($pro.fonction) or ($pro.entreprise)} |
192 | <tr style='padding:5px'> |
193 | <td> |
194 | <input type='checkbox' name='add_pro{$proid}' /> |
195 | </td> |
196 | <td> |
197 | {if $pro.entreprise} |
198 | <div> |
199 | <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong> |
200 | </div> |
201 | {/if} |
202 | {if $pro.fonction} |
203 | <div> |
204 | <em>Fonction : </em> <strong>{$pro.fonction}</strong> |
205 | </div> |
206 | {/if} |
207 | {include file='geoloc/address.tpl' address=$pro no_div=1} |
208 | </td> |
209 | </tr> |
210 | {/if} |
211 | {/foreach} |
212 | </table> |
213 | {/if} |
214 | </td> |
215 | </tr> |
216 | </table> |
217 | <div class='center'> |
218 | <input type='hidden' name='user' value='{$ax.uid}' /> |
219 | <input type='submit' name='importe' value='Importer' /> |
220 | </div> |
221 | </form> |
222 | {/if} |
223 | |
224 | {* vim:set et sw=2 sts=2 sws=2: *} |