Procházet zdrojové kódy

handle config hide base row functions, hide process init filter

Piotr Labudda před 7 roky
rodič
revize
efa62da9c9

+ 1 - 1
SE/se-lib/Core/AclHelper.php

@@ -281,7 +281,7 @@ class Core_AclHelper {// Helper class for Acl
 			}
 		}
 
-		if (1) {// Druki
+		if (1 && !Config::get('VIEW_TABLE_HIDE_BASE_ROW_FUNCTIONS')) {// Druki
 			$parsedNs = self::parseNamespaceUrl($acl->getNamespace());
 			// array (
 			//	 'name' => 'TEST_PERMS',

+ 4 - 2
SE/se-lib/Route/ViewTableAjax.php

@@ -46,11 +46,13 @@ class Route_ViewTableAjax extends RouteBase {
 			$tblLabel = implode(" - ", $tblLabel);
 		}
 		$tbl->setSyncUrl($syncUrl);
-		$tbl->showProcesInitFiltr = $this->getLink("procesInitFiltrAjax", [ 'namespace' => $acl->getNamespace() ]);
+		$tbl->showProcesInitFiltr = (Config::get('VIEW_TABLE_HIDE_PROCESS_LIST')) ? null : $this->getLink("procesInitFiltrAjax", [ 'namespace' => $acl->getNamespace() ]);
 		$tbl->showTableTools = $this->getLink("tableToolsAjax", [ 'namespace' => $acl->getNamespace() ]);
 		$tbl->useUserTableFilter = $this->getLink("getUserTableFilterAjax");
 		$tbl->setLabel($tblLabel);
-		if (method_exists($acl, 'getGuiRowFunctions')) {
+		if (Config::get('VIEW_TABLE_HIDE_BASE_ROW_FUNCTIONS')) {
+			// dont show row functions column
+		} else if (method_exists($acl, 'getGuiRowFunctions')) {
 			foreach ($acl->getGuiRowFunctions() as $funKey => $funParams) {
 				$tbl->addRowFunction($funKey, $funParams);
 			}