projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only uses autoload to require validation classes.
[platal.git]
/
plugins
/
function.display_education.php
diff --git
a/plugins/function.display_education.php
b/plugins/function.display_education.php
index
160f99c
..
4e7db2a
100644
(file)
--- a/
plugins/function.display_education.php
+++ b/
plugins/function.display_education.php
@@
-20,68
+20,58
@@
***************************************************************************/
***************************************************************************/
-function display_education($name, $url, $degree, $grad
_year, $field, $program, $sexe, $long
)
+function display_education($name, $url, $degree, $grad
Year, $field, $program, $full
)
{
$field = strtolower($field);
{
$field = strtolower($field);
- $txt =
""
;
+ $txt =
''
;
- if ($grad_year || $field || $program) {
- $txt .= "<span title=\"(";
+ if (($degree != 'Ing.') && ($degree != 'Dipl.')) {
+ $txt .= $degree;
+ if ($name) {
+ $txt .= ' ';
+ }
+ }
+ if ($url != '') {
+ $txt .= '<a href="' . $url . '" onclick="return popup(this)">' . $name . '</a>';
+ } else {
+ $txt .= $name;
+ }
+
+ if ($gradYear || $field || $program) {
+ $details = '';
if ($program) {
if ($program) {
- $
txt
.= $program;
- if ($grad
_y
ear || $field) {
- $
txt .= ", "
;
+ $
details
.= $program;
+ if ($grad
Y
ear || $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) {
if ($field) {
- $
txt .= ", "
;
+ $
details .= ', '
;
}
}
if ($field) {
}
}
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 .= "<a href=\"$url\" onclick=\"return popup(this)\">$name</a>";
+ if ($full) {
+ $txt .= ' <small>(' . $details . ')</small>';
} else {
} else {
- $txt
.= $name
;
+ $txt
= '<span title="' . $details . '">' . $txt . '</span>'
;
}
}
}
}
- if ($grad_year || $field || $program) {
- $txt .= "</span>";
- }
return $txt;
}
function smarty_function_display_education($params, &$smarty)
{
return $txt;
}
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,
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:
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: