From: yashodha Date: Wed, 7 May 2014 01:15:02 +0000 (+0530) Subject: CRM-13776 limit the reminder to 'administer CiviCRM' permission X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=209989e3a86a3ee4b8c66662ffd8f3205659ef37;p=civicrm-core.git CRM-13776 limit the reminder to 'administer CiviCRM' permission --- diff --git a/CRM/Event/Form/ManageEvent/TabHeader.php b/CRM/Event/Form/ManageEvent/TabHeader.php index d5927f0ef2..a22c87ae4d 100644 --- a/CRM/Event/Form/ManageEvent/TabHeader.php +++ b/CRM/Event/Form/ManageEvent/TabHeader.php @@ -75,16 +75,18 @@ class CRM_Event_Form_ManageEvent_TabHeader { 'class' => 'ajaxForm', ); - $tabs = array( - 'settings' => array('title' => ts('Info and Settings'), 'class' => 'ajaxForm livePage') + $default, - 'location' => array('title' => ts('Event Location')) + $default, - 'fee' => array('title' => ts('Fees')) + $default, - 'registration' => array('title' => ts('Online Registration')) + $default, - 'reminder' => array('title' => ts('Schedule Reminders'), 'class' => 'livePage') + $default, - 'conference' => array('title' => ts('Conference Slots')) + $default, - 'friend' => array('title' => ts('Tell a Friend')) + $default, - 'pcp' => array('title' => ts('Personal Campaigns')) + $default, - ); + $tabs = array(); + $tabs['settings'] = array('title' => ts('Info and Settings'), 'class' => 'ajaxForm livePage') + $default; + $tabs['location'] = array('title' => ts('Event Location')) + $default; + $tabs['fee'] = array('title' => ts('Fees')) + $default; + $tabs['registration'] = array('title' => ts('Online Registration')) + $default; + if (CRM_Core_Permission::check('administer CiviCRM')) { + $tabs['reminder'] = array('title' => ts('Schedule Reminders'), 'class' => 'livePage') + $default; + } + $tabs['conference'] = array('title' => ts('Conference Slots')) + $default; + $tabs['friend'] = array('title' => ts('Tell a Friend')) + $default; + $tabs['pcp'] = array('title' => ts('Personal Campaigns')) + $default; + // check if we're in shopping cart mode for events $enableCart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME, diff --git a/CRM/Event/Page/ManageEvent.php b/CRM/Event/Page/ManageEvent.php index 026dc185b5..31d46c50ff 100644 --- a/CRM/Event/Page/ManageEvent.php +++ b/CRM/Event/Page/ManageEvent.php @@ -108,48 +108,58 @@ class CRM_Event_Page_ManageEvent extends CRM_Core_Page { self::$_tabLinks = array(); } if (!isset(self::$_tabLinks[$cacheKey])) { - self::$_tabLinks[$cacheKey] = array( - 'settings' => 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) { diff --git a/templates/CRM/Event/Page/EventInfo.tpl b/templates/CRM/Event/Page/EventInfo.tpl index 86a9c0de24..2e2a77082f 100644 --- a/templates/CRM/Event/Page/EventInfo.tpl +++ b/templates/CRM/Event/Page/EventInfo.tpl @@ -36,27 +36,46 @@
+ + {/if}