From 2c8758b0d12155e93687ee5ca17fe74e881fd89c Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 21 Sep 2018 13:55:36 -0400 Subject: [PATCH] normalizing spaces between the fat arrows in the adminhooks widget filter. removing the array keys and replacing them as id fields in the widget filter arrays --- setup/adminHooks.php | 95 +++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/setup/adminHooks.php b/setup/adminHooks.php index bc5e698..6e72d75 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -59,44 +59,48 @@ add_filter( */ $content = [ - 'title' => 'Packaging', - 'components' => [ - 'buttons' => [ - 'order' => -1, - 'template' => 'buttons', - 'buttons' => [ + 'title' => 'Packaging', + 'components' => [ + [ + 'id' => 'topButtons', + 'order' => -1, + 'template' => 'buttons', + 'buttons' => [ 'add-package' => [ - 'content' => 'Add Package', - 'url' => $packagingIndexPage . "&option=add", - 'classes' => '', + 'content' => 'Add Package', + 'url' => $packagingIndexPage . "&option=add", + 'classes' => '', ], ], ], - 'quickLinks' => [ - 'order' => 0, - 'template' => 'quickLinks', + [ + 'id' => 'quickLinks', + 'order' => 0, + 'template' => 'quickLinks', 'quickLinks' => [ 'dashboard' => [ 'content' => 'Dashboard', - 'url' => $packagingIndexPage . "&option=dashboard", + 'url' => $packagingIndexPage . "&option=dashboard", ], 'search' => [ 'content' => 'Advanced Search', - 'url' => $packagingIndexPage . "&option=search", + 'url' => $packagingIndexPage . "&option=search", ], 'settings' => [ - 'content' => 'Settings', - 'url' => '#set', + 'content' => 'Settings', + 'url' => '#set', ] ], ], - 'entityAmount' => [ - 'order' => 1, + [ + 'id' => 'entityAmount', + 'order' => 1, 'template' => 'entityAmount', - 'table' => $packagesTable, - 'url' => $packagingIndexPage . "&option=search", + 'table' => $packagesTable, + 'url' => $packagingIndexPage . "&option=search", ], - 'textSearch' => [ + [ + 'id' => 'textSearch', 'order' => 2, 'template' => 'textSearch', 'entityID' => 'packageID', @@ -105,35 +109,38 @@ add_filter( 'where' => 'title', 'resultUrl' => $packagingIndexPage . "&option=edit", ], - 'active' => [ - 'title' => "Active Packages", - 'slug' => "active-packages", - 'order' => 3, - 'template' => 'list', + [ + 'id' => 'active', + 'title' => "Active Packages", + 'slug' => "active-packages", + 'order' => 3, + 'template' => 'list', 'entityID' => 'packageID', - 'table' => $packagesTable, - 'fields' => "id, title, ref_type, ref_dest", - 'where' => 'status='.$this->config['status_numb']['Active'], + 'table' => $packagesTable, + 'fields' => "id, title, ref_type, ref_dest", + 'where' => 'status='.$this->config['status_numb']['Active'], 'resultUrl' => $packagingEditPage, ], - 'pending' => [ - 'title' => "Pending Packages", - 'slug' => "pending-packages", - 'order' => 4, - 'template' => 'list', + [ + 'id' => 'pending', + 'title' => "Pending Packages", + 'slug' => "pending-packages", + 'order' => 4, + 'template' => 'list', 'entityID' => 'packageID', - 'table' => $packagesTable, - 'fields' => "id, title, ref_type, ref_dest", - 'where' => 'status='.$this->config['status_numb']['Pending'], + 'table' => $packagesTable, + 'fields' => "id, title, ref_type, ref_dest", + 'where' => 'status='.$this->config['status_numb']['Pending'], 'resultUrl' => $packagingEditPage, ], - 'expired' => [ - 'title' => "Expired Packages", - 'slug' => "expired-packages", - 'template' => 'list', + [ + 'id' => 'expired', + 'title' => "Expired Packages", + 'slug' => "expired-packages", + 'template' => 'list', 'entityID' => 'packageID', - 'table' => $packagesTable, - 'fields' => "id, title, ref_type, ref_dest", + 'table' => $packagesTable, + 'fields' => "id, title, ref_type, ref_dest", // 'fields' => [ // 'id', // 'title', @@ -145,8 +152,6 @@ add_filter( ]; return $content; - - }, 13, 1 -- 2.17.1