Replace sectors by job terms in profile and search (job and mentoring).
[platal.git] / templates / profile / referent.tpl
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
24 {if $plset_count}
25 {include core=plset.tpl}
26 {else}
27 {include wiki=Docs.Emploi}
28 {/if}
29
30 <a id="mentors"></a>
31
32 <p>
33 Actuellement, {$mentors_number} mentors et référents se sont déclarés sur {#globals.core.sitename#}.
34 </p>
35
36 {javascript name=ajax}
37 {javascript name=jquery.jstree}
38 {javascript name=jobtermstree}
39 <script type="text/javascript">//<![CDATA[
40
41 var baseurl = platal_baseurl + "referent/";
42 {literal}
43 var Ajax2 = new AjaxEngine();
44
45 function setSector(sector)
46 {
47     if (sector == '') {
48         document.getElementById('scat').style.display = 'none';
49         document.getElementById('country').style.display = 'none';
50         document.getElementById('keywords').style.display = 'none';
51         document.getElementById('search_referent').disabled = 'disabled';
52     } else {
53         Ajax.update_html('ssect_chg', baseurl + 'ssect/' + sector);
54         Ajax2.update_html('country_chg', baseurl + 'country/' + sector);
55         document.getElementById('scat').style.display = '';
56         document.getElementById('country').style.display = '';
57         document.getElementById('keywords').style.display = '';
58         document.getElementById('search_referent').disabled = '';
59     }
60 }
61
62 function setSSectors()
63 {
64     var sect  = document.getElementById('sect_field').value;
65     var ssect = document.getElementById('ssect_field').value;
66     Ajax2.update_html('country_chg', baseurl + 'country/' + sect + '/' + ssect);
67 }
68
69 function toggleJobTermsTree()
70 {
71   $('#mentoring_terms').closest('tr').toggle();
72   return false;
73 }
74
75 {/literal}
76 //]]></script>
77
78 <form action="{$smarty.server.REQUEST_URI}" method="get">
79   <table cellpadding="0" cellspacing="0" summary="Formulaire de recherche de referents" class="bicol">
80     <tr class="impair">
81       <td class="titre">
82         Mot-clef&nbsp;:
83       </td>
84       <td>
85         <input type="text" name="jobterm_text" id="term_search" size="32"/>
86         <input type="hidden" name="jobterm" />
87         <a id="jobTermsTreeToggle" href="#">{icon name=table title="Tous les mots-clefs"}</a>
88       </td>
89     </tr>
90     <tr class="impair" style="display:none">
91       <td colspan="2">
92         <div id="mentoring_terms"></div>
93       </td>
94     </tr>
95   </table>
96   <div class="center" style="margin-top: 1em;">
97     <input id="search_referent" type="submit" value="Chercher" name="Chercher" />
98   </div>
99 </form>
100
101 <script type="text/javascript">
102 {literal}
103 $(function() {
104   createJobTermsTree('#mentoring_terms', 'profile/ajax/tree/jobterms/mentors', 'mentor', 'searchForJobTerm');
105   $("#term_search").autocomplete(baseurl + "autocomplete",
106   {
107     "selectOnly":1,
108     "matchSubset":0,
109     "width":$("#term_search").width()
110   });
111   $('#jobTermsTreeToggle').click(toggleJobTermsTree);
112 });
113 {/literal}
114 </script>
115 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}