moving the buttons into the header of the summary dashboard widget feature/adminRevamp
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 19 Oct 2018 20:07:51 +0000 (16:07 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 19 Oct 2018 20:07:51 +0000 (16:07 -0400)
setup/adminHooks.php

index 013bcb2..db356e7 100644 (file)
@@ -90,6 +90,24 @@ add_filter(
         $leadsRefLink      = GLM_MEMBERS_LEADS_PLUGIN_ADMIN_URL . '?page=glm-members-admin-menu-member&glm_action=index';
         $content           = [
             'title' => 'Leads',
+            'widgetButtons' => [
+                [
+                    'id'            => 'add-lead',
+                    'content'       => 'Add',
+                    'url'           => $leadsIndexPage . "&option=add",
+                    'classes'       => '',
+                    'styles'        => '',
+                    'data'          => ''
+                ],
+                [
+                    'id'            => 'export-button',
+                    'content'       => 'Export',
+                    'url'           => '#',
+                    'classes'       => 'btn-small widget-export-btn waves-effect waves-light btn modal-trigger',
+                    'styles'        => '',
+                    'data'          => 'leads'
+                ],
+            ],
             'components'    => [
                 [
                     'id'            => 'quickLinks',
@@ -110,27 +128,6 @@ add_filter(
                         ]
                     ],
                 ],
-                [
-                    'id' => 'topButtons',
-                    'order'     => 0,
-                    'template'  => 'buttons',
-                    'buttons'   => [
-                        'add-event' => [
-                            'content'       => 'Add',
-                            'url'           => $leadsIndexPage . "&option=add",
-                            'classes'       => '',
-                            'styles'        => '',
-                            'data'          => ''
-                        ],
-                        'export-button' => [
-                            'content'       => 'Export',
-                            'url'           => '#',
-                            'classes'       => 'btn-small widget-export-btn waves-effect waves-light btn modal-trigger',
-                            'styles'        => '',
-                            'data'          => 'leads'
-                        ],
-                    ],
-                ],
                 [
                     'id'        => 'entityAmount',
                     'title'     => 'Number of Leads',