Merge commit 'origin/master' into fusionax
[platal.git] / templates / profile / jobs.job.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2009 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 {assign var=jobid value="job_`$i`"}
24 {assign var=jobpref value="jobs[`$i`]"}
25 {assign var=sector_text value="sector_text_"|cat:$i}
26 {assign var=sector value="sector_"|cat:$i}
27 {assign var=entreprise value="entreprise_"|cat:$i}
28 <div id="{$jobid}">
29   <input type="hidden" name="{$jobpref}[removed]" value="0" />
30   <input type="hidden" name="{$jobpref}[new]" value="{if $new}1{else}0{/if}" />
31   <table id="{$jobid}_grayed" class="bicol" style="display: none; margin-bottom: 1em">
32     <tr>
33       <th class="grayed">
34         <div style="float: right">
35           <a href="javascript:restoreJob('{$jobid}', '{$jobpref}')">{icon name=arrow_refresh title="Restaure l'emploi"}</a>
36         </div>
37         Restaurer l'entreprise n°{$i+1}&nbsp;:&nbsp;<span id="{$jobid}_grayed_name"></span>
38       </th>
39     </tr>
40   </table>
41   <table id="{$jobid}_cont" class="bicol" summary="Entreprise n°{$i+1}" style="margin-bottom: 1em">
42     <tr>
43       <th colspan="2" style="text-align: right">
44         <div class="flags" style="float: left; text-align: left">
45           {include file="include/flags.radio.tpl" name="`$jobpref`[pub]" val=$job.pub}
46         </div>
47         Entreprise n°{$i+1}&nbsp;:
48         {if $job.tmp_name}{$job.tmp_name} <small>(en cours de validation)</small>{else}
49         <input type="text" class="enterprise_name {if $job.name_error}error{/if}" size="35" maxlength="100"
50                name="{$jobpref}[name]" value="{$job.name}" />
51         {/if}
52         <a href="javascript:removeJob('{$jobid}', '{$jobpref}')">
53           {icon name=cross title="Supprimer cet emploi"}
54         </a>
55       </th>
56     </tr>
57     {if !$job.tmp_name}
58     <tr class="{$entreprise}">
59       <td class="center" colspan="2">
60         <small>Si ton entreprise ne figure pas dans la liste,
61         <a href="javascript:addEntreprise({$i})">clique ici</a> et complète les informations la concernant.</small>
62       </td>
63     </tr>
64     {/if}
65     <tr class="{$entreprise}" style="display: none">
66       <td class="titre">Acronyme</td>
67       <td>
68         <input type="text" size="35" maxlength="255" {if $job.acronym_error}class="error"{/if}
69                name="{$jobpref}[acronym]" value="{$job.acronym}" />
70       </td>
71     </tr>
72     <tr class="{$entreprise}" style="display: none">
73       <td class="titre">Page web</td>
74       <td>
75         <input type="text" size="35" maxlength="255" {if $job.hq_web_error}class="error"{/if}
76                name="{$jobpref}[hq_web]" value="{$job.hq_web}" />
77       </td>
78     </tr>
79     <tr class="{$entreprise}" style="display: none">
80       <td class="titre">Email de contact</td>
81       <td>
82         <input type="text" maxlength="60" {if $job.hq_email_error}class="error"{/if}
83                name="{$jobpref}[hq_email]" value="{$job.hq_email}" />
84       </td>
85     </tr>
86     <!--<tr class="{$entreprise}" style="display: none">
87       <td colspan="2">
88         <div style="float: left">
89           <div class="titre">Adresse du siège</div>
90           <div style="margin-top: 20px; clear: both">
91             {include file="geoloc/form.address.tpl" name="`$jobpref`[hq_adr]" id="`$jobid`_adr" adr=$job.hq_adr}
92           </div>
93         </div>
94       </td>
95     </tr>-->
96     <tr class="{$entreprise}" style="display: none">
97       <td class="titre">Téléphone</td>
98       <td>
99         <input type="text" maxlength="28" {if $job.hq_tel_error}class="error"{/if}
100                name="{$jobpref}[hq_tel]" value="{$job.hq_tel}" />
101       </td>
102     </tr>
103     <tr class="{$entreprise}" style="display: none">
104       <td class="titre">Fax</td>
105       <td>
106         <input type="text" maxlength="28" {if $job.hq_fax_error}class="error"{/if}
107                name="{$jobpref}[hq_fax]" value="{$job.hq_fax}" />
108       </td>
109     </tr>
110
111     <tr class="pair">
112       <td colspan="2" class="center" style="font-style: italic">Ta place dans l'entreprise</td>
113     </tr>
114     <tr class="pair {$sector_text}">
115       <td class="titre">Secteur d'activité</td>
116       <td>
117         <input type="text" class="sector_name {if $job.sector_error}error{/if}" size="35" maxlength="100"
118                name="{$jobpref}[sss_secteur_name]" value="{$job.sss_secteur_name}" />
119         <a href="javascript:displayAllSector({$i})">{icon name="table" title="Tous les secteurs"}</a>
120       </td>
121     </tr>
122     <tr class="pair {$sector}" style="display: none">
123       <td class="titre" rowspan="3">Secteur d'activité</td>
124       <td>
125         <select name="{$jobpref}[secteur]" onchange="updateJobSecteur({$i}, '{$jobid}', '{$jobpref}', ''); return true;">
126           <option value="">&nbsp;</option>
127           {foreach from=$secteurs item=secteur}
128           <option value="{$secteur.id}" {if $secteur.id eq $job.secteur}selected="selected"{/if}>
129             {$secteur.label}
130           </option>
131           {/foreach}
132         </select>
133       </td>
134     </tr>
135     <tr class="pair {$sector}" style="display: none">
136       <td id="{$jobid}_ss_secteur">
137         <input type="hidden" name="{$jobpref}[ss_secteur]" value="{$job.ss_secteur|default:'-1'}" />
138       </td>
139     </tr>
140     <tr class="pair {$sector}" style="display: none">
141       <td id="{$jobid}_sss_secteur">
142         <input type="hidden" name="{$jobpref}[sss_secteur]" value="{$job.sss_secteur|default:'-1'}" />
143       </td>
144     </tr>
145     <tr class="pair">
146       <td class="titre">Fonction occupée</td>
147       <td>
148         <select name="{$jobpref}[fonction]">
149           <option value="">&nbsp;</option>
150           {assign var=ingroup value=false}
151           {foreach from=$fonctions item=fonct}
152           {if $fonct.title}
153             {if $ingroup}</optgroup>{/if}
154             <optgroup label="{$fonct.fonction_fr}">
155             {assign var=ingroup value=true}
156           {/if}
157           <option value="{$fonct.id}" {if $fonct.id eq $job.fonction}selected="selected"{/if}>
158             {$fonct.fonction_fr}
159           </option>
160           {/foreach}
161           {if $ingroup}</optgroup>{/if}
162         </select>
163       </td>
164     </tr>
165     <tr class="pair">
166       <td class="titre">Description</td>
167       <td>
168         <input type="text" size="35" maxlength="120" {if $job.description_error}class="error"{/if}
169            name="{$jobpref}[description]" value="{$job.description}" /><br /><br />
170       </td>
171     </tr>
172     <tr class="pair">
173       <td colspan="2">
174         <div style="float: left">
175           <div class="titre">Adresse</div>
176           <div class="flags">
177             {include file="include/flags.radio.tpl" name="`$jobpref`[w_adr][pub]" val=$job.w_adr.pub}
178           </div>
179           <div style="margin-top: 20px; clear: both">
180             {include file="geoloc/form.address.tpl" name="`$jobpref`[w_adr]" id="`$jobid`_adr" adr=$job.w_adr}
181           </div>
182         </div>
183         <div style="float: right; width: 50%">
184           {include file="include/emails.combobox.tpl" name=$jobpref|cat:'[w_email]' val=$job.w_email
185           class="pair" i=$i error=$job.w_email_error prefix="w_" pub=$job.w_email_pub isjob="1" id=$i}
186           <div class="titre">Page perso</div>
187           <input type="text" size="25" maxlength="255" {if $job.w_web_error}class="error"{/if}
188                name="{$jobpref}[w_web]" value="{$job.w_web}" />
189         </div>
190       </td>
191     </tr>
192     <tr class="pair">
193       <td colspan="2">
194         {foreach from=$job.w_tel key=t item=tel}
195           <div id="{"`$jobid`_w_tel_`$t`"}" style="clear: both">
196             {include file="profile/phone.tpl" prefname="`$jobpref`[w_tel]" prefid="`$jobid`_w_tel" telid=$t tel=$tel}
197           </div>
198         {/foreach}
199         {if $job.w_tel|@count eq 0}
200           <div id="{"`$jobid`_w_tel_0"}" style="clear: both">
201             {include file="profile/phone.tpl" prefname="`$jobpref`[w_tel]" prefid="`$jobid`_w_tel" telid=0 tel=0}
202           </div>
203         {/if}
204         <div id="{$jobid}_w_tel_add" class="center" style="clear: both; padding-top: 4px;">
205           <a href="javascript:addTel('{$jobid}_w_tel', '{$jobpref}[w_tel]')">
206             {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone
207           </a>
208         </div>
209       </td>
210     </tr>
211   </table>
212 </div>
213
214 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}