| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2010 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 | {if $no_private_key} |
| 28 | <p> |
| 29 | Impossible d'utiliser ce service, il manque la clef privée AX dans la configuration de plat/al. |
| 30 | </p> |
| 31 | {else} |
| 32 | <form action='admin/synchro_ax' method='post'> |
| 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> |
| 45 | {/if} |
| 46 | {if $x} |
| 47 | <form action='admin/synchro_ax/{$x.forlife}/import' method='post'> |
| 48 | {if $x.profile_from_ax} |
| 49 | <div style="text-align:center;margin:5px;background:green"> |
| 50 | <strong>Cet utilisateur a accepeté la synchronisation</strong> |
| 51 | </div> |
| 52 | {else} |
| 53 | <div style="text-align:center;margin:5px;background:red"> |
| 54 | <strong>ATTENTION ! Cet utilisateur n'a pas accepté la synchronisation</strong> |
| 55 | </div> |
| 56 | {/if} |
| 57 | <div>Les fiches de cet utilisateur : |
| 58 | <ul> |
| 59 | <li><a href='profile/{$x.user_id}' class='popup2'>polytechnique.org</a></li> |
| 60 | <li><a href='profile/ax/{$x.user_id}'>polytechniciens.com</a></li> |
| 61 | </ul> |
| 62 | </div> |
| 63 | {if $diff} |
| 64 | <table class="bicol" cellpadding="0" cellspacing="0" border="1"> |
| 65 | {foreach from=$diff key='k' item='i'} |
| 66 | {if ($k neq 'adr') and ($k neq 'adr_pro')} |
| 67 | <tr class="pair"> |
| 68 | <td> |
| 69 | {$k} |
| 70 | </td> |
| 71 | <td> |
| 72 | {$x[$k]} |
| 73 | </td> |
| 74 | <td class='center'> |
| 75 | </td> |
| 76 | <td> |
| 77 | {$i} |
| 78 | </td> |
| 79 | </tr> |
| 80 | {/if} |
| 81 | {/foreach} |
| 82 | |
| 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}. |
| 91 | {else} |
| 92 | {if $adr.adrid}Modifier l'adresse {$adr.adrid} :{else}Ajouter l'adresse :{/if} |
| 93 | {include file='geoloc/address.tpl' address=$adr no_div=1 for="`$x.prenom` `$x.nom`"} |
| 94 | {/if} |
| 95 | </td></tr> |
| 96 | {/foreach} |
| 97 | {/if} |
| 98 | |
| 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}. |
| 107 | {else} |
| 108 | {if $pro.entrid || $pro.entrid === 0}Modifier l'emploi {$pro.entrid} :{else}Ajouter l'emploi :{/if} |
| 109 | {if $pro.entreprise} |
| 110 | <div> |
| 111 | <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong> |
| 112 | </div> |
| 113 | {/if} |
| 114 | {if $pro.secteur} |
| 115 | <div> |
| 116 | <em>Secteur : </em> |
| 117 | <strong>{$pro.secteur}{if $pro.ss_secteur} ({$pro.ss_secteur}){/if}</strong> |
| 118 | </div> |
| 119 | {/if} |
| 120 | {if $pro.fonction} |
| 121 | <div> |
| 122 | <em>Fonction : </em> <strong>{$pro.fonction}</strong> |
| 123 | </div> |
| 124 | {/if} |
| 125 | {if $pro.poste} |
| 126 | <div> |
| 127 | <em>Poste : </em> <strong>{$pro.poste}</strong> |
| 128 | </div> |
| 129 | {/if} |
| 130 | {include file='geoloc/address.tpl' address=$pro no_div=1 for=$pro.entreprise} |
| 131 | {/if} |
| 132 | </td></tr> |
| 133 | {/foreach} |
| 134 | {/if} |
| 135 | </table> |
| 136 | <div class='center'> |
| 137 | <input type='submit' value='Importer' /> |
| 138 | </div> |
| 139 | {else} |
| 140 | <div class='center'> |
| 141 | Le profil actuel est synchronisé avec les données de l'AX. |
| 142 | </div> |
| 143 | {/if} |
| 144 | |
| 145 | </form> |
| 146 | {/if} |
| 147 | |
| 148 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |