X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.display_education.php;h=330acd7328ac3fc8c38f42fe83d23393616af96c;hb=6f9358f44cc8bcbba718c52a1b3e0bb4d70d0f13;hp=160f99c359a1b64f3c1ace54f1467d40ffb895cc;hpb=77d4417766e20c5b2b33613f1198893d470ba6b2;p=platal.git diff --git a/plugins/function.display_education.php b/plugins/function.display_education.php index 160f99c..330acd7 100644 --- a/plugins/function.display_education.php +++ b/plugins/function.display_education.php @@ -1,6 +1,6 @@ ' . $name . ''; + } else { + $txt .= $name; + } + + if ($gradYear || $field || $program) { + $details = ''; if ($program) { - $txt .= $program; - if ($grad_year || $field) { - $txt .= ", "; + $details .= $program; + if ($gradYear || $field) { + $details .= ', '; } } - if ($grad_year) { - if ($sexe) { - $txt .= "diplômée en $grad_year"; - } else { - $txt .= "diplômé en $grad_year"; - } + if ($gradYear) { + $details .= $gradYear; if ($field) { - $txt .= ", "; + $details .= ', '; } } if ($field) { - $txt .= "domaine : $field"; + $details .= $field; } - $txt .= ")\">"; - } - if (($degree != "Lic.") || ($long)) { - if (($degree != "Ing.") && ($degree != "Dipl.")) { - $txt .= $degree; - } - if ($name) { - $txt .= ' '; - } - if ($url != '') { - $txt .= "$name"; + if ($full) { + $txt .= ' (' . $details . ')'; } else { - $txt .= $name; + $txt = '' . $txt . ''; } } - if ($grad_year || $field || $program) { - $txt .= ""; - } return $txt; } -function smarty_function_display_education($params, &$smarty) +function smarty_function_display_education($params, $smarty) { - $params = new PlDict($params); - $edu = $params->v('edu'); - if (!$params->has('sex')) { - $profile = $params->v('profile'); - $sex = $profile->isFemale(); - } else { - $sex = $params->b('sex'); - } + $params = new PlDict($params); + $edu = $params->v('edu'); return display_education(($edu->school_short == '') ? $edu->school : $edu->school_short, $edu->school_url, $edu->degree_short, $edu->grad_year, - $edu->field, $edu->program, $sex, $params->b('long')); + $edu->field, $edu->program, $params->b('full')); } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: