Example #1
0
 /**
  * Get action links.
  *
  * @return array
  *   (reference) of action links
  */
 public static function &links()
 {
     if (!self::$_links) {
         self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('View'), 'url' => 'civicrm/contact/view/rel', 'qs' => 'action=view&reset=1&cid=%%cid%%&id=%%id%%&rtype=%%rtype%%&selectedChild=rel', 'title' => ts('View Relationship')), CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/contact/view/rel', 'qs' => 'action=update&reset=1&cid=%%cid%%&id=%%id%%&rtype=%%rtype%%', 'title' => ts('Edit Relationship')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'ref' => 'crm-enable-disable', 'title' => ts('Enable Relationship')), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'ref' => 'crm-enable-disable', 'title' => ts('Disable Relationship')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/rel', 'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&rtype=%%rtype%%', 'title' => ts('Delete Relationship')), CRM_Core_Action::NONE => array('name' => ts('Manage Case'), 'url' => 'civicrm/contact/view/case', 'qs' => 'action=view&reset=1&cid=%%clientid%%&id=%%caseid%%', 'title' => ts('Manage Case')));
     }
     return self::$_links;
 }
Example #2
0
 /**
  * Get action links
  *
  * @return array (reference) of action links
  * @static
  */
 static function &links()
 {
     if (!self::$_links) {
         $deleteExtra = ts('Are you sure you want to delete this relationship?');
         $disableExtra = ts('Are you sure you want to disable this relationship?');
         $enableExtra = ts('Are you sure you want to re-enable this relationship?');
         self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('View'), 'url' => 'civicrm/contact/view/rel', 'qs' => 'action=view&reset=1&cid=%%cid%%&id=%%id%%&rtype=%%rtype%%&selectedChild=rel', 'title' => ts('View Relationship')), CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/contact/view/rel', 'qs' => 'action=update&reset=1&cid=%%cid%%&id=%%id%%&rtype=%%rtype%%', 'title' => ts('Edit Relationship')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'url' => 'civicrm/contact/view/rel', 'qs' => 'action=enable&reset=1&cid=%%cid%%&id=%%id%%&rtype=%%rtype%%&selectedChild=rel', 'extra' => 'onclick = "return confirm(\'' . $enableExtra . '\');"', 'title' => ts('Enable Relationship')), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'url' => 'civicrm/contact/view/rel', 'qs' => 'action=disable&reset=1&cid=%%cid%%&id=%%id%%&rtype=%%rtype%%&selectedChild=rel', 'extra' => 'onclick = "return confirm(\'' . $disableExtra . '\');"', 'title' => ts('Disable Relationship')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/rel', 'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&rtype=%%rtype%%', 'extra' => 'onclick = "if (confirm(\'' . $deleteExtra . '\') ) this.href+=\'&confirmed=1\'; else return false;"', 'title' => ts('Delete Relationship')));
     }
     return self::$_links;
 }