X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FPage%2FManageEvent.php;h=3183936fedb8261c039c1ab542e7f6d382c61598;hb=a4d42ed6184ae28d52b0273bcb53597b87605f26;hp=c2b815497cee7c40422237d80db3c445c5839c1b;hpb=e2c0856b24630f71827582e867228d09db210d02;p=civicrm-core.git diff --git a/CRM/Event/Page/ManageEvent.php b/CRM/Event/Page/ManageEvent.php index c2b815497c..3183936fed 100644 --- a/CRM/Event/Page/ManageEvent.php +++ b/CRM/Event/Page/ManageEvent.php @@ -1,9 +1,9 @@ array( + self::$_tabLinks[$cacheKey]['settings'] = + array( 'title' => ts('Info and Settings'), 'url' => 'civicrm/event/manage/settings', 'field' => 'id' - ), - 'location' => array( + ); + self::$_tabLinks[$cacheKey]['location'] = + array( 'title' => ts('Location'), 'url' => 'civicrm/event/manage/location', 'field' => 'loc_block_id', - ), - 'fee' => array( + ); + + self::$_tabLinks[$cacheKey]['fee'] = + array( 'title' => ts('Fees'), 'url' => 'civicrm/event/manage/fee', 'field' => 'is_monetary', - ), - 'registration' => array( + ); + self::$_tabLinks[$cacheKey]['registration'] = + array( 'title' => ts('Online Registration'), 'url' => 'civicrm/event/manage/registration', 'field' => 'is_online_registration', - ), - 'reminder' => array( + ); + if (CRM_Core_Permission::check('administer CiviCRM')) { + self::$_tabLinks[$cacheKey]['reminder'] = + array( 'title' => ts('Schedule Reminders'), 'url' => 'civicrm/event/manage/reminder', 'field' => 'reminder', - ), - 'conference' => array( + ); + } + self::$_tabLinks[$cacheKey]['conference'] = + array( 'title' => ts('Conference Slots'), 'url' => 'civicrm/event/manage/conference', 'field' => 'slot_label_id', - ), - 'friend' => array( + ); + self::$_tabLinks[$cacheKey]['friend'] = + array( 'title' => ts('Tell a Friend'), 'url' => 'civicrm/event/manage/friend', 'field' => 'friend', - ), - 'pcp' => array( + ); + self::$_tabLinks[$cacheKey]['pcp'] = + array( 'title' => ts('Personal Campaign Pages'), 'url' => 'civicrm/event/manage/pcp', 'field' => 'is_pcp_enabled', - ), - ); + ); + } if (!$enableCart) { @@ -349,7 +361,7 @@ ORDER BY start_date desc $manageEvent[$dao->id]['reminder'] = CRM_Core_BAO_ActionSchedule::isConfigured($dao->id, $mappingID); $manageEvent[$dao->id]['is_pcp_enabled'] = CRM_Utils_Array::value($dao->id, $eventPCPS); $manageEvent[$dao->id]['event_type'] = CRM_Utils_Array::value($manageEvent[$dao->id]['event_type_id'], $eventType); - + // allow hooks to set 'field' value which allows configuration pop-up to show a tab as enabled/disabled CRM_Utils_Hook::tabset('civicrm/event/manage/rows', $manageEvent, array('event_id' => $dao->id)); } @@ -404,6 +416,13 @@ ORDER BY start_date desc $form->run(); } + /** + * @param $params + * @param bool $sortBy + * @param $force + * + * @return string + */ function whereClause(&$params, $sortBy = TRUE, $force) { $values = array(); $clauses = array(); @@ -492,6 +511,10 @@ ORDER BY start_date desc return !empty($clauses) ? implode(' AND ', $clauses) : '(1)'; } + /** + * @param $whereClause + * @param $whereParams + */ function pager($whereClause, $whereParams) { $params['status'] = ts('Event %%StatusMessage%%'); @@ -514,6 +537,10 @@ SELECT count(id) $this->assign_by_ref('pager', $this->_pager); } + /** + * @param $whereClause + * @param $whereParams + */ function pagerAtoZ($whereClause, $whereParams) { $query = "