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