Beispiel #1
0
 /**
  * This method returns the links that are given for each search row.
  *
  * @return array
  * @access public
  *
  */
 static function &links($map = false, $editLink = false, $ufLink = false, $gid = null)
 {
     if (!self::$_links) {
         self::$_links = array();
         $viewPermission = true;
         if ($gid) {
             $viewPermission = CRM_Core_Permission::ufGroupValid($gid, CRM_Core_Permission::VIEW);
         }
         if ($viewPermission) {
             self::$_links[CRM_Core_Action::VIEW] = array('name' => ts('View'), 'url' => 'civicrm/profile/view', 'qs' => 'reset=1&id=%%id%%&gid=%%gid%%', 'title' => ts('View Profile Details'));
         }
         if ($editLink) {
             self::$_links[CRM_Core_Action::UPDATE] = array('name' => ts('Edit'), 'url' => 'civicrm/profile/edit', 'qs' => 'reset=1&id=%%id%%&gid=%%gid%%', 'title' => ts('Edit'));
         }
         if ($ufLink) {
             self::$_links[CRM_Core_Action::PROFILE] = array('name' => ts('Website Profile'), 'url' => 'user/%%ufID%%', 'qs' => ' ', 'title' => ts('View Website Profile'));
         }
         if ($map) {
             self::$_links[CRM_Core_Action::MAP] = array('name' => ts('Map'), 'url' => 'civicrm/profile/map', 'qs' => 'reset=1&cid=%%id%%&gid=%%gid%%', 'title' => ts('Map'));
         }
     }
     return self::$_links;
 }
 /**
  * This method returns the links that are given for each search row.
  *
  * @return array
  * @access public
  *
  */
 static function &links($map = FALSE, $editLink = FALSE, $ufLink = FALSE, $gids = NULL)
 {
     if (!self::$_links) {
         self::$_links = array();
         $viewPermission = TRUE;
         if ($gids) {
             // check view permission for each profile id, in case multiple profile ids are rendered
             // then view action is disabled if any profile returns false
             foreach ($gids as $profileId) {
                 $viewPermission = CRM_Core_Permission::ufGroupValid($profileId, CRM_Core_Permission::VIEW);
                 if (!$viewPermission) {
                     break;
                 }
             }
         }
         if ($viewPermission) {
             self::$_links[CRM_Core_Action::VIEW] = array('name' => ts('View'), 'url' => 'civicrm/profile/view', 'qs' => 'reset=1&id=%%id%%&gid=%%gid%%', 'title' => ts('View Profile Details'));
         }
         if ($editLink) {
             self::$_links[CRM_Core_Action::UPDATE] = array('name' => ts('Edit'), 'url' => 'civicrm/profile/edit', 'qs' => 'reset=1&id=%%id%%&gid=%%gid%%', 'title' => ts('Edit'));
         }
         if ($ufLink) {
             self::$_links[CRM_Core_Action::PROFILE] = array('name' => ts('Website Profile'), 'url' => 'user/%%ufID%%', 'qs' => ' ', 'title' => ts('View Website Profile'));
         }
         if ($map) {
             self::$_links[CRM_Core_Action::MAP] = array('name' => ts('Map'), 'url' => 'civicrm/profile/map', 'qs' => 'reset=1&cid=%%id%%&gid=%%gid%%', 'title' => ts('Map'));
         }
     }
     return self::$_links;
 }
Beispiel #3
0
 /**
  * This method returns the links that are given for each search row.
  *
  * @return array
  * @access public
  *
  */
 static function &links($map = false, $editLink = false, $ufLink = false)
 {
     if (!self::$_links) {
         self::$_links = array(CRM_Core_Action::VIEW => array('name' => ts('View'), 'url' => 'civicrm/profile/view', 'qs' => 'reset=1&id=%%id%%&gid=%%gid%%', 'title' => ts('View Profile Details')));
         if ($editLink) {
             self::$_links[CRM_Core_Action::UPDATE] = array('name' => ts('Edit'), 'url' => 'civicrm/profile/edit', 'qs' => 'reset=1&id=%%id%%&gid=%%gid%%', 'title' => ts('Edit'));
         }
         if ($ufLink) {
             self::$_links[CRM_Core_Action::PROFILE] = array('name' => ts('Website Profile'), 'url' => 'user/%%ufID%%', 'qs' => ' ', 'title' => ts('View Website Profile'));
         }
         if ($map) {
             self::$_links[CRM_Core_Action::MAP] = array('name' => ts('Map'), 'url' => 'civicrm/profile/map', 'qs' => 'reset=1&cid=%%id%%&gid=%%gid%%', 'title' => ts('Map'));
         }
     }
     return self::$_links;
 }