0337d704 |
1 | {**************************************************************************} |
2 | {* *} |
dd502514 |
3 | {* Copyright (C) 2003-2006 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 | |
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} |
dd502514 |
52 | <div>Les fiches de cet utilisateur : |
53 | <ul> |
54 | <li><a href='{rel}/fiche.php?user={$x.user_id}' class='popup2'>polytechnique.org</a></li> |
55 | <li><a href='http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&anc_id={$x.matricule_ax}'>polytechniciens.com</a></li> |
56 | </ul> |
57 | </div> |
58 | {if $diff} |
0337d704 |
59 | <table class="bicol" cellpadding="0" cellspacing="0" border="1"> |
dd502514 |
60 | {foreach from=$diff key='k' item='i'} |
61 | {if ($k neq 'adr') and ($k neq 'adr_pro')} |
62 | <tr class="pair"> |
0337d704 |
63 | <td> |
dd502514 |
64 | {$k} |
0337d704 |
65 | </td> |
66 | <td> |
dd502514 |
67 | {$x[$k]} |
0337d704 |
68 | </td> |
69 | <td class='center'> |
0337d704 |
70 | </td> |
71 | <td> |
dd502514 |
72 | {$i} |
0337d704 |
73 | </td> |
74 | </tr> |
dd502514 |
75 | {/if} |
0337d704 |
76 | {/foreach} |
0337d704 |
77 | |
dd502514 |
78 | {if $diff.adr} |
79 | <tr><th> |
80 | Adresses |
81 | </th></tr> |
82 | {foreach from=$diff.adr item='adr'} |
83 | <tr><td> |
84 | {if $adr.remove} |
85 | Effacer l'adresse {$adr.adrid}. |
0337d704 |
86 | {else} |
dd502514 |
87 | {if $adr.adrid}Modifier l'adresse {$adr.adrid} :{else}Ajouter l'adresse :{/if} |
88 | {include file='geoloc/address.tpl' address=$adr no_div=1} |
0337d704 |
89 | {/if} |
dd502514 |
90 | </td></tr> |
91 | {/foreach} |
0337d704 |
92 | {/if} |
0337d704 |
93 | |
dd502514 |
94 | {if $diff.adr_pro} |
95 | <tr><th> |
96 | Emplois |
97 | </th></tr> |
98 | {foreach from=$diff.adr_pro item='pro'} |
99 | <tr><td> |
100 | {if $pro.remove} |
101 | Effacer l'emploi {$pro.entrid}. |
0337d704 |
102 | {else} |
dd502514 |
103 | {if $pro.entrid || $pro.entrid === 0}Modifier l'emploi {$pro.entrid} :{else}Ajouter l'emploi :{/if} |
104 | {if $pro.entreprise} |
105 | <div> |
106 | <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong> |
107 | </div> |
0337d704 |
108 | {/if} |
dd502514 |
109 | {if $pro.secteur} |
110 | <div> |
111 | <em>Secteur : </em> |
112 | <strong>{$pro.secteur}{if $pro.ss_secteur} ({$pro.ss_secteur}){/if}</strong> |
113 | </div> |
114 | {/if} |
115 | {if $pro.fonction} |
116 | <div> |
117 | <em>Fonction : </em> <strong>{$pro.fonction}</strong> |
118 | </div> |
119 | {/if} |
120 | {if $pro.poste} |
121 | <div> |
122 | <em>Poste : </em> <strong>{$pro.poste}</strong> |
123 | </div> |
124 | {/if} |
125 | {include file='geoloc/address.tpl' address=$pro no_div=1} |
126 | {/if} |
127 | </td></tr> |
128 | {/foreach} |
0337d704 |
129 | {/if} |
0337d704 |
130 | </table> |
131 | <div class='center'> |
dd502514 |
132 | <input type='hidden' name='user' value='{$smarty.request.user}' /> |
0337d704 |
133 | <input type='submit' name='importe' value='Importer' /> |
134 | </div> |
dd502514 |
135 | {else} |
136 | <div class='center'> |
137 | Le profil actuel est synchronisé avec les données de l'AX. |
138 | </div> |
139 | {/if} |
140 | |
0337d704 |
141 | </form> |
142 | {/if} |
143 | |
144 | {* vim:set et sw=2 sts=2 sws=2: *} |