Пример #1
0
 /**
  * This method returns the links that are given for each search row.
  * currently the links added for each row are 
  * 
  * - View
  * - Edit
  *
  * @return array
  * @access public
  *
  */
 static function &links($isDeleted = false, $key = null)
 {
     $extraParams = $key ? "&key={$key}" : null;
     if ($isDeleted) {
         self::$_links = array(CRM_Core_Action::RENEW => array('name' => ts('Restore'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&action=renew&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams, 'title' => ts('Restore Case')));
     } else {
         self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('Manage Case'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=view&context=%%cxt%%&selectedChild=case' . $extraParams, 'title' => ts('Manage Case')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&action=delete&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams, 'title' => ts('Delete Case')), CRM_Core_Action::UPDATE => array('name' => ts('Assign to Another Client'), 'url' => 'civicrm/contact/view/case/editClient', 'qs' => 'reset=1&action=update&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams, 'title' => ts('Assign to Another Client')));
     }
     return self::$_links;
 }
Пример #2
0
 /**
  * This method returns the links that are given for each search row.
  * currently the links added for each row are
  *
  * - View
  * - Edit
  *
  * @param bool $isDeleted
  * @param null $key
  *
  * @return array
  */
 public static function &links($isDeleted = FALSE, $key = NULL)
 {
     $extraParams = $key ? "&key={$key}" : NULL;
     if ($isDeleted) {
         self::$_links = array(CRM_Core_Action::RENEW => array('name' => ts('Restore'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&action=renew&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams, 'ref' => 'restore-case', 'title' => ts('Restore Case')));
     } else {
         self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('Manage'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=view&context=%%cxt%%&selectedChild=case' . $extraParams, 'ref' => 'manage-case', 'class' => 'no-popup', 'title' => ts('Manage Case')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&action=delete&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams, 'ref' => 'delete-case', 'title' => ts('Delete Case')), CRM_Core_Action::UPDATE => array('name' => ts('Assign to Another Client'), 'url' => 'civicrm/contact/view/case/editClient', 'qs' => 'reset=1&action=update&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams, 'ref' => 'reassign', 'class' => 'medium-popup', 'title' => ts('Assign to Another Client')));
     }
     $actionLinks = array();
     foreach (self::$_links as $key => $value) {
         if ($value['ref'] == 'reassign') {
             $actionLinks['moreActions'][$key] = $value;
         } else {
             $actionLinks['primaryActions'][$key] = $value;
         }
     }
     return $actionLinks;
 }
Пример #3
0
 /**
  * This method returns the links that are given for each search row.
  * currently the links added for each row are 
  * 
  * - View
  * - Edit
  *
  * @return array
  * @access public
  *
  */
 static function &links($isDeleted = false)
 {
     if ($isDeleted) {
         self::$_links = array(CRM_Core_Action::RENEW => array('name' => ts('Restore'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&action=renew&id=%%id%%&cid=%%cid%%&context=%%cxt%%', 'title' => ts('Restore Case')));
     } else {
         self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('Manage Case'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=view&context=%%cxt%%&selectedChild=case', 'title' => ts('Manage Case')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/case', 'qs' => 'reset=1&action=delete&id=%%id%%&cid=%%cid%%&context=%%cxt%%', 'title' => ts('Delete Case')));
     }
     return self::$_links;
 }