Skip to content

Instantly share code, notes, and snippets.

@ao5357
Created December 6, 2021 03:50
Show Gist options
  • Save ao5357/631cddc2fb2f299a9f2ba4f34bec56a5 to your computer and use it in GitHub Desktop.
Save ao5357/631cddc2fb2f299a9f2ba4f34bec56a5 to your computer and use it in GitHub Desktop.
View for managing future d7 events for digital displays
$view = new view();
$view->name = 'nypl_events_digital_displays';
$view->description = 'Admin listings for events on digital displays';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Digital Displays';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Digital Displays';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access digital display management';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '25';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
'views_bulk_operations' => 'views_bulk_operations',
'field_bs_digital_display' => 'field_bs_digital_display',
'title' => 'title',
'field_lts_display_location' => 'field_lts_display_location',
'field_date_time' => 'field_date_time',
'field_location' => 'field_location',
'body' => 'body',
'edit_node' => 'edit_node',
);
$handler->display->display_options['style_options']['class'] = '';
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
'views_bulk_operations' => array(
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'field_bs_digital_display' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'title' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'field_lts_display_location' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'field_date_time' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'field_location' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'body' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'edit_node' => array(
'align' => '',
'separator' => '',
'empty_column' => 0,
),
);
$handler->display->display_options['style_options']['sticky'] = TRUE;
/* Relationship: Content: Dates (field_group_program_dates) */
$handler->display->display_options['relationships']['field_group_program_dates_value']['id'] = 'field_group_program_dates_value';
$handler->display->display_options['relationships']['field_group_program_dates_value']['table'] = 'field_data_field_group_program_dates';
$handler->display->display_options['relationships']['field_group_program_dates_value']['field'] = 'field_group_program_dates_value';
$handler->display->display_options['relationships']['field_group_program_dates_value']['label'] = 'dates';
$handler->display->display_options['relationships']['field_group_program_dates_value']['required'] = TRUE;
$handler->display->display_options['relationships']['field_group_program_dates_value']['delta'] = '-1';
/* Relationship: Content: Location (field_group_program_location) */
$handler->display->display_options['relationships']['field_group_program_location_value']['id'] = 'field_group_program_location_value';
$handler->display->display_options['relationships']['field_group_program_location_value']['table'] = 'field_data_field_group_program_location';
$handler->display->display_options['relationships']['field_group_program_location_value']['field'] = 'field_group_program_location_value';
$handler->display->display_options['relationships']['field_group_program_location_value']['label'] = 'Location';
$handler->display->display_options['relationships']['field_group_program_location_value']['required'] = TRUE;
$handler->display->display_options['relationships']['field_group_program_location_value']['delta'] = '-1';
/* Field: Bulk operations: Content */
$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['label'] = '';
$handler->display->display_options['fields']['views_bulk_operations']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['display_type'] = '0';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['enable_select_all_pages'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['row_clickable'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
'action::views_bulk_operations_modify_action' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 0,
'label' => '',
'settings' => array(
'show_all_tokens' => 0,
'display_values' => array(
'_all_' => '_all_',
),
),
),
'action::node_save_action' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 0,
'label' => '',
),
);
/* Field: Field collection item: For Digital Display */
$handler->display->display_options['fields']['field_bs_digital_display']['id'] = 'field_bs_digital_display';
$handler->display->display_options['fields']['field_bs_digital_display']['table'] = 'field_data_field_bs_digital_display';
$handler->display->display_options['fields']['field_bs_digital_display']['field'] = 'field_bs_digital_display';
$handler->display->display_options['fields']['field_bs_digital_display']['relationship'] = 'field_group_program_dates_value';
$handler->display->display_options['fields']['field_bs_digital_display']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_bs_digital_display']['type'] = 'list_key';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Field: Field collection item: Display Location */
$handler->display->display_options['fields']['field_lts_display_location']['id'] = 'field_lts_display_location';
$handler->display->display_options['fields']['field_lts_display_location']['table'] = 'field_data_field_lts_display_location';
$handler->display->display_options['fields']['field_lts_display_location']['field'] = 'field_lts_display_location';
$handler->display->display_options['fields']['field_lts_display_location']['relationship'] = 'field_group_program_dates_value';
/* Field: Field: Date */
$handler->display->display_options['fields']['field_date_time']['id'] = 'field_date_time';
$handler->display->display_options['fields']['field_date_time']['table'] = 'field_data_field_date_time';
$handler->display->display_options['fields']['field_date_time']['field'] = 'field_date_time';
$handler->display->display_options['fields']['field_date_time']['relationship'] = 'field_group_program_dates_value';
$handler->display->display_options['fields']['field_date_time']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_date_time']['settings'] = array(
'format_type' => 'field_date_long',
'custom_date_format' => '',
'fromto' => 'both',
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'show_remaining_days' => 0,
'show_repeat_rule' => 'show',
);
/* Field: Field: NYPL Location */
$handler->display->display_options['fields']['field_location']['id'] = 'field_location';
$handler->display->display_options['fields']['field_location']['table'] = 'field_data_field_location';
$handler->display->display_options['fields']['field_location']['field'] = 'field_location';
$handler->display->display_options['fields']['field_location']['relationship'] = 'field_group_program_location_value';
$handler->display->display_options['fields']['field_location']['label'] = 'Location';
/* Field: Content: Body */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
$handler->display->display_options['fields']['body']['field'] = 'body';
$handler->display->display_options['fields']['body']['label'] = 'Summary';
$handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['body']['type'] = 'text_summary_or_trimmed';
$handler->display->display_options['fields']['body']['settings'] = array(
'trim_length' => '600',
);
/* Field: Content: Link to edit content */
$handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['label'] = 'Edit';
$handler->display->display_options['fields']['edit_node']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['edit_node']['text'] = 'Edit';
/* Filter criterion: Content: Published status */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'event_program' => 'event_program',
);
/* Filter criterion: Field collection item: Display Location (field_lts_display_location) */
$handler->display->display_options['filters']['field_lts_display_location_value']['id'] = 'field_lts_display_location_value';
$handler->display->display_options['filters']['field_lts_display_location_value']['table'] = 'field_data_field_lts_display_location';
$handler->display->display_options['filters']['field_lts_display_location_value']['field'] = 'field_lts_display_location_value';
$handler->display->display_options['filters']['field_lts_display_location_value']['relationship'] = 'field_group_program_dates_value';
$handler->display->display_options['filters']['field_lts_display_location_value']['exposed'] = TRUE;
$handler->display->display_options['filters']['field_lts_display_location_value']['expose']['operator_id'] = 'field_lts_display_location_value_op';
$handler->display->display_options['filters']['field_lts_display_location_value']['expose']['label'] = 'Display Location';
$handler->display->display_options['filters']['field_lts_display_location_value']['expose']['operator'] = 'field_lts_display_location_value_op';
$handler->display->display_options['filters']['field_lts_display_location_value']['expose']['identifier'] = 'field_lts_display_location_value';
$handler->display->display_options['filters']['field_lts_display_location_value']['expose']['multiple'] = TRUE;
$handler->display->display_options['filters']['field_lts_display_location_value']['expose']['remember_roles'] = array(
2 => '2',
);
$handler->display->display_options['filters']['field_lts_display_location_value']['reduce_duplicates'] = TRUE;
/* Filter criterion: Field collection item: For Digital Display (field_bs_digital_display) */
$handler->display->display_options['filters']['field_bs_digital_display_value']['id'] = 'field_bs_digital_display_value';
$handler->display->display_options['filters']['field_bs_digital_display_value']['table'] = 'field_data_field_bs_digital_display';
$handler->display->display_options['filters']['field_bs_digital_display_value']['field'] = 'field_bs_digital_display_value';
$handler->display->display_options['filters']['field_bs_digital_display_value']['relationship'] = 'field_group_program_dates_value';
$handler->display->display_options['filters']['field_bs_digital_display_value']['value'] = array(
1 => '1',
);
$handler->display->display_options['filters']['field_bs_digital_display_value']['exposed'] = TRUE;
$handler->display->display_options['filters']['field_bs_digital_display_value']['expose']['operator_id'] = 'field_bs_digital_display_value_op';
$handler->display->display_options['filters']['field_bs_digital_display_value']['expose']['label'] = 'For Digital Display';
$handler->display->display_options['filters']['field_bs_digital_display_value']['expose']['operator'] = 'field_bs_digital_display_value_op';
$handler->display->display_options['filters']['field_bs_digital_display_value']['expose']['identifier'] = 'field_bs_digital_display_value';
$handler->display->display_options['filters']['field_bs_digital_display_value']['expose']['remember_roles'] = array(
2 => '2',
);
$handler->display->display_options['filters']['field_bs_digital_display_value']['reduce_duplicates'] = TRUE;
/* Filter criterion: Field: Date - end date (field_date_time:value2) */
$handler->display->display_options['filters']['field_date_time_value2']['id'] = 'field_date_time_value2';
$handler->display->display_options['filters']['field_date_time_value2']['table'] = 'field_data_field_date_time';
$handler->display->display_options['filters']['field_date_time_value2']['field'] = 'field_date_time_value2';
$handler->display->display_options['filters']['field_date_time_value2']['relationship'] = 'field_group_program_dates_value';
$handler->display->display_options['filters']['field_date_time_value2']['operator'] = '>=';
$handler->display->display_options['filters']['field_date_time_value2']['granularity'] = 'second';
$handler->display->display_options['filters']['field_date_time_value2']['form_type'] = 'date_text';
$handler->display->display_options['filters']['field_date_time_value2']['default_date'] = 'now';
/* Filter criterion: Field: NYPL Location (field_location) */
$handler->display->display_options['filters']['field_location_value']['id'] = 'field_location_value';
$handler->display->display_options['filters']['field_location_value']['table'] = 'field_data_field_location';
$handler->display->display_options['filters']['field_location_value']['field'] = 'field_location_value';
$handler->display->display_options['filters']['field_location_value']['relationship'] = 'field_group_program_location_value';
$handler->display->display_options['filters']['field_location_value']['exposed'] = TRUE;
$handler->display->display_options['filters']['field_location_value']['expose']['operator_id'] = 'field_location_value_op';
$handler->display->display_options['filters']['field_location_value']['expose']['label'] = 'Location';
$handler->display->display_options['filters']['field_location_value']['expose']['operator'] = 'field_location_value_op';
$handler->display->display_options['filters']['field_location_value']['expose']['identifier'] = 'field_location_value';
$handler->display->display_options['filters']['field_location_value']['expose']['multiple'] = TRUE;
$handler->display->display_options['filters']['field_location_value']['expose']['remember_roles'] = array(
2 => '2',
);
$handler->display->display_options['filters']['field_location_value']['reduce_duplicates'] = TRUE;
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'admin/config/content/nypl_events/digital-displays';
$handler->display->display_options['menu']['type'] = 'tab';
$handler->display->display_options['menu']['title'] = 'Digital Displays';
$handler->display->display_options['menu']['weight'] = '0';
$handler->display->display_options['menu']['name'] = 'management';
$handler->display->display_options['menu']['context'] = 0;
$handler->display->display_options['menu']['context_only_inline'] = 0;
$translatables['nypl_events_digital_displays'] = array(
t('Master'),
t('Digital Displays'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort by'),
t('Asc'),
t('Desc'),
t('Items per page'),
t('- All -'),
t('Offset'),
t('« first'),
t('‹ previous'),
t('next ›'),
t('last »'),
t('dates'),
t('Location'),
t('- Choose an operation -'),
t('For Digital Display'),
t('Title'),
t('Display Location'),
t('Date'),
t('Summary'),
t('Edit'),
t('Page'),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment