浏览代码

N°782.1 New configuration parameter 'allow_menu_on_linkset' (boolean, default value false) to display actions in linkset in view mode (new, modify, delete, ...)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4876 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 7 年之前
父节点
当前提交
306b6bced1
共有 2 个文件被更改,包括 18 次插入10 次删除
  1. 2 2
      application/cmdbabstract.class.inc.php
  2. 16 8
      core/config.class.inc.php

+ 2 - 2
application/cmdbabstract.class.inc.php

@@ -520,7 +520,7 @@ EOF
 					$aParams = array(
 						'target_attr' => $oAttDef->GetExtKeyToMe(),
 						'object_id' => $this->GetKey(),
-						'menu' => false,
+						'menu' => MetaModel::GetConfig()->Get('allow_menu_on_linkset'),
 						'default' => $aDefaults,
 						'table_id' => $sClass.'_'.$sAttCode,
 					);
@@ -535,7 +535,7 @@ EOF
 							'object_id' => $this->GetKey(),
 							'target_attr' => $oAttDef->GetExtKeyToRemote(),
 							'view_link' => false,
-							'menu' => false,
+							'menu' => MetaModel::GetConfig()->Get('allow_menu_on_linkset'),
 							'display_limit' => true, // By default limit the list to speed up the initial load & display
 							'table_id' => $sClass.'_'.$sAttCode,
 						);

+ 16 - 8
core/config.class.inc.php

@@ -194,14 +194,22 @@ class Config
 			'source_of_value' => '',
 			'show_in_conf_sample' => false,
 		),
-		'allow_target_creation' => array(
-			'type' => 'bool',
-			'description' => 'Displays the + button on external keys to create target objects',
-			'default' => true,
-			'value' => true,
-			'source_of_value' => '',
-			'show_in_conf_sample' => false,
-		),
+        'allow_menu_on_linkset' => array(
+            'type' => 'bool',
+            'description' => 'Display Action menus in view mode on any LinkedSet with edit_mode != none',
+            'default' => false,
+            'value' => false,
+            'source_of_value' => '',
+            'show_in_conf_sample' => false,
+        ),
+        'allow_target_creation' => array(
+            'type' => 'bool',
+            'description' => 'Displays the + button on external keys to create target objects',
+            'default' => true,
+            'value' => true,
+            'source_of_value' => '',
+            'show_in_conf_sample' => false,
+        ),
 		// Levels that trigger a confirmation in the CSV import/synchro wizard
 		'csv_import_min_object_confirmation' => array(
 			'type' => 'integer',