Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
5ddeb07c | 3 | {* Copyright (C) 2003-2007 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 | ||
f25e1a56 | 24 | <script type="text/javascript">//<![CDATA[ |
0337d704 | 25 | {literal} |
0337d704 | 26 | |
f25e1a56 FB |
27 | function update(cat) |
28 | { | |
29 | var val = document.forms.prof_annu[cat + '_sel'].value; | |
30 | var show = true; | |
31 | if (val == '') { | |
32 | show = false; | |
33 | } | |
34 | if (document.getElementById(cat + '_' + val) != null) { | |
35 | show = false; | |
36 | } | |
37 | document.getElementById(cat + '_add').style.display = show ? '' : 'none'; | |
38 | } | |
0337d704 | 39 | |
f25e1a56 FB |
40 | function add(cat) |
41 | { | |
42 | var sel = document.forms.prof_annu[cat + '_sel']; | |
43 | var val = sel.value; | |
44 | var text = sel.options[sel.selectedIndex].text; | |
45 | $.get(platal_baseurl + 'profile/ajax/skill/' + cat + '/' + val, | |
46 | function(data) { | |
47 | $('#' + cat).append(data); | |
48 | document.getElementById(cat + '_' + val + '_title').innerHTML = text; | |
49 | update(cat); | |
50 | }); | |
51 | } | |
52 | ||
53 | function remove(cat, id) | |
54 | { | |
55 | $('#' + cat + '_' + id).remove(); | |
56 | update(cat); | |
57 | } | |
0337d704 | 58 | |
0337d704 | 59 | {/literal} |
f25e1a56 | 60 | //]]></script> |
0337d704 | 61 | |
f25e1a56 FB |
62 | <table class="bicol" style="margin-bottom: 1em"> |
63 | <tr> | |
64 | <th> | |
65 | Compétences professionnelles | |
66 | </th> | |
67 | </tr> | |
68 | <tr> | |
69 | <td> | |
70 | <div class="flags"> | |
71 | <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span> | |
72 | <span class="texte">privé</span> | |
73 | </div> | |
74 | <div> | |
75 | <span class="titre">Domaine :</span> | |
76 | <select name="competences_sel" onchange="update('competences')"> | |
0337d704 | 77 | <option value=""></option> |
f25e1a56 FB |
78 | {assign var=ingroup value=false} |
79 | {iterate from=$comp_list item=comp} | |
80 | {if $comp.title} | |
81 | {if $ingroup}</optgroup>{/if} | |
82 | <optgroup label="{$comp.text_fr}"> | |
6457b5e4 | 83 | {assign var=ingroup value=true} |
f25e1a56 FB |
84 | {/if} |
85 | <option value="{$comp.id}">{$comp.text_fr}</option> | |
86 | {/iterate} | |
87 | {if $ingroup}</optgroup>{/if} | |
0337d704 | 88 | </select> |
f25e1a56 FB |
89 | <span id="competences_add" style="display: none"> |
90 | <a href="javascript:add('competences')">{icon name=add title="Ajouter cette compétence"}</a> | |
91 | </span> | |
92 | </div> | |
93 | </td> | |
94 | </tr> | |
95 | <tr class="pair"> | |
96 | <td id="competences"> | |
97 | {foreach from=$competences item=competence key=id} | |
98 | {include file="profile/skill.skill.tpl" cat='competences' skill=$competence id=$id levels=$comp_level} | |
99 | {/foreach} | |
100 | </td> | |
101 | </tr> | |
102 | </table> | |
0337d704 | 103 | |
f25e1a56 FB |
104 | <table class="bicol"> |
105 | <tr> | |
106 | <th>Compétences linguistiques</th> | |
107 | </tr> | |
108 | <tr> | |
109 | <td> | |
110 | <div class="flags"> | |
111 | <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span> | |
112 | <span class="texte">privé</span> | |
113 | </div> | |
114 | <div> | |
115 | <span class="titre">Domaine :</span> | |
116 | <select name="langues_sel" onchange="update('langues')"> | |
0337d704 | 117 | <option value=""></option> |
f25e1a56 FB |
118 | {iterate from=$lang_list item=lang} |
119 | <option value="{$lang.id}">{$lang.langue_fr}</option> | |
120 | {/iterate} | |
0337d704 | 121 | </select> |
f25e1a56 FB |
122 | <span id="langues_add" style="display: none"> |
123 | <a href="javascript:add('langues')">{icon name=add title="Ajouter cette langue"}</a> | |
124 | </span> | |
125 | </div> | |
126 | </td> | |
127 | </tr> | |
128 | <tr class="pair"> | |
129 | <td id="langues"> | |
130 | {foreach from=$langues item=langue key=id} | |
131 | {include file="profile/skill.skill.tpl" cat='langues' skill=$langue id=$id levels=$lang_level} | |
132 | {/foreach} | |
133 | </td> | |
134 | </tr> | |
135 | </table> | |
0337d704 | 136 | |
a7de4ef7 | 137 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |