You are here

function calendar_admin_settings in Calendar 7.3

General Calendar administration.

1 string reference to 'calendar_admin_settings'
calendar_menu in ./calendar.module
Implements hook_menu().

File

./calendar.module, line 29
Adds calendar filtering and displays to Views.

Code

function calendar_admin_settings() {
  $form = array();
  $form['#prefix'] = '<h2>Calendar Administration</h2>';
  $form['calendar_track_date'] = array(
    '#title' => t('Track current date in session'),
    '#type' => 'radios',
    '#options' => array(
      0 => t("Never"),
      1 => t('For authenticated users'),
      2 => t('For all users'),
    ),
    '#default_value' => variable_get('calendar_track_date', 0),
    '#description' => t("Store session information about the user's current date as they move back and forth through the calendar. Without this setting users will revert to the current day each time they choose a new calendar period (year, month, week, or day). With this option set they will move to a day that conforms to the time period they were viewing before they switched. Requires session tracking which is not ordinarily enabled for anonymous users."),
  );
  $form['calendar_add_colorbox'] = array(
    '#title' => t('Add Colorbox settings to Node calendar templates'),
    '#default_value' => variable_get('calendar_add_colorbox'),
    '#type' => 'radios',
    '#options' => array(
      0 => t('No'),
      1 => t('Yes'),
    ),
    '#description' => t('To try the Colorbox settings, choose the option to add Colorbox settings to the calendar templates. Install and enable the Colorbox module, following the instructions on the Colorbox project page, then create a new calendar from a template using any date field in the Node base table. The calendar will be set up to display the calendar items in a Colorbox.'),
  );
  $form['calendar_provide_views_templates'] = array(
    '#title' => t('Provide Views templates for calendar'),
    '#type' => 'radios',
    '#options' => array(
      0 => t('No'),
      1 => t('Yes'),
    ),
    '#default_value' => variable_get('calendar_provide_views_templates', 1),
    '#description' => t("Views calendar templates are created for every date field by default, see !url. You can disable this to improve Views UI performance.", array(
      '!url' => l(t('Views templates'), 'admin/structure/views/add-template'),
    )),
  );
  return system_settings_form($form);
}