From 2700a4f5b414f91183460b2dbba33624b5bfd9b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Wed, 7 Jan 2009 13:23:01 +0100 Subject: [PATCH] Improves education edition display. --- include/education.func.inc.php | 3 ++- modules/profile.php | 2 +- templates/profile/{edu.tpl => general.edu.tpl} | 7 +++++++ templates/profile/general.tpl | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) rename templates/profile/{edu.tpl => general.edu.tpl} (96%) diff --git a/include/education.func.inc.php b/include/education.func.inc.php index 857774e..28f3b9d 100644 --- a/include/education.func.inc.php +++ b/include/education.func.inc.php @@ -22,7 +22,8 @@ function education_options($current = 0) { $html = ''; - $res = XDB::iterator("SELECT e.id AS id, e.name AS name, g.pays AS country + $res = XDB::iterator("SELECT e.id AS id, g.pays AS country, + IF(CHAR_LENGTH(e.name) > 76, e.abbreviation, e.name) AS name FROM profile_education_enum AS e LEFT JOIN geoloc_pays AS g ON (e.country = g.a2) WHERE EXISTS (SELECT * diff --git a/modules/profile.php b/modules/profile.php index ef9bec9..386dca6 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -440,7 +440,7 @@ class ProfileModule extends PLModule function handler_ajax_edu(&$page, $eduid, $class) { header('Content-Type: text/html; charset=utf-8'); - $page->changeTpl('profile/edu.tpl', NO_SKIN); + $page->changeTpl('profile/general.edu.tpl', NO_SKIN); $res = XDB::iterator("SELECT id, field FROM profile_education_field_enum ORDER BY field"); diff --git a/templates/profile/edu.tpl b/templates/profile/general.edu.tpl similarity index 96% rename from templates/profile/edu.tpl rename to templates/profile/general.edu.tpl index 05883d3..b2307da 100644 --- a/templates/profile/edu.tpl +++ b/templates/profile/general.edu.tpl @@ -29,6 +29,13 @@ + + + + + Diplôme : + +