X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FPage%2FLabelFormats.php;h=3fc46604a5b385ec4c86d3182d1df62d339af37b;hb=b3e9c9350327f9494c4bf8897c34201a653ed4d1;hp=a438342e3c8387bc64f8afb83a35b937d231f827;hpb=2265dc3bb39f2c1a3d4168137789e67599293ef4;p=civicrm-core.git diff --git a/CRM/Admin/Page/LabelFormats.php b/CRM/Admin/Page/LabelFormats.php index a438342e3c..3fc46604a5 100644 --- a/CRM/Admin/Page/LabelFormats.php +++ b/CRM/Admin/Page/LabelFormats.php @@ -1,7 +1,7 @@ addScriptFile('civicrm', 'js/crm.livePage.js'); + } // Get list of configured Label Formats $labelFormatList= CRM_Core_BAO_LabelFormat::getList(); $nameFormatList= CRM_Core_BAO_LabelFormat::getList(false, 'name_badge'); @@ -131,25 +134,24 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic { // Add action links to each of the Label Formats foreach ($labelFormatList as & $format) { $action = array_sum(array_keys($this->links())); - if (CRM_Utils_Array::value('is_reserved', $format)) { + if (!empty($format['is_reserved'])) { $action -= CRM_Core_Action::DELETE; } $format['groupName'] = ts('Mailing Label'); $format['action'] = CRM_Core_Action::formLink(self::links(), $action, - array('id' => $format['id'], 'group' => 'label_format')); + array('id' => $format['id'], 'group' => 'label_format'), + ts('more'), + FALSE, + 'labelFormat.manage.action', + 'LabelFormat', + $format['id'] + ); } // Add action links to each of the Label Formats foreach ($nameFormatList as & $format) { - $action = array_sum(array_keys($this->links())); - if (CRM_Utils_Array::value('is_reserved', $format)) { - $action -= CRM_Core_Action::DELETE; - } - $format['groupName'] = ts('Name Badge'); - $format['action'] = CRM_Core_Action::formLink(self::links(), $action, - array('id' => $format['id'], 'group' => 'name_badge')); } $labelFormatList = array_merge($labelFormatList, $nameFormatList);