diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index c5f7365bc..aaf85081d 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -1303,7 +1303,7 @@ EOF $oPage->add("\n"); } $oPage->add(" \n"); - $oPage->add("\n"); + $oPage->add("\n"); $oPage->add("\n"); $aNewFieldsMap = array(); foreach($aFieldsMap as $id => $sFieldCode) diff --git a/dictionaries/dictionary.itop.ui.php b/dictionaries/dictionary.itop.ui.php index 9a7806ed8..ddbca82f1 100644 --- a/dictionaries/dictionary.itop.ui.php +++ b/dictionaries/dictionary.itop.ui.php @@ -356,7 +356,8 @@ Dict::Add('EN US', 'English', 'English', array( 'UI:Button:AddToList' => ' << Add ', 'UI:Button:RemoveFromList' => ' Remove >> ', 'UI:Button:FilterList' => ' Filter... ', - 'UI:Button:Delete' => 'Delete ! ', + 'UI:Button:Create' => ' Create ', + 'UI:Button:Delete' => ' Delete ! ', 'UI:SearchToggle' => 'Search', 'UI:ClickToCreateNew' => 'Click here to create a new %1$s', @@ -636,6 +637,7 @@ Dict::Add('EN US', 'English', 'English', array( 'UI:CloneTitle_Class_Object' => 'Clone of %1$s: %2$s', 'UI:CreationPageTitle_Class' => 'iTop - Creation of a new %1$s ', 'UI:CreationTitle_Class' => 'Creation of a new %1$s', + 'UI:SelectTheTypeOf_Class_ToCreate' => 'Select the type of %1$s to create:', 'UI:Class_Object_NotUpdated' => 'No change detected, %1$s (%2$s) has not been modified.', 'UI:Class_Object_Updated' => '%1$s (%2$s) updated.', 'UI:BulkDeletePageTitle' => 'iTop - Bulk Delete', diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 70b1641d8..8dd286db8 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -349,7 +349,8 @@ Dict::Add('FR FR', 'French', 'Français', array( 'UI:Button:AddToList' => ' << Ajouter ', 'UI:Button:RemoveFromList' => ' Enlever >> ', 'UI:Button:FilterList' => ' Filtrer... ', - 'UI:Button:Delete' => 'Supprimer ! ', + 'UI:Button:Create' => ' Créer ', + 'UI:Button:Delete' => ' Supprimer ! ', 'UI:SearchToggle' => 'Recherche', @@ -630,6 +631,7 @@ Dict::Add('FR FR', 'French', 'Français', array( 'UI:CloneTitle_Class_Object' => ' %1$s - Duplication de %2$s', 'UI:CreationPageTitle_Class' => 'iTop - Création d\'un objet de type %1$s ', 'UI:CreationTitle_Class' => 'Création d\'un objet de type %1$s', + 'UI:SelectTheTypeOf_Class_ToCreate' => 'Sélectionnez le type de %1$s à créer :', 'UI:Class_Object_NotUpdated' => 'Aucun changement détecté, %2$s (type : %2$s) n\'a pas été modifié.', 'UI:Class_Object_Updated' => '%1$s (%2$s) mise à jour.', 'UI:BulkDeletePageTitle' => 'iTop - Suppression massive', diff --git a/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php b/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php index 03037422a..a32d7881a 100644 --- a/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php +++ b/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php @@ -703,7 +703,7 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:Printer/Attribute:type/Value:Mopier+' => '', 'Class:Printer/Attribute:type/Value:Printer' => 'Printer', 'Class:Printer/Attribute:type/Value:Printer+' => '', - 'Class:Printer/Attribute:technology' => 'technology', + 'Class:Printer/Attribute:technology' => 'Technology', 'Class:Printer/Attribute:technology+' => '', 'Class:Printer/Attribute:technology/Value:Inkjet' => 'Inkjet', 'Class:Printer/Attribute:technology/Value:Inkjet+' => '', @@ -841,8 +841,8 @@ Dict::Add('EN US', 'English', 'English', array( 'Menu:Person+' => 'All Persons', 'Menu:Team' => 'Teams', 'Menu:Team+' => 'All Teams', -'Menu:FileDoc' => 'Documents', -'Menu:FileDoc+' => 'All Documents', +'Menu:Document' => 'Documents', +'Menu:Document+' => 'All Documents', 'Menu:Location' => 'Locations', 'Menu:Location+' => 'All Locations', 'Menu:ConfigManagementCI' => 'Configuration Items', diff --git a/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php b/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php index 2fc48fb04..a9220b051 100644 --- a/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php +++ b/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php @@ -778,7 +778,7 @@ class BusinessProcess extends FunctionalCI MetaModel::Init_SetZListItems('list', array('status', 'owner_id', 'importance', 'description')); } } -class ConnectableCI extends FunctionalCI +abstract class ConnectableCI extends FunctionalCI { public static function Init() @@ -848,7 +848,7 @@ class NetworkInterface extends ConnectableCI MetaModel::Init_SetZListItems('list', array('status', 'owner_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref', 'device_id', 'logical_type', 'physical_type', 'ip_address', 'ip_mask', 'mac_address', 'speed', 'duplex', 'connected_if', 'connected_if_device_id')); } } -class Device extends ConnectableCI +abstract class Device extends ConnectableCI { public static function Init() @@ -908,7 +908,7 @@ class PC extends Device MetaModel::Init_SetZListItems('list', array('status', 'owner_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref', 'cpu', 'ram', 'hdd', 'os_family', 'os_version')); } } -class MobileCI extends Device +abstract class MobileCI extends Device { public static function Init() @@ -965,7 +965,7 @@ class MobilePhone extends MobileCI MetaModel::Init_SetZListItems('list', array('status', 'owner_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref', 'number', 'imei', 'hw_pin')); } } -class InfrastructureCI extends Device +abstract class InfrastructureCI extends Device { public static function Init() @@ -1263,7 +1263,7 @@ $oContactNode = new TemplateMenuNode('Contact', '../business/templates/contacts_ new OQLMenuNode('Person', 'SELECT Person', $oContactNode->GetIndex(), 1 /* fRank */); new OQLMenuNode('Team', 'SELECT Team', $oContactNode->GetIndex(), 2 /* fRank */); -new OQLMenuNode('FileDoc', 'SELECT FileDoc', $oConfigManagementGroup->GetIndex(), 2 /* fRank */); +new OQLMenuNode('Document', 'SELECT Document', $oConfigManagementGroup->GetIndex(), 2 /* fRank */); new OQLMenuNode('Location', 'SELECT Location', $oConfigManagementGroup->GetIndex(), 3 /* fRank */); diff --git a/pages/UI.php b/pages/UI.php index 09d1a9a35..c1b0d1941 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -717,6 +717,7 @@ try case 'new': $sClass = utils::ReadParam('class', ''); $sStateCode = utils::ReadParam('state', ''); + $bCheckSubClass = utils::ReadParam('checkSubclass', true); if ( empty($sClass) ) { throw new ApplicationException(Dict::Format('UI:Error:1ParametersMissing', 'class')); @@ -730,19 +731,77 @@ try $oContext = new UserContext(); $aArgs = array_merge($oAppContext->GetAsHash(), utils::ReadParam('default', array())); - $sClassLabel = MetaModel::GetName($sClass); - $oP->set_title(Dict::Format('UI:CreationPageTitle_Class', $sClassLabel)); - $oP->add("