hook_civicrm_links - Add more weights:
authorTim Otten <totten@civicrm.org>
Tue, 19 Sep 2023 05:59:34 +0000 (22:59 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 3 Oct 2023 06:57:02 +0000 (23:57 -0700)
- contribution.edit.action
- file.manage.delete
- financialItem.batch.row
- Payment.edit.action

CRM/Contribute/BAO/Contribution.php
CRM/Core/BAO/CustomGroup.php
CRM/Financial/Page/BatchTransaction.php

index 2a9eaccc6e7ddc514820d431f40255f173bbd6a1..928eb3a83d15a1229e4dd392882e0eae2734c171 100644 (file)
@@ -1029,6 +1029,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution im
             'class' => 'medium-popup',
             'qs' => "reset=1&id=%%id%%&contribution_id=%%contribution_id%%",
             'title' => ts('Edit Payment'),
+            'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::UPDATE),
           ],
         ];
         $paymentEditLink = CRM_Core_Action::formLink(
@@ -4308,6 +4309,7 @@ LIMIT 1;";
         'is_refund' => 0,
       ],
       'extra' => '',
+      'weight' => 0,
     ];
 
     if (CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()) {
@@ -4325,6 +4327,7 @@ LIMIT 1;";
           'mode' => 'live',
         ],
         'extra' => '',
+        'weight' => 0,
       ];
     }
     if ($contributionStatus !== 'Pending') {
@@ -4341,6 +4344,7 @@ LIMIT 1;";
           'is_refund' => 1,
         ],
         'extra' => '',
+        'weight' => 0,
       ];
     }
 
index e7b561a07c8dfc6bbed2fab2c67dfe17b96aaf62..44973b7ace033dd588d8920a59b14fa10541f892 100644 (file)
@@ -837,6 +837,7 @@ ORDER BY civicrm_custom_group.weight,
               'qs' => 'reset=1&id=%%id%%&eid=%%eid%%&fid=%%fid%%&action=delete&fcs=%%fcs%%',
               'extra' => 'onclick = "if (confirm( \'' . $deleteExtra
               . '\' ) ) this.href+=\'&amp;confirmed=1\'; else return false;"',
+              'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
             ],
           ];
           $customValue['deleteURL'] = CRM_Core_Action::formLink($deleteURL,
index 381e5cdf21ef13512f04de0018c4c2a2aff82376..39f5606a2e5ab48acc82df73be98914fb155a07b 100644 (file)
@@ -63,11 +63,13 @@ class CRM_Financial_Page_BatchTransaction extends CRM_Core_Page_Basic {
           'url' => 'civicrm/contact/view/contribution',
           'qs' => 'reset=1&id=%%contid%%&cid=%%cid%%&action=view&context=contribution&selectedChild=contribute',
           'title' => ts('View Contribution'),
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::VIEW),
         ],
         'remove' => [
           'name' => ts('Remove'),
           'title' => ts('Remove Transaction'),
           'extra' => 'onclick = "removeFromBatch(%%id%%);"',
+          'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
         ],
       ];
     }