Uses edu or education instead of appli for better coherence.
authorStéphane Jacob <jacou@melix.net>
Wed, 20 Aug 2008 10:38:54 +0000 (12:38 +0200)
committerStéphane Jacob <jacou@melix.net>
Wed, 20 Aug 2008 10:38:54 +0000 (12:38 +0200)
htdocs/css/keynote.css
htdocs/javascript/profile.js
include/education.func.inc.php [moved from include/applis.func.inc.php with 66% similarity]
include/user.func.inc.php
include/userset.inc.php
modules/profile.php
modules/profile/general.inc.php
templates/include/minifiche.tpl
templates/include/plview.referent.tpl
templates/profile/edu.tpl
templates/profile/education.js [moved from templates/profile/applis.js.tpl with 90% similarity]

index 9ab2eed..7092ea0 100644 (file)
@@ -322,7 +322,7 @@ div.contact div.nom a {
     font-size: 100%;
 }
 
-div.contact div.appli {
+div.contact div.edu {
 }
 
 div.contact div.bits {
index 4afe8be..a12868f 100644 (file)
@@ -56,15 +56,15 @@ function wizPage_onLoad(id)
     }
 }
 
-var applisType;
-var applisTypeAll;
-var applisTypeName;
+var educationDegree;
+var educationDegreeAll;
+var educationDegreeName;
 
 // General
 
 var subgrades;
 var names;
-function fillType(selectCtrl, appli, fill)
+function fillType(selectCtrl, edu, fill)
 {
     var i;
     var i0 = 0;
@@ -73,17 +73,17 @@ function fillType(selectCtrl, appli, fill)
         selectCtrl.options[i] = null;
     }
 
