Add weights to Manage Event links
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 6 Sep 2023 07:32:49 +0000 (19:32 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 6 Sep 2023 07:46:24 +0000 (19:46 +1200)
CRM/Event/Page/ManageEvent.php

index 4206ebdf4a5b17e2ac82e48863b64d064e73d803..bee5e2ae2f14e53d8f76ac7b707d0d820a3f855b 100644 (file)
@@ -59,17 +59,20 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
           'name' => ts('Disable'),
           'ref' => 'crm-enable-disable',
           'title' => ts('Disable Event'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DISABLE),
         ],
         CRM_Core_Action::ENABLE => [
           'name' => ts('Enable'),
           'ref' => 'crm-enable-disable',
           'title' => ts('Enable Event'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::ENABLE),
         ],
         CRM_Core_Action::DELETE => [
           'name' => ts('Delete'),
           'url' => CRM_Utils_System::currentPath(),
           'qs' => 'action=delete&id=%%id%%',
           'title' => ts('Delete Event'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
         ],
         CRM_Core_Action::COPY => [
           'name' => ts('Copy'),
@@ -77,6 +80,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
           'qs' => 'reset=1&action=copy&id=%%id%%',
           'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"',
           'title' => ts('Copy Event'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::COPY),
         ],
       ];
     }
@@ -91,6 +95,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
           'title' => ts('Register Participant'),
           'url' => 'civicrm/participant/add',
           'qs' => 'reset=1&action=add&context=standalone&eid=%%id%%',
+          'weight' => -30,
         ],
         'event_info' => [
           'name' => ts('Event Info'),
@@ -98,6 +103,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
           'url' => 'civicrm/event/info',
           'qs' => 'reset=1&id=%%id%%',
           'fe' => TRUE,
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::VIEW),
         ],
         'online_registration_test' => [
           'name' => ts('Registration (Test-drive)'),
@@ -105,6 +111,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
           'url' => 'civicrm/event/register',
           'qs' => 'reset=1&action=preview&id=%%id%%',
           'fe' => TRUE,
+          'weight' => 30,
         ],
         'online_registration_live' => [
           'name' => ts('Registration (Live)'),
@@ -112,6 +119,7 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page {
           'url' => 'civicrm/event/register',
           'qs' => 'reset=1&id=%%id%%',
           'fe' => TRUE,
+          'weight' => 40,
         ],
       ];
     }