projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renames classes that extend ProfilePage into ProfilePageXXXX.
[platal.git]
/
modules
/
profile
/
skills.inc.php
diff --git
a/modules/profile/skills.inc.php
b/modules/profile/skills.inc.php
index
23d5d41
..
7fed747
100644
(file)
--- a/
modules/profile/skills.inc.php
+++ b/
modules/profile/skills.inc.php
@@
-19,7
+19,7
@@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-class ProfileSkill implements ProfileSetting
+class ProfileS
ettingS
kill implements ProfileSetting
{
private $table;
private $skill_field;
{
private $table;
private $skill_field;
@@
-76,17
+76,25
@@
class ProfileSkill implements ProfileSetting
$page->pid(), $id, $skill['level']);
}
}
$page->pid(), $id, $skill['level']);
}
}
+
+ public function getText($value) {
+ $skills = array();
+ foreach ($value as $skill) {
+ $skills[] = 'Compétance : ' . $skill['text'] . ', niveau : ' . $skill['level'];
+ }
+ return implode(' ; ' , $skills);
+ }
}
}
-class ProfileSkills extends ProfilePage
+class Profile
Page
Skills extends ProfilePage
{
protected $pg_template = 'profile/skill.tpl';
public function __construct(PlWizard &$wiz)
{
parent::__construct($wiz);
{
protected $pg_template = 'profile/skill.tpl';
public function __construct(PlWizard &$wiz)
{
parent::__construct($wiz);
- $this->settings['competences'] = new ProfileSkill('skill', 'cid', 'text_fr');
- $this->settings['langues'] = new ProfileSkill('langskill', 'lid', 'langue_fr');
+ $this->settings['competences'] = new ProfileS
ettingS
kill('skill', 'cid', 'text_fr');
+ $this->settings['langues'] = new ProfileS
ettingS
kill('langskill', 'lid', 'langue_fr');
}
public function _prepare(PlPage &$page, $id)
}
public function _prepare(PlPage &$page, $id)
@@
-97,7
+105,8
@@
class ProfileSkills extends ProfilePage
'bonne connaissance' => 'bonne connaissance',
'expert' => 'expert'));
$page->assign('lang_list', XDB::iterator("SELECT id, langue_fr
'bonne connaissance' => 'bonne connaissance',
'expert' => 'expert'));
$page->assign('lang_list', XDB::iterator("SELECT id, langue_fr
- FROM profile_langskill_enum"));
+ FROM profile_langskill_enum
+ ORDER BY langue_fr"));
$page->assign('lang_level', array(1 => 'connaissance basique',
2 => 'maîtrise des bases',
3 => 'maîtrise limitée',
$page->assign('lang_level', array(1 => 'connaissance basique',
2 => 'maîtrise des bases',
3 => 'maîtrise limitée',