Commit 79372ce3 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #2166 Fixed semantic of plDescription

Conflicts:
	include/class_acl.inc
	include/simpleplugin/class_simplePlugin.inc
	plugins/admin/groups/class_groupManagement.inc
parent 89d9e573
......@@ -1078,7 +1078,6 @@ class config {
}
array_unshift($this->data['TABS'][$tabclass], $entry);
}
}
} elseif (class_available($class) && is_subclass_of($class, 'simpleService')) {
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $class, "Adding service");
......
......@@ -243,22 +243,22 @@ class management
if (in_array_ics('plInfo', get_class_methods(get_class($this)))) {
$plInfos = $this->plInfo();
$plDescription = $plInfos['plDescription'];
$plTitle = $plInfos['plTitle'];
$plIcon = $plInfos['plIcon'];
} else {
$plDescription = $this->plDescription;
$plTitle = $this->plDescription;
$plIcon = $this->plIcon;
}
if (!preg_match('/^geticon/', $plIcon)) {
$plIcon = get_template_path($plIcon);
}
if (get_object_info() != "") {
$display = print_header($plIcon, _($plDescription),
if (get_object_info() != '') {
$display = print_header($plIcon, _($plTitle),
'<img alt="" class="center" src="geticon.php?context=status&amp;icon=object-locked&amp;size=16"/>'.
LDAP::fix(get_object_info()));
} else {
$display = print_header($plIcon, _($plDescription));
$display = print_header($plIcon, _($plTitle));
}
return $display;
}
......
......@@ -139,6 +139,9 @@ class pluglist {
if (!isset($infos['plCategory'])) {
$infos['plCategory'] = array();
}
if (!isset($infos['plTitle'])) {
$infos['plTitle'] = $infos['plShortName'];
}
$infos['plForeignRefs'] = array();
$infos['INDEX'] = $index;
$this->info[$cname] = $infos;
......
......@@ -753,8 +753,8 @@ class simplePlugin extends plugin
$plInfo = pluglist::pluginInfos($classname);
$plIcon = (isset($plInfo['plIcon'])?$plInfo['plIcon']:'plugin.png');
$plHeadline = $plInfo['plShortName'];
if (($tabs !== FALSE) && ($objectType === FALSE)) {
$plHeadline = $plInfo['plTitle'];
if (($tabs !== FALSE) && ($tabclass === FALSE)) {
$key = key($plInfo['plObjectType']);
if (is_numeric($key)) {
$key = $plInfo['plObjectType'][$key];
......
......@@ -25,6 +25,7 @@ class dashboard extends simplePlugin
{
return array(
'plShortName' => _('Dashboard'),
'plTitle' => _('Dashboard'),
'plDescription' => _('Statistics and various informations'),
'plIcon' => 'geticon.php?context=applications&icon=utilities-system-monitor&size=48',
'plObjectType' => array(
......
......@@ -36,7 +36,8 @@ class aclManagement extends simpleManagement
{
return array(
'plShortName' => _('ACL assignments'),
'plDescription' => _('Access control list management'),
'plTitle' => _('ACL assignments management'),
'plDescription' => _('Manage ACL roles assignments to users'),
'plIcon' => 'geticon.php?context=categories&icon=acl&size=48',
'plSection' => 'accounts',
'plPriority' => 28,
......
......@@ -32,7 +32,8 @@ class aclRoleManagement extends simpleManagement
{
return array(
'plShortName' => _('ACL roles'),
'plDescription' => _('ACL roles management'),
'plTitle' => _('ACL roles management'),
'plDescription' => _('Manage ACL roles'),
'plIcon' => 'geticon.php?context=categories&icon=acl&size=48',
'plSection' => 'accounts',
'plPriority' => 27,
......
......@@ -32,7 +32,8 @@ class departmentManagement extends simpleManagement
{
return array(
'plShortName' => _('Departments'),
'plDescription' => _('Manage departments'),
'plTitle' => _('Manage departments'),
'plDescription' => _('Manage departments, countries, domain components, domains, localities and organization nodes,'),
'plIcon' => 'geticon.php?context=places&icon=folder&size=48',
'plSection' => array('accounts' => array('name' => _('Users and groups'), 'priority' => 0)),
'plPriority' => 0,
......@@ -62,7 +63,6 @@ class departmentManagement extends simpleManagement
$this->refreshDeps();
}
function refreshDeps()
{
global $config, $ui;
......@@ -74,7 +74,6 @@ class departmentManagement extends simpleManagement
$headpage->refreshBasesList();
}
// An action handler which enables to switch into deparmtment by clicking the names.
function openEntry($action, $entry)
{
......
......@@ -29,7 +29,8 @@ class groupManagement extends simpleManagement
{
return array(
'plShortName' => _('Groups and roles'),
'plDescription' => _('Manage groups and roles'),
'plTitle' => _('Manage groups and roles'),
'plDescription' => _('Allows you to manage object groups, POSIX groups and roles'),
'plIcon' => 'geticon.php?context=types&icon=resource-group&size=48',
'plSection' => 'accounts',
'plManages' => array('ogroup', 'group', 'role'),
......@@ -90,7 +91,7 @@ class groupManagement extends simpleManagement
$infos = pluglist::pluginInfos($class);
if (isset($infos['plSmallIcon'])) {
$result .= '<input class="center" type="image" src="'.htmlentities($infos['plSmallIcon'], ENT_COMPAT, 'UTF-8').'" '.
'alt="'.$infos['plShortName'].'" title="'.$infos['plShortName'].'" '.
'alt="'.$infos['plTitle'].'" title="'.$infos['plTitle'].'" '.
'name="listing_edit_tab_'.$class.'_'.$row.'" style="padding:1px"/>';
} else {
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $infos['plShortName']." ($class)", 'No icon for');
......
......@@ -40,7 +40,8 @@ class userManagement extends simpleManagement
{
return array(
'plShortName' => _('Users'),
'plDescription' => _('Manage users'),
'plTitle' => _('Manage users'),
'plDescription' => _('Manage user accounts and their properties'),
'plIcon' => 'geticon.php?context=types&icon=user&size=48',
'plSection' => 'accounts',
'plManages' => array('user'),
......
......@@ -55,7 +55,8 @@ class configInLdap extends simplePlugin
{
return array(
'plShortName' => _('Configuration'),
'plDescription' => _('FusionDirectory configuration'),
'plTitle' => _('FusionDirectory configuration'),
'plDescription' => _('Configuration screen of FusionDirectory'),
'plIcon' => 'geticon.php?context=categories&icon=settings&size=48',
'plObjectType' => array(
'configuration' => array(
......
......@@ -200,8 +200,8 @@ class setup
$step->update_strings();
$s_title = $step->get_title();
$s_info = $step->get_small_info();
$s_short_name = $step->get_short_name();
$s_description = $step->get_description();
$b_active = $step->is_active();
$b_enabled = $step->is_enabled();
$b_completed = $step->is_completed();
......@@ -214,19 +214,19 @@ class setup
if ($b_enabled) {
if ($b_active) {
$str .= '<li class="menuitem menucurrent" title="'.$s_info.'">';
$str .= '<a class="navigation_title">'.$s.$s_title.'</a>';
$str .= '<a class="navigation_info">'.$s_info.'</a>';
$str .= '<li class="menuitem menucurrent" title="'.$s_description.'">';
$str .= '<a class="navigation_title">'.$s.$s_short_name.'</a>';
$str .= '<a class="navigation_info">'.$s_description.'</a>';
$str .= '</li>';
} else {
$str .= '<li class="menuitem" title="'.$s_info.'">';
$str .= '<li class="menuitem" title="'.$s_description.'">';
$str .= '<a onClick="document.mainform.setup_goto_step.value=\''.$key.'\';document.mainform.submit();"
class="navigation_title">'.$s.$s_title.'</a>';
class="navigation_title">'.$s.$s_short_name.'</a>';
$str .= '</li>';
}
} else {
$str .= '<li class="menuitem disabled" title="'.$s_info.'">';
$str .= '<a class="navigation_title">'.$s.$s_title.'</a>';
$str .= '<li class="menuitem disabled" title="'.$s_description.'">';
$str .= '<a class="navigation_title">'.$s.$s_short_name.'</a>';
$str .= '</li>';
}
}
......@@ -259,7 +259,7 @@ class setup
/* Create header entry */
function get_header_text()
{
return $this->o_steps[$this->i_current]->get_long_title();
return $this->o_steps[$this->i_current]->get_title();
}
/* Create header entry */
......
......@@ -21,14 +21,14 @@
class setupStep extends simplePlugin
{
protected $s_title = "Still undefined";
protected $s_title_long = "Still undefined";
protected $s_info = "Still undefined";
protected $s_short_name = 'Still undefined';
protected $s_title = 'Still undefined';
protected $s_description = 'Still undefined';
var $is_active = FALSE;
var $is_enabled = FALSE;
var $is_completed = FALSE;
var $header_image = "";
var $header_image = '';
static function getAttributesInfo()
{
......@@ -47,19 +47,19 @@ class setupStep extends simplePlugin
die('abstract method');
}
function get_title()
function get_short_name()
{
return $this->s_title;
return $this->s_short_name;
}
function get_long_title()
function get_title()
{
return $this->s_title_long;
return $this->s_title;
}
function get_small_info()
function get_description()
{
return $this->s_info;
return $this->s_description;
}
function is_active()
......
......@@ -45,9 +45,9 @@ class Step_Checks extends setupStep
function update_strings()
{
$this->s_title = _("Installation check");
$this->s_title_long = _("Installation check");
$this->s_info = _("Basic checks for PHP compatibility and extensions");
$this->s_short_name = _('Installation check');
$this->s_title = _('Installation check');
$this->s_description = _('Basic checks for PHP compatibility and extensions');
}
/* Execute and display template */
......
......@@ -29,9 +29,9 @@ class Step_Config_before_init extends setupStep
}
$infos = configInLdap::plInfo();
$this->header_image = $infos['plIcon'];
$this->s_title = $infos['plShortName'];
$this->s_title_long = $infos['plDescription'];
$this->s_info = $infos['plDescription'];
$this->s_short_name = $infos['plShortName'];
$this->s_title = $infos['plTitle'];
$this->s_description = $infos['plDescription'];
}
}
......@@ -64,19 +64,19 @@ class Step_Config extends configInLdap
$this->header_image = $infos['plIcon'];
}
function get_title()
function get_short_name()
{
$infos = parent::plInfo();
return $infos['plShortName'];
return $infos['plTitle'];
}
function get_long_title()
function get_title()
{
$infos = parent::plInfo();
return $infos['plDescription'];
}
function get_small_info()
function get_description()
{
$infos = parent::plInfo();
return $infos['plDescription'];
......
......@@ -37,9 +37,9 @@ class Step_Finish extends setupStep
function update_strings()
{
$this->s_title = _('Finish');
$this->s_info = _('Write configuration file');
$this->s_title_long = _('Finish - write the configuration file');
$this->s_short_name = _('Finish');
$this->s_title = _('Finish - write the configuration file');
$this->s_description = _('Write configuration file');
}
function get_conf_data()
......
......@@ -56,9 +56,9 @@ class Step_Language extends setupStep
function update_strings()
{
$this->s_title = _("Language setup");
$this->s_title_long = _("Language setup");
$this->s_info = _("This step allows you to select your preferred language.");
$this->s_short_name = _('Language setup');
$this->s_title = _('Language setup');
$this->s_description = _('This step allows you to select your preferred language.');
$this->msg = _('At this point, you can select the site wide default language. Choosing "automatic" will use the language requested by the browser. This setting can be overriden per user.');
}
......
......@@ -104,9 +104,9 @@ class Step_Ldap extends setupStep
function update_strings()
{
$this->s_title = _("LDAP setup");
$this->s_title_long = _("LDAP connection setup");
$this->s_info = _("This dialog performs the basic configuration of the LDAP connectivity for FusionDirectory.");
$this->s_short_name = _('LDAP setup');
$this->s_title = _('LDAP connection setup');
$this->s_description = _('This dialog performs the basic configuration of the LDAP connectivity for FusionDirectory.');
}
function update_base_choices()
......
......@@ -220,9 +220,9 @@ class Step_Migrate extends setupStep
function update_strings()
{
$this->s_title = _("LDAP inspection");
$this->s_title_long = _("LDAP inspection");
$this->s_info = _("Analyze your current LDAP for FusionDirectory compatibility");
$this->s_short_name = _('LDAP inspection');
$this->s_title = _('LDAP inspection');
$this->s_description = _('Analyze your current LDAP for FusionDirectory compatibility');
}
function fill_defaultRoles()
......
......@@ -47,9 +47,9 @@ class Step_Welcome extends setupStep
/* We need to init them with a method to be able to use _() */
function update_strings()
{
$this->s_title = _("Welcome");
$this->s_info = _("The welcome message");
$this->s_title_long = _("Welcome to FusionDirectory setup wizard");
$this->s_short_name = _('Welcome');
$this->s_title = _('Welcome to FusionDirectory setup wizard');
$this->s_description = _('The welcome message');
}
function execute()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment