/** * 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 note?'); self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('View'), 'url' => 'civicrm/contact/view/note', 'qs' => 'action=view&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=note', 'title' => ts('View Note')), CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/contact/view/note', 'qs' => 'action=update&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=note', 'title' => ts('Edit Note')), CRM_Core_Action::ADD => array('name' => ts('Comment'), 'url' => 'civicrm/contact/view/note', 'qs' => 'action=add&reset=1&cid=%%cid%%&parentId=%%id%%&selectedChild=note', 'title' => ts('Add Comment')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/note', 'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=note', 'extra' => 'onclick = "if (confirm(\'' . $deleteExtra . '\') ) this.href+=\'&confirmed=1\'; else return false;"', 'title' => ts('Delete Note'))); } return self::$_links; }
/** * Get action links. * * @return array * (reference) of action links */ public static function &links() { if (!self::$_links) { $deleteExtra = ts('Are you sure you want to delete this note?'); self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('View'), 'url' => 'civicrm/contact/view/note', 'qs' => 'action=view&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=note', 'title' => ts('View Note')), CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/contact/view/note', 'qs' => 'action=update&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=note', 'title' => ts('Edit Note')), CRM_Core_Action::ADD => array('name' => ts('Comment'), 'url' => 'civicrm/contact/view/note', 'qs' => 'action=add&reset=1&cid=%%cid%%&parentId=%%id%%&selectedChild=note', 'title' => ts('Add Comment')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/note', 'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=note', 'title' => ts('Delete Note'))); } return self::$_links; }