Commit 8045577e authored by ccarigna's avatar ccarigna
Browse files

Added event front page block

parent ac6747ad
......@@ -26,4 +26,8 @@
.event-content .details {border-top: solid 1px #ddd; margin-top: .5em;}
.event-content .details .field {border-bottom: solid 1px #ddd; padding: .5em 0;}
.event-content .details .field .field-label {width: 8em; font-weight: normal; font-style: italic; color: #555;}
.event-content .details .field .field-data {margin-left: 9em;}
\ No newline at end of file
.event-content .details .field .field-data {margin-left: 9em;}
.front .event-date {display: inline-block; width: 120px; font-size: .85em; color: #444;}
.front .event-link-title {width: 370px; display: inline-block; vertical-align: top;}
.front .view-events .more-link {font-weight: bold;}
\ No newline at end of file
......@@ -10,6 +10,39 @@
function uw_ct_event_context_default_contexts() {
$export = array();
$context = new stdClass;
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'event-front_page';
$context->description = 'Displays event block on a site\'s front page.';
$context->tag = 'Content';
$context->conditions = array(
'path' => array(
'values' => array(
'<front>' => '<front>',
),
),
);
$context->reactions = array(
'block' => array(
'blocks' => array(
'views-events-block_1' => array(
'module' => 'views',
'delta' => 'events-block_1',
'region' => 'content',
'weight' => '9',
),
),
),
);
$context->condition_mode = 0;
// Translatables
// Included for use with string extractors like potx.
t('Content');
t('Displays event block on a site\'s front page.');
$export['event-front_page'] = $context;
$context = new stdClass;
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
......
......@@ -22,6 +22,7 @@ dependencies[] = "uw_vocab_audience"
dependencies[] = "uw_xml_sitemap_config"
dependencies[] = "views"
description = "Adds events and event listing pages."
features[context][] = "event-front_page"
features[context][] = "event_categories"
features[ctools][] = "context:context:3"
features[ctools][] = "field_group:field_group:1"
......@@ -69,6 +70,7 @@ features[variable][] = "comment_subject_field_uw_location"
features[variable][] = "comment_uw_event"
features[variable][] = "comment_uw_location"
features[variable][] = "date_format_event_full"
features[variable][] = "date_format_event_short"
features[variable][] = "date_format_long_date_only"
features[variable][] = "date_format_time_only"
features[variable][] = "enable_revisions_page_uw_event"
......
......@@ -115,6 +115,13 @@ function uw_ct_event_strongarm() {
$strongarm->value = 'l, F j, Y - g:ia';
$export['date_format_event_full'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'date_format_event_short';
$strongarm->value = 'M j Y - g:ia';
$export['date_format_event_short'] = $strongarm;
$strongarm = new stdClass;
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
......
......@@ -22,7 +22,7 @@ function uw_ct_event_views_default_views() {
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Upcoming events for...';
$handler->display->display_options['title'] = 'Events by audience';
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
......@@ -244,12 +244,13 @@ function uw_ct_event_views_default_views() {
$handler->display->display_options['fields']['body']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['body']['alter']['external'] = 0;
$handler->display->display_options['fields']['body']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 1;
$handler->display->display_options['fields']['body']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['body']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['body']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['body']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['body']['alter']['strip_tags'] = 1;
$handler->display->display_options['fields']['body']['alter']['trim'] = 0;
$handler->display->display_options['fields']['body']['alter']['preserve_tags'] = '<p> <strong> <em>';
$handler->display->display_options['fields']['body']['alter']['html'] = 0;
$handler->display->display_options['fields']['body']['element_type'] = 'div';
$handler->display->display_options['fields']['body']['element_class'] = 'event-summary';
......@@ -293,20 +294,16 @@ function uw_ct_event_views_default_views() {
/* Display: Events - List */
$handler = $view->new_display('page', 'Events - List', 'page');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['title'] = 'Events';
$handler->display->display_options['defaults']['group_by'] = FALSE;
$handler->display->display_options['defaults']['pager'] = FALSE;
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '5';
$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']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['defaults']['footer'] = FALSE;
/* Footer: Global: Text area */
$handler->display->display_options['footer']['area']['id'] = 'area';
$handler->display->display_options['footer']['area']['table'] = 'views';
$handler->display->display_options['footer']['area']['field'] = 'area';
$handler->display->display_options['footer']['area']['empty'] = FALSE;
$handler->display->display_options['footer']['area']['content'] = '<a href="events/archive">See all events for this month &raquo;</a>';
$handler->display->display_options['footer']['area']['format'] = 'uw_tf_standard';
$handler->display->display_options['footer']['area']['tokenize'] = 0;
$handler->display->display_options['defaults']['empty'] = FALSE;
/* No results behavior: Global: Text area */
$handler->display->display_options['empty']['area']['id'] = 'area';
......@@ -389,12 +386,13 @@ function uw_ct_event_views_default_views() {
$handler->display->display_options['fields']['body']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['body']['alter']['external'] = 0;
$handler->display->display_options['fields']['body']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 1;
$handler->display->display_options['fields']['body']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['body']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['body']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['body']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['body']['alter']['strip_tags'] = 1;
$handler->display->display_options['fields']['body']['alter']['trim'] = 0;
$handler->display->display_options['fields']['body']['alter']['preserve_tags'] = '<p> <strong> <em>';
$handler->display->display_options['fields']['body']['alter']['html'] = 0;
$handler->display->display_options['fields']['body']['element_type'] = 'div';
$handler->display->display_options['fields']['body']['element_class'] = 'event-summary';
......@@ -433,7 +431,7 @@ function uw_ct_event_views_default_views() {
$handler->display->display_options['path'] = 'events';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Events';
$handler->display->display_options['menu']['weight'] = '40';
$handler->display->display_options['menu']['weight'] = '50';
$handler->display->display_options['menu']['name'] = 'main-menu';
/* Display: Manage Events */
......@@ -441,9 +439,11 @@ function uw_ct_event_views_default_views() {
$handler->display->display_options['defaults']['group_by'] = FALSE;
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['defaults']['pager'] = FALSE;
$handler->display->display_options['pager']['type'] = 'some';
$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']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
......@@ -866,8 +866,11 @@ function uw_ct_event_views_default_views() {
$handler->display->display_options['defaults']['access'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['defaults']['pager'] = FALSE;
$handler->display->display_options['pager']['type'] = 'none';
$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']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['defaults']['empty'] = FALSE;
/* No results behavior: Global: Text area */
$handler->display->display_options['empty']['area']['id'] = 'area';
......@@ -883,7 +886,7 @@ function uw_ct_event_views_default_views() {
$handler->display->display_options['arguments']['term_node_tid_depth']['table'] = 'node';
$handler->display->display_options['arguments']['term_node_tid_depth']['field'] = 'term_node_tid_depth';
$handler->display->display_options['arguments']['term_node_tid_depth']['title_enable'] = 1;
$handler->display->display_options['arguments']['term_node_tid_depth']['title'] = 'Upcoming events for %1';
$handler->display->display_options['arguments']['term_node_tid_depth']['title'] = 'Events for %1';
$handler->display->display_options['arguments']['term_node_tid_depth']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['term_node_tid_depth']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['term_node_tid_depth']['summary']['number_of_records'] = '0';
......@@ -965,6 +968,132 @@ function uw_ct_event_views_default_views() {
'uw_event' => 'uw_event',
);
$handler->display->display_options['path'] = 'events/archive';
/* Display: Events Block - Front Page */
$handler = $view->new_display('block', 'Events Block - Front Page', 'block_1');
$handler->display->display_options['defaults']['use_more'] = FALSE;
$handler->display->display_options['use_more'] = TRUE;
$handler->display->display_options['use_more_text'] = 'More events';
$handler->display->display_options['defaults']['pager'] = FALSE;
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '3';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['defaults']['empty'] = FALSE;
$handler->display->display_options['defaults']['fields'] = FALSE;
/* Field: Content: Sticky */
$handler->display->display_options['fields']['sticky']['id'] = 'sticky';
$handler->display->display_options['fields']['sticky']['table'] = 'node';
$handler->display->display_options['fields']['sticky']['field'] = 'sticky';
$handler->display->display_options['fields']['sticky']['label'] = '';
$handler->display->display_options['fields']['sticky']['exclude'] = TRUE;
$handler->display->display_options['fields']['sticky']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['external'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['sticky']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['sticky']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['trim'] = 0;
$handler->display->display_options['fields']['sticky']['alter']['html'] = 0;
$handler->display->display_options['fields']['sticky']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['sticky']['element_default_classes'] = 0;
$handler->display->display_options['fields']['sticky']['hide_empty'] = 0;
$handler->display->display_options['fields']['sticky']['empty_zero'] = 0;
$handler->display->display_options['fields']['sticky']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['sticky']['type'] = 'sticky';
$handler->display->display_options['fields']['sticky']['not'] = 1;
/* Field: Content: Date and time */
$handler->display->display_options['fields']['field_event_date']['id'] = 'field_event_date';
$handler->display->display_options['fields']['field_event_date']['table'] = 'field_data_field_event_date';
$handler->display->display_options['fields']['field_event_date']['field'] = 'field_event_date';
$handler->display->display_options['fields']['field_event_date']['label'] = '';
$handler->display->display_options['fields']['field_event_date']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_event_date']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_event_date']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_event_date']['element_type'] = 'span';
$handler->display->display_options['fields']['field_event_date']['element_class'] = 'event-date [sticky]';
$handler->display->display_options['fields']['field_event_date']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_event_date']['element_default_classes'] = 0;
$handler->display->display_options['fields']['field_event_date']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_event_date']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_event_date']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_event_date']['settings'] = array(
'format_type' => 'event_short',
'fromto' => 'value',
'multiple_number' => '1',
'multiple_from' => '',
'multiple_to' => '',
'show_repeat_rule' => 'hide',
);
$handler->display->display_options['fields']['field_event_date']['group_rows'] = 0;
$handler->display->display_options['fields']['field_event_date']['delta_offset'] = '0';
$handler->display->display_options['fields']['field_event_date']['delta_reversed'] = 0;
$handler->display->display_options['fields']['field_event_date']['multi_type'] = 'ul';
$handler->display->display_options['fields']['field_event_date']['field_api_classes'] = 0;
/* 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']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_type'] = 'span';
$handler->display->display_options['fields']['title']['element_class'] = 'event-link-title';
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['title']['element_default_classes'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
$handler->display->display_options['defaults']['arguments'] = FALSE;
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Published */
$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'] = 0;
$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(
'uw_event' => 'uw_event',
);
/* Filter criterion: Content: Date and time - start date (field_event_date) */
$handler->display->display_options['filters']['field_event_date_value']['id'] = 'field_event_date_value';
$handler->display->display_options['filters']['field_event_date_value']['table'] = 'field_data_field_event_date';
$handler->display->display_options['filters']['field_event_date_value']['field'] = 'field_event_date_value';
$handler->display->display_options['filters']['field_event_date_value']['operator'] = '>=';
$handler->display->display_options['filters']['field_event_date_value']['default_date'] = 'today';
/* Filter criterion: Content: Promoted to front page */
$handler->display->display_options['filters']['promote']['id'] = 'promote';
$handler->display->display_options['filters']['promote']['table'] = 'node';
$handler->display->display_options['filters']['promote']['field'] = 'promote';
$handler->display->display_options['filters']['promote']['value'] = '1';
$export['events'] = $view;
return $export;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment