send most action links thru hook_civicrm_links
[civicrm-core.git] / CRM / Price / Page / Set.php
index 9940d67c7fd75ecce1d3c9af850314d970d72825..d5767a06050cf38721f164b07130b99388e4f4a1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -84,13 +84,13 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
         ),
         CRM_Core_Action::DISABLE => array(
           'name' => ts('Disable'),
-          'extra' => 'onclick = "enableDisable( %%sid%%,\'' . 'CRM_Price_BAO_Set' . '\',\'' . 'enable-disable' . '\' );"',
+          'extra' => 'onclick = "enableDisable( %%sid%%,\'' . 'CRM_Price_BAO_PriceSet' . '\',\'' . 'enable-disable' . '\' );"',
           'ref' => 'disable-action',
           'title' => ts('Disable Price Set'),
         ),
         CRM_Core_Action::ENABLE => array(
           'name' => ts('Enable'),
-          'extra' => 'onclick = "enableDisable( %%sid%%,\'' . 'CRM_Price_BAO_Set' . '\',\'' . 'disable-enable' . '\' );"',
+          'extra' => 'onclick = "enableDisable( %%sid%%,\'' . 'CRM_Price_BAO_PriceSet' . '\',\'' . 'disable-enable' . '\' );"',
           'ref' => 'enable-action',
           'title' => ts('Enable Price Set'),
         ),
@@ -140,7 +140,7 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
     );
 
     if ($sid) {
-      CRM_Price_BAO_Set::checkPermission($sid);
+      CRM_Price_BAO_PriceSet::checkPermission($sid);
     }
     // what action to take ?
     if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD)) {
@@ -158,7 +158,7 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
 
       // if action is delete do the needful.
       if ($action & (CRM_Core_Action::DELETE)) {
-        $usedBy = CRM_Price_BAO_Set::getUsedBy($sid);
+        $usedBy = CRM_Price_BAO_PriceSet::getUsedBy($sid);
 
         if (empty($usedBy)) {
           // prompt to delete
@@ -175,7 +175,7 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
           // add breadcrumb
           $url = CRM_Utils_System::url('civicrm/admin/price', 'reset=1');
           CRM_Utils_System::appendBreadCrumb(ts('Price Sets'), $url);
-          $this->assign('usedPriceSetTitle', CRM_Price_BAO_Set::getTitle($sid));
+          $this->assign('usedPriceSetTitle', CRM_Price_BAO_PriceSet::getTitle($sid));
           $this->assign('usedBy', $usedBy);
 
           $comps = array(
@@ -262,8 +262,8 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
       'CiviMember' => ts('Membership'),
     );
 
-    $dao = new CRM_Price_DAO_Set();
-    if (CRM_Price_BAO_Set::eventPriceSetDomainID()) {
+    $dao = new CRM_Price_DAO_PriceSet();
+    if (CRM_Price_BAO_PriceSet::eventPriceSetDomainID()) {
       $dao->domain_id = CRM_Core_Config::domainID();
     }
     $dao->is_quick_config = 0;
@@ -300,7 +300,12 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
         $actionLinks[CRM_Core_Action::BROWSE]['name'] = 'View Price Fields';
       }
       $priceSet[$dao->id]['action'] = CRM_Core_Action::formLink($actionLinks, $action,
-        array('sid' => $dao->id)
+        array('sid' => $dao->id),
+        ts('more'),
+        FALSE,
+        'priceSet.row.actions',
+        'PriceSet',
+        $dao->id
       );
     }
     $this->assign('rows', $priceSet);
@@ -318,7 +323,7 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
       $this, TRUE, 0, 'GET'
     );
 
-    CRM_Price_BAO_Set::copy($id);
+    CRM_Price_BAO_PriceSet::copy($id);
 
     CRM_Utils_System::redirect(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1'));
   }