| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2011 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 | |
| 24 | <script type="text/javascript" src="javascript/jquery.jstree.js"></script> |
| 25 | {assign var=jobid value="jobs_"|cat:$i} |
| 26 | {assign var=jobpref value="jobs[`$i`]"} |
| 27 | {assign var=sector_text value="sector_text_"|cat:$i} |
| 28 | {assign var=sector value="sector_"|cat:$i} |
| 29 | {assign var=entreprise value="entreprise_"|cat:$i} |
| 30 | {if !hasPerm('directory_private') && ($job.pub eq 'private') && !$new} |
| 31 | {assign var=hiddenjob value=true} |
| 32 | {else} |
| 33 | {assign var=hiddenjob value=false} |
| 34 | {/if} |
| 35 | {if !hasPerm('directory_private') && ($job.w_address.pub eq 'private') && !empty($job.w_address.text|smarty:nodefaults)} |
| 36 | {assign var=hiddenaddr value=true} |
| 37 | {else} |
| 38 | {assign var=hiddenaddr value=false} |
| 39 | {/if} |
| 40 | {if !hasPerm('directory_private') && ($job.w_email_pub eq 'private') && !empty($job.w_email|smarty:nodefaults)} |
| 41 | {assign var=hiddenemail value=true} |
| 42 | {else} |
| 43 | {assign var=hiddenemail value=false} |
| 44 | {/if} |
| 45 | <div id="{$jobid}"> |
| 46 | <input type="hidden" name="{$jobpref}[removed]" value="0" /> |
| 47 | <input type="hidden" name="{$jobpref}[new]" value="{if $new}1{else}0{/if}" /> |
| 48 | <input type="hidden" name="{$jobpref}[id]" value="{$i}" /> |
| 49 | <input type="hidden" name="{$jobpref}[jobid]" value="{$job.jobid}" /> |
| 50 | <table id="{$jobid}_grayed" class="bicol" style="display: none; margin-bottom: 1em"> |
| 51 | <tr> |
| 52 | <th class="grayed"> |
| 53 | <div style="float: right"> |
| 54 | <a href="javascript:restoreJob('{$jobid}','{$jobpref}')">{icon name=arrow_refresh title="Restaure l'emploi"}</a> |
| 55 | </div> |
| 56 | Restaurer l'entreprise n°{$i+1} : {if $hiddenjob}(masquée){else}<span id="{$jobid}_grayed_name"></span>{/if} |
| 57 | </th> |
| 58 | </tr> |
| 59 | </table> |
| 60 | |
| 61 | <table id="{$jobid}_cont" class="bicol" summary="Entreprise n°{$i+1}" style="margin-bottom: 1em"> |
| 62 | <tr> |
| 63 | <th colspan="2" style="text-align: right"> |
| 64 | <div class="flags" style="float: left; text-align: left"> |
| 65 | {include file="include/flags.radio.tpl" name="`$jobpref`[pub]" val=$job.pub disabled=$hiddenjob |
| 66 | mainField='jobs' mainId=$i subField='w_address,w_email,w_phone' subId=-1} |
| 67 | </div> |
| 68 | Entreprise n°{$i+1} : |
| 69 | {if $hiddenjob} |
| 70 | (masquée) |
| 71 | {if !t($job.tmp_name)} |
| 72 | <input type="hidden" name="{$jobpref}[name]" value="{$job.name}" /> |
| 73 | {/if} |
| 74 | {else} |
| 75 | {if t($job.tmp_name)}{$job.tmp_name} <small>(en cours de validation)</small>{else} |
| 76 | <input type="text" class="enterpriseName{if t($job.name_error)} error{/if}" size="35" maxlength="100" |
| 77 | name="{$jobpref}[name]" value="{$job.name}" /> |
| 78 | {/if} |
| 79 | {/if} |
| 80 | <a href="javascript:removeJob('{$jobid}','{$jobpref}')"> |
| 81 | {icon name=cross title="Supprimer cet emploi"} |
| 82 | </a> |
| 83 | </th> |
| 84 | </tr> |
| 85 | {if !t($job.tmp_name)}{if !t($job.name)} |
| 86 | <tr class="{$entreprise}" {if $hiddenjob}style="display: none"{/if}> |
| 87 | <td class="center" colspan="2"> |
| 88 | <small>Si l'entreprise ne figure pas dans la liste, |
| 89 | <a href="javascript:addEntreprise({$i})">clique ici</a> et complète les informations la concernant.</small> |
| 90 | </td> |
| 91 | </tr> |
| 92 | <tr class="{$entreprise}" style="display: none"> |
| 93 | <td class="titre">Acronyme</td> |
| 94 | <td> |
| 95 | <input type="text" size="35" maxlength="255" name="{$jobpref}[hq_acronym]" /> |
| 96 | </td> |
| 97 | </tr> |
| 98 | <tr class="{$entreprise}" style="display: none"> |
| 99 | <td class="titre">Page web</td> |
| 100 | <td> |
| 101 | <input type="text" size="35" maxlength="255" name="{$jobpref}[hq_url]" /> |
| 102 | </td> |
| 103 | </tr> |
| 104 | <tr class="{$entreprise}" style="display: none"> |
| 105 | <td class="titre">Email de contact</td> |
| 106 | <td> |
| 107 | <input type="text" maxlength="255" name="{$jobpref}[hq_email]" /> |
| 108 | </td> |
| 109 | </tr> |
| 110 | <tr class="{$entreprise}" style="display: none"> |
| 111 | <td class="titre">Adresse du siège</td> |
| 112 | <td> |
| 113 | <textarea name="{$jobpref}[hq_address]" cols="30" rows="4"></textarea> |
| 114 | </td> |
| 115 | </tr> |
| 116 | <tr class="{$entreprise}" style="display: none"> |
| 117 | <td class="titre">Téléphone</td> |
| 118 | <td> |
| 119 | <input type="text" maxlength="28" name="{$jobpref}[hq_fixed]" /> |
| 120 | </td> |
| 121 | </tr> |
| 122 | <tr class="{$entreprise}" style="display: none"> |
| 123 | <td class="titre">Fax</td> |
| 124 | <td> |
| 125 | <input type="text" maxlength="28" name="{$jobpref}[hq_fax]" /> |
| 126 | </td> |
| 127 | </tr> |
| 128 | {/if}{/if} |
| 129 | |
| 130 | <tr class="pair" {if $hiddenjob}style="display: none"{/if}> |
| 131 | <td colspan="2" class="center" style="font-style: italic">Place dans l'entreprise</td> |
| 132 | </tr> |
| 133 | <tr class="pair" id="{$sector_text}" {if $hiddenjob}style="display: none"{/if}> |
| 134 | <td class="titre">Mots-clefs</td> |
| 135 | <td class="jobs_terms"> |
| 136 | <input type="text" class="term_search" size="35"/> |
| 137 | <a href="javascript:toggleJobTermsTree({$i})">{icon name="table" title="Tous les mots-clefs"}</a> |
| 138 | <script type="text/javascript"> |
| 139 | /* <![CDATA[ */ |
| 140 | $(function() {ldelim} |
| 141 | {foreach from=$job.terms item=term} |
| 142 | addJobTerm("{$i}", "{$term.jtid}", "{$term.full_name|replace:'"':'\\"'}"); |
| 143 | {/foreach} |
| 144 | $('#jobs_{$i} .term_search').autocomplete($.plURL('profile/jobterms'), |
| 145 | {ldelim} |
| 146 | "formatItem" : displayJobTerm, |
| 147 | "extraParams" : {ldelim} "jobid" : "{$i}" {rdelim}, |
| 148 | "width" : $('#jobs_{$i} .term_search').width()*2, |
| 149 | "onItemSelect" : selectJobTerm, |
| 150 | "matchSubset" : false |
| 151 | {rdelim}); |
| 152 | {rdelim}); |
| 153 | /* ]]> */ |
| 154 | </script> |
| 155 | </td> |
| 156 | </tr> |
| 157 | <tr class="pair" {if $hiddenjob}style="display: none"{/if}> |
| 158 | <td colspan="2" class="term_tree"> |
| 159 | </td> |
| 160 | </tr> |
| 161 | <tr class="pair" id="term_tree_comment" style="display: none"> |
| 162 | <td colspan="2" class="center"><small>La catégorie « Emplois » donne une liste de métiers, « Secteurs d'activité » décrit des secteurs.</small></td> |
| 163 | </tr> |
| 164 | <tr class="pair" {if $hiddenjob}style="display: none"{/if}> |
| 165 | <td class="titre">Description</td> |
| 166 | <td> |
| 167 | <input type="text" size="35" maxlength="120" {if t($job.description_error)}class="error"{/if} |
| 168 | name="{$jobpref}[description]" value="{$job.description}" /> |
| 169 | </td> |
| 170 | </tr> |
| 171 | <tr class="pair" {if $hiddenjob}style="display: none"{/if}> |
| 172 | <td class="titre">Page perso</td> |
| 173 | <td> |
| 174 | <input type="text" size="35" maxlength="255" {if t($job.w_url_error)}class="error"{/if} |
| 175 | name="{$jobpref}[w_url]" value="{$job.w_url}" /> |
| 176 | </td> |
| 177 | </tr> |
| 178 | <tr class="pair" {if $hiddenjob}style="display: none"{/if}> |
| 179 | <td class="titre">Année d'entrée</td> |
| 180 | <td> |
| 181 | <input type="text" size="4" maxlength="4" {if t($job.w_entry_year_error)}class="error"{/if} |
| 182 | name="{$jobpref}[w_entry_year]" value="{$job.w_entry_year}" /> |
| 183 | <small>(avec 4 chiffres, par exemple 1983)</small> |
| 184 | </td> |
| 185 | </tr> |
| 186 | <tr id="{$jobid}_w_address" class="pair" {if $hiddenjob || $hiddenaddr}style="display: none"{/if}> |
| 187 | <td colspan="2"> |
| 188 | <div style="float: left"> |
| 189 | <div class="titre">Adresse</div> |
| 190 | <div class="flags"> |
| 191 | {include file="include/flags.radio.tpl" name="`$jobpref`[w_address][pub]" val=$job.w_address.pub |
| 192 | subField='w_address' mainField='jobs' mainId=$i subId=''} |
| 193 | </div> |
| 194 | <div style="margin-top: 20px; clear: both"> |
| 195 | {include file="geoloc/form.address.tpl" prefname="`$jobpref`[w_address]" |
| 196 | prefid=$jobid address=$job.w_address} |
| 197 | </div> |
| 198 | </div> |
| 199 | </td> |
| 200 | </tr> |
| 201 | {if $hiddenaddr} |
| 202 | <tr class="pair"> |
| 203 | <td class="titre" colspan="2">Adresse (masquée)</td> |
| 204 | </tr> |
| 205 | {/if} |
| 206 | {if $hiddenjob || $hiddenemail} |
| 207 | <tr class="pair" {if $hiddenjob}style="display: none"{/if}> |
| 208 | <td class="titre" colspan="2"> |
| 209 | {if $hiddenemail}Email professionnel (masqué){/if} |
| 210 | <input type="hidden" name="{$jobpref}[w_email]" value="{$job.w_email}" /> |
| 211 | <input type="hidden" name="{$jobpref}[w_email_pub]" value="{$job.w_email_pub}" /> |
| 212 | </td> |
| 213 | </tr> |
| 214 | {else} |
| 215 | {include file="include/emails.combobox.tpl" name=$jobpref|cat:'[w_email]' val=$job.w_email |
| 216 | class="pair" divId="`$jobid`_w_email" i=$i error=$job.w_email_error prefix="w_" pub=$job.w_email_pub id=$i |
| 217 | subField='w_email' mainField='jobs' mainId=$i subId=''} |
| 218 | {/if} |
| 219 | <tr class="pair" {if $hiddenjob}style="display: none"{/if}> |
| 220 | <td colspan="2"> |
| 221 | {foreach from=$job.w_phone key=t item=phone} |
| 222 | <div id="{"`$jobid`_w_phone_`$t`"}" style="clear: both"> |
| 223 | {include file="profile/phone.tpl" prefname="`$jobpref`[w_phone]" prefid="`$jobid`_w_phone" telid=$t tel=$phone |
| 224 | subField='w_phone' mainField='jobs' mainId=$i} |
| 225 | </div> |
| 226 | {/foreach} |
| 227 | {if $job.w_phone|@count eq 0} |
| 228 | <div id="{"`$jobid`_w_phone_0"}" style="clear: both"> |
| 229 | {include file="profile/phone.tpl" prefname="`$jobpref`[w_phone]" prefid="`$jobid`_w_phone" telid=0 tel=0 |
| 230 | subField='w_phone' mainField='jobs' mainId=$i} |
| 231 | </div> |
| 232 | {/if} |
| 233 | <div id="{$jobid}_w_phone_add" class="center" style="clear: both; padding-top: 4px;"> |
| 234 | <a href="javascript:addTel('{$jobid}_w_phone','{$jobpref}[w_phone]','w_phone','jobs','{$i}')"> |
| 235 | {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone |
| 236 | </a> |
| 237 | </div> |
| 238 | </td> |
| 239 | </tr> |
| 240 | </table> |
| 241 | </div> |
| 242 | |
| 243 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |