From: Stéphane Jacob Date: Wed, 20 Aug 2008 10:38:54 +0000 (+0200) Subject: Uses edu or education instead of appli for better coherence. X-Git-Tag: xorg/1.0.0~332^2~533 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f711b03f11899af380d98e31e01e7f76fe7c7f88;p=platal.git Uses edu or education instead of appli for better coherence. --- diff --git a/htdocs/css/keynote.css b/htdocs/css/keynote.css index 9ab2eed..7092ea0 100644 --- a/htdocs/css/keynote.css +++ b/htdocs/css/keynote.css @@ -322,7 +322,7 @@ div.contact div.nom a { font-size: 100%; } -div.contact div.appli { +div.contact div.edu { } div.contact div.bits { diff --git a/htdocs/javascript/profile.js b/htdocs/javascript/profile.js index 4afe8be..a12868f 100644 --- a/htdocs/javascript/profile.js +++ b/htdocs/javascript/profile.js @@ -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]); } } } diff --git a/include/applis.func.inc.php b/include/education.func.inc.php similarity index 66% rename from include/applis.func.inc.php rename to include/education.func.inc.php index c5b3915..48f4a43 100644 --- a/include/applis.func.inc.php +++ b/include/education.func.inc.php @@ -19,71 +19,71 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -function applis_options($current=0) +function education_options($current=0) { $html = ''; $res = XDB::iterator("SELECT * FROM profile_education_enum ORDER BY name"); - while ($arr_appli = $res->next()) { - $html .= '\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: ?> diff --git a/include/user.func.inc.php b/include/user.func.inc.php index f342678..dcac714 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -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 } // }}} diff --git a/include/userset.inc.php b/include/userset.inc.php index 2fae930..dc750cf 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -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']) { diff --git a/modules/profile.php b/modules/profile.php index 765afe8..84d3a28 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -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) diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 80d4b32..564b574 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -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 diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index ea3b66d..7ca86a7 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -37,7 +37,7 @@ {if !$c.dcd && ($c.inscrit || $smarty.session.auth eq AUTH_PUBLIC)}{/if} -
+
{if $c.iso3166_1} {$c.nat1}  {/if} @@ -47,13 +47,13 @@ {if $c.iso3166_3} {$c.nat3}  {/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}
diff --git a/templates/include/plview.referent.tpl b/templates/include/plview.referent.tpl index 871afaf..cc0caa4 100644 --- a/templates/include/plview.referent.tpl +++ b/templates/include/plview.referent.tpl @@ -26,7 +26,7 @@
{$p.name_display}
-
+
X{$p.promo}
diff --git a/templates/profile/edu.tpl b/templates/profile/edu.tpl index 0802232..4eaf9d3 100644 --- a/templates/profile/edu.tpl +++ b/templates/profile/edu.tpl @@ -22,7 +22,7 @@ {assign var=eduname value="edus[`$eduid`]"}