예제 #1
0
파일: Search.php 프로젝트: kidaa30/yes
 /**
  * This method returns the links that are given for each search row.
  * currently the links added for each row are
  *
  * - View
  * - Edit
  *
  * @param string|null $key
  *
  * @return array
  */
 public static function &links($key = NULL)
 {
     $cid = CRM_Utils_Request::retrieve('cid', 'Integer');
     $extraParams = $key ? "&key={$key}" : NULL;
     if (!self::$_links) {
         self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('View'), 'url' => 'civicrm/contact/view/grant', 'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=view&context=%%cxt%%&selectedChild=grant' . $extraParams, 'title' => ts('View Grant')), CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/contact/view/grant', 'qs' => 'reset=1&action=update&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams, 'title' => ts('Edit Grant')));
         if ($cid) {
             $delLink = array(CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/grant', 'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=grant' . $extraParams, 'title' => ts('Delete Grant')));
             self::$_links = self::$_links + $delLink;
         }
     }
     return self::$_links;
 }
예제 #2
0
파일: Search.php 프로젝트: hguru/224Civi
 /**
  * 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($key = NULL)
 {
     $cid = CRM_Utils_Request::retrieve('cid', 'Integer', $this);
     $extraParams = $key ? "&key={$key}" : NULL;
     if (!self::$_links) {
         self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('View'), 'url' => 'civicrm/contact/view/grant', 'qs' => 'reset=1&id=%%id%%&cid=%%cid%%&action=view&context=%%cxt%%&selectedChild=grant' . $extraParams, 'title' => ts('View Grant')), CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/contact/view/grant', 'qs' => 'reset=1&action=update&id=%%id%%&cid=%%cid%%&context=%%cxt%%' . $extraParams, 'title' => ts('Edit Grant')));
         if ($cid) {
             $deleteExtra = ts('Are you sure you want to delete this grant?');
             $delLink = array(CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/contact/view/grant', 'qs' => 'action=delete&reset=1&cid=%%cid%%&id=%%id%%&selectedChild=grant' . $extraParams, 'extra' => 'onclick = "if (confirm(\'' . $deleteExtra . '\') ) this.href+=\'&confirmed=1\'; else return false;"', 'title' => ts('Delete Grant')));
             self::$_links = self::$_links + $delLink;
         }
     }
     return self::$_links;
 }