Skip to content

Commit

Permalink
Merge pull request #27229 from eileenmcnaughton/weigh
Browse files Browse the repository at this point in the history
Add weights to MessageTemplate links
  • Loading branch information
eileenmcnaughton authored Aug 31, 2023
2 parents c20295d + 204b0e5 commit 4a011f8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CRM/Admin/Page/MessageTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,35 +90,42 @@ public function &links() {
'url' => 'civicrm/admin/messageTemplates/add',
'qs' => 'action=update&id=%%id%%&reset=1',
'title' => ts('Edit this message template'),
'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::UPDATE),
],
CRM_Core_Action::DISABLE => [
'name' => ts('Disable'),
'ref' => 'crm-enable-disable',
'title' => ts('Disable this message template'),
'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DISABLE),
],
CRM_Core_Action::ENABLE => [
'name' => ts('Enable'),
'ref' => 'crm-enable-disable',
'title' => ts('Enable this message template'),
'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::ENABLE),
],
CRM_Core_Action::DELETE => [
'name' => ts('Delete'),
'url' => 'civicrm/admin/messageTemplates',
'qs' => 'action=delete&id=%%id%%',
'title' => ts('Delete this message template'),
'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
],
CRM_Core_Action::REVERT => [
'name' => ts('Revert to Default'),
'extra' => "onclick = 'return confirm(\"$confirm\");'",
'url' => 'civicrm/admin/messageTemplates',
'qs' => 'action=revert&id=%%id%%&selectedChild=workflow',
'title' => ts('Revert this workflow message template to the system default'),
'weight' => 110,
],
CRM_Core_Action::VIEW => [
'name' => ts('View Default'),
'url' => 'civicrm/admin/messageTemplates',
'qs' => 'action=view&id=%%orig_id%%&reset=1',
'title' => ts('View the system default for this workflow message template'),
// Not the standard view weight as it's not really a standard view action.
'weight' => 120,
],
];
}
Expand Down

0 comments on commit 4a011f8

Please sign in to comment.