-    if (fill || appli < 0) {
+    if (fill || edu < 0) {
         selectCtrl.options[0] = new Option(' ');
         i0 = 1;
     }
-    if (appli >= 0) {
-        for (i = 0; i < applisType[appli].length; i++) {
-            selectCtrl.options[i0 + i] = new Option(applisTypeName[applisType[appli][i] - 1], applisType[appli][i]);
+    if (edu >= 0) {
+        for (i = 0; i < educationDegree[edu].length; i++) {
+            selectCtrl.options[i0 + i] = new Option(educationDegreeName[educationDegree[edu][i] - 1], educationDegree[edu][i]);
         }
     } else if (fill) {
-        for (i = 0; i < applisTypeAll.length; i++) {
-            selectCtrl.options[i0 + i] = new Option(applisTypeName[applisTypeAll[i] - 1], applisTypeAll[i]);
+        for (i = 0; i < educationDegreeAll.length; i++) {
+            selectCtrl.options[i0 + i] = new Option(educationDegreeName[educationDegreeAll[i] - 1], educationDegreeAll[i]);
         }
     }
 }
similarity index 66%
rename from include/applis.func.inc.php
rename to include/education.func.inc.php
index c5b3915..48f4a43 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function applis_options($current=0)
+function education_options($current=0)
 {
     $html = '<option value = "-1"></option>';
     $res  = XDB::iterator("SELECT  *
                              FROM  profile_education_enum
                          ORDER BY  name");
-    while ($arr_appli = $res->next()) {
-        $html .= '<option value="' . $arr_appli["id"] . '"';
-        if ($arr_appli["id"]==$current) {
+    while ($arr_edu = $res->next()) {
+        $html .= '<option value="' . $arr_edu["id"] . '"';
+        if ($arr_edu["id"]==$current) {
             $html .= " selected='selected'";
         }
-        $html .= '>' . htmlspecialchars($arr_appli["name"]) . "</option>\n";
+        $html .= '>' . htmlspecialchars($arr_edu["name"]) . "</option>\n";
     }
     return $html;
 }
 
-/** pour appeller applis_options depuis smarty
+/** pour appeller education_options depuis smarty
  */
-function _applis_options_smarty($params)
+function _education_options_smarty($params)
 {
     if(!isset($params['selected'])) {
         $params['selected'] = 0;
     }
-    return applis_options($params['selected']);
+    return education_options($params['selected']);
 }
-Platal::page()->register_function('applis_options', '_applis_options_smarty');
+Platal::page()->register_function('education_options', '_education_options_smarty');
 
-/** affiche un Array javascript contenant les types de chaque appli
+/** affiche un Array javascript contenant les diplômes de chaque formation
  */
-function applis_type()
+function education_degree()
 {
     $html = "";
     $res = XDB::iterRow("SELECT  eduid, degreeid
                            FROM  profile_education_degree AS d
                      INNER JOIN  profile_education_enum   AS e ON (e.id = d.eduid)
                        ORDER BY  e.name");
-    if ($appli_type = $res->next()) {
-        $eduid = $appli_type['0'];
+    if ($edu_degree = $res->next()) {
+        $eduid = $edu_degree['0'];
         $html .= "[";
-        $html .= $appli_type['1'];
-        $appli_type = $res->next();
-        while ($appli_type['0'] == $eduid) {
-            $html .= "," . $appli_type['1'];
-            $appli_type = $res->next();
+        $html .= $edu_degree['1'];
+        $edu_degree = $res->next();
+        while ($edu_degree['0'] == $eduid) {
+            $html .= "," . $edu_degree['1'];
+            $edu_degree = $res->next();
         }
         $html .= "]";
     }
-    while ($appli_type) {
-        $eduid = $appli_type['0'];
+    while ($edu_degree) {
+        $eduid = $edu_degree['0'];
         $html .= ",\n[";
-        $html .= $appli_type['1'];
-        $appli_type = $res->next();
-        while ($appli_type['0'] == $eduid) {
-            $html .= "," . $appli_type['1'];
-            $appli_type = $res->next();
+        $html .= $edu_degree['1'];
+        $edu_degree = $res->next();
+        while ($edu_degree['0'] == $eduid) {
+            $html .= "," . $edu_degree['1'];
+            $edu_degree = $res->next();
         }
         $html .= "]";
     }
     return $html;
 }
-Platal::page()->register_function('applis_type', 'applis_type');
+Platal::page()->register_function('education_degree', 'education_degree');
 
-/** affiche tous les types possibles d'applis
+/** affiche tous les types possibles de diplômes
  */
-function applis_type_all()
+function education_degree_all()
 {
     $html = "";
     $res = XDB::query("SELECT  id
@@ -91,11 +91,11 @@ function applis_type_all()
                      ORDER BY  id");
     return implode(',', $res->fetchColumn());
 }
-Platal::page()->register_function('applis_type_all', 'applis_type_all');
+Platal::page()->register_function('education_degree_all', 'education_degree_all');
 
-/** affiche les noms de tous les types possibles d'applis
+/** affiche les noms de tous les diplômes possibles
  */
-function applis_type_name()
+function education_degree_name()
 {
     $html = "";
     $res = XDB::query("SELECT  degree
@@ -103,11 +103,11 @@ function applis_type_name()
                        ORDER BY  id");
     return '\'' . implode('\',\'', $res->fetchColumn()) . '\'';
 }
-Platal::page()->register_function('applis_type_name', 'applis_type_name');
+Platal::page()->register_function('education_degree_name', 'education_degree_name');
 
-/** formatte une ecole d'appli pour l'affichage
+/** formatte une formation pour l'affichage
  */
-function applis_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long)
+function education_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long)
 {
     $field = strtolower($field);
     $txt = "";
@@ -149,12 +149,12 @@ function applis_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long)
     return $txt;
 }
 
-function _applis_fmt($params, &$smarty)
+function _education_fmt($params, &$smarty)
 {
     extract($params);
-    return applis_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long);
+    return education_fmt($name, $url, $degree, $grad_year, $field, $sexe, $long);
 }
-Platal::page()->register_function('applis_fmt', '_applis_fmt');
+Platal::page()->register_function('education_fmt', '_education_fmt');
 
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index f342678..dcac714 100644 (file)
@@ -501,12 +501,12 @@ function &get_user_details($login, $from_uid = '', $view = 'private')
                        ORDER BY  ed.grad_year", $uid);
 
     $user['education'] = "";
-    require_once('applis.func.inc.php');
+    require_once('education.func.inc.php');
     if (list($name, $url, $degree, $grad_year, $field) = $res->next()) {
-        $user['education'] .= applis_fmt($name, $url, $degree, $grad_year, $field, $user['sexe'], true);
+        $user['education'] .= education_fmt($name, $url, $degree, $grad_year, $field, $user['sexe'], true);
     }
     while (list($name, $url, $degree, $grad_year, $field) = $res->next()) {
-        $user['education'] .= ", " . applis_fmt($name, $url, $degree, $grad_year, $field, $user['sexe'], true);
+        $user['education'] .= ", " . education_fmt($name, $url, $degree, $grad_year, $field, $user['sexe'], true);
     }
 
     if (has_user_right($user['medals_pub'], $view)) {
@@ -808,7 +808,7 @@ function set_user_details($uid, $details) {
         }
     }
 
-    // applis
+    // education
     // medals
 }
 // }}}
index 2fae930..dc750cf 100644 (file)
@@ -159,7 +159,7 @@ class MinificheView extends MultipageView
 {
     public function __construct(PlSet &$set, $data, array $params)
     {
-        require_once 'applis.func.inc.php';
+        require_once 'education.func.inc.php';
         global $globals;
         $this->entriesPerPage = $globals->search->per_page;
         if (@$params['with_score']) {
index 765afe8..84d3a28 100644 (file)
@@ -41,7 +41,7 @@ class ProfileModule extends PLModule
             'profile/ajax/secteur'       => $this->make_hook('ajax_secteur',               AUTH_COOKIE, 'user', NO_AUTH),
             'profile/ajax/skill'         => $this->make_hook('ajax_skill',                 AUTH_COOKIE, 'user', NO_AUTH),
             'profile/ajax/searchname'    => $this->make_hook('ajax_searchname',            AUTH_COOKIE, 'user', NO_AUTH),
-            'javascript/applis.js'       => $this->make_hook('applis_js',                  AUTH_COOKIE),
+            'javascript/education.js'    => $this->make_hook('education_js',               AUTH_COOKIE),
             'javascript/grades.js'       => $this->make_hook('grades_js',                  AUTH_COOKIE),
             'profile/medal'              => $this->make_hook('medal',                      AUTH_PUBLIC),
             'profile/orange'             => $this->make_hook('p_orange',                   AUTH_MDP),
@@ -333,7 +333,7 @@ class ProfileModule extends PLModule
 
         // Build the page
         $page->addJsLink('ajax.js');
-        $page->addJsLink('applis.js');
+        $page->addJsLink('education.js');
         $page->addJsLink('grades.js');
         $page->addJsLink('profile.js');
         $page->addJsLink('jquery.autocomplete.js');
@@ -360,15 +360,15 @@ class ProfileModule extends PLModule
        $page->setTitle('Mon Profil');
     }
 
-    function handler_applis_js(&$page)
+    function handler_education_js(&$page)
     {
         header('Content-Type: text/javascript; charset=utf-8');
         header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
         header('Last-Modified:' . gmdate('D, d M Y H:i:s') . ' GMT');
         header('Cache-Control: no-cache, must-revalidate');
         header('Pragma: no-cache');
-        $page->changeTpl('profile/applis.js.tpl', NO_SKIN);
-        require_once "applis.func.inc.php";
+        $page->changeTpl('profile/education.js.tpl', NO_SKIN);
+        require_once "education.func.inc.php";
     }
 
     function handler_grades_js(&$page)
@@ -425,7 +425,7 @@ class ProfileModule extends PLModule
                             ORDER BY  field");
         $page->assign('edu_fields', $res->fetchAllAssoc());
         $page->assign('eduid', $eduid);
-        require_once "applis.func.inc.php";
+        require_once "education.func.inc.php";
     }
 
     function handler_ajax_medal(&$page, $id)
index 80d4b32..564b574 100644 (file)
@@ -403,7 +403,7 @@ class ProfileGeneral extends ProfilePage
 
     public function _prepare(PlPage &$page, $id)
     {
-        require_once "applis.func.inc.php";
+        require_once "education.func.inc.php";
 
         $res = XDB::iterator("SELECT  id, field
                                 FROM  profile_education_field_enum
index ea3b66d..7ca86a7 100644 (file)
@@ -37,7 +37,7 @@
       {if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}</a>{/if}
     </div>
 
-    <div class="appli">
+    <div class="edu">
       {if $c.iso3166_1}
       <img src='images/flags/{$c.iso3166_1}.gif' alt='{$c.nat1}' height='11' title='{$c.nat1}' />&nbsp;
       {/if}
       {if $c.iso3166_3}
       <img src='images/flags/{$c.iso3166_3}.gif' alt='{$c.nat3}' height='11' title='{$c.nat3}' />&nbsp;
       {/if}
-      X {$c.promo}{if $c.eduname0}, {applis_fmt name=$c.eduname0 url=$c.eduurl0 degree=$c.edudegree0
+      X {$c.promo}{if $c.eduname0}, {education_fmt name=$c.eduname0 url=$c.eduurl0 degree=$c.edudegree0
                                      grad_year=$c.edugrad_year0 field=$c.edufield0 sexe=$c.sexe}{*
-      *}{/if}{if $c.eduname1}, {applis_fmt name=$c.eduname1 url=$c.eduurl1 degree=$c.edudegree1
+      *}{/if}{if $c.eduname1}, {education_fmt name=$c.eduname1 url=$c.eduurl1 degree=$c.edudegree1
                                      grad_year=$c.edugrad_year1 field=$c.edufield1 sexe=$c.sexe}{*
-      *}{/if}{if $c.eduname2}, {applis_fmt name=$c.eduname2 url=$c.eduurl2 degree=$c.edudegree2
+      *}{/if}{if $c.eduname2}, {education_fmt name=$c.eduname2 url=$c.eduurl2 degree=$c.edudegree2
                                      grad_year=$c.edugrad_year2 field=$c.edufield2 sexe=$c.sexe}{*
-      *}{/if}{if $c.eduname3}, {applis_fmt name=$c.eduname3 url=$c.eduurl3 degree=$c.edudegree3
+      *}{/if}{if $c.eduname3}, {education_fmt name=$c.eduname3 url=$c.eduurl3 degree=$c.edudegree3
                                      grad_year=$c.edugrad_year3 field=$c.edufield3 sexe=$c.sexe}{*
       *}{/if}{if $c.dcd}, décédé{if $c.sexe}e{/if} le {$c.deces|date_format}{/if}
     </div>
index 871afaf..cc0caa4 100644 (file)
@@ -26,7 +26,7 @@
     <div class="nom"> 
       <span {if $p.name_tooltip}class="hinted" title="{$p.name_tooltip}"{/if}>{$p.name_display}</span>
     </div> 
-    <div class="appli"> 
+    <div class="edu"> 
       X{$p.promo} 
     </div> 
     <div class="bits" style="width: 40%;"> 
index 0802232..4eaf9d3 100644 (file)
@@ -22,7 +22,7 @@
 
 {assign var=eduname value="edus[`$eduid`]"}
 <select name="{$eduname}[eduid]" onchange="fillType(this.form['{$eduname}[degreeid]'], this.selectedIndex-1);">
-  {applis_options selected=$edu.eduid}
+  {education_options selected=$edu.eduid}
 </select>
 <input type="hidden" name="edu_{$eduid}_tmp" value="{$edu.degreeid}" />
 <select name="{$eduname}[degreeid]">
similarity index 90%
rename from templates/profile/applis.js.tpl
rename to templates/profile/education.js
index c452672..e5b10d5 100644 (file)
@@ -20,8 +20,8 @@
 {*                                                                        *}
 {**************************************************************************}
 
-applisType     = new Array({applis_type});
-applisTypeAll  = new Array({applis_type_all});
-applisTypeName = new Array({applis_type_name}); 
+educationDegree     = new Array({education_degree});
+educationDegreeAll  = new Array({education_degree_all});
+educationDegreeName = new Array({education_degree_name}); 
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}