diff --git a/modules/groups/groups_events/groups_events.info b/modules/groups/groups_events/groups_events.info index b338840..ddf6ddd 100644 --- a/modules/groups/groups_events/groups_events.info +++ b/modules/groups/groups_events/groups_events.info @@ -15,3 +15,4 @@ features[field_base][] = field_venue_name features[field_instance][] = node-event-field_venue_name features[views_view][] = groups_events_upcoming_events features_exclude[dependencies][ctools] = ctools +mtime = 1421138870 diff --git a/modules/groups/groups_events/groups_events.module b/modules/groups/groups_events/groups_events.module index 25e93f1..4a11bbb 100644 --- a/modules/groups/groups_events/groups_events.module +++ b/modules/groups/groups_events/groups_events.module @@ -14,3 +14,11 @@ function groups_events_ctools_plugin_directory($module, $plugin) { return 'plugins/' . $plugin; } } + +/** + * Implements hook_menu_alter() + */ +function groups_events_menu_alter(&$items) { + // show attendees tab for logged-in users only + $items['node/%node/attendees']['access callback'] = 'user_is_logged_in'; +} \ No newline at end of file diff --git a/modules/groups/groups_events/groups_events.views_default.inc b/modules/groups/groups_events/groups_events.views_default.inc index e6a23ba..11ed323 100644 --- a/modules/groups/groups_events/groups_events.views_default.inc +++ b/modules/groups/groups_events/groups_events.views_default.inc @@ -28,11 +28,9 @@ function groups_events_views_default_views() { $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'] = 'load_more'; + $handler->display->display_options['pager']['type'] = 'some'; $handler->display->display_options['pager']['options']['items_per_page'] = '5'; $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'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; /* Field: Content: Title */ @@ -126,14 +124,12 @@ function groups_events_views_default_views() { /* Display: Group pane */ $handler = $view->new_display('panel_pane', 'Group pane', 'panel_pane_1'); $handler->display->display_options['defaults']['title'] = FALSE; - $handler->display->display_options['title'] = 'Upcoming events'; + $handler->display->display_options['title'] = 'Upcoming event'; $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; $handler->display->display_options['defaults']['pager'] = FALSE; - $handler->display->display_options['pager']['type'] = 'load_more'; - $handler->display->display_options['pager']['options']['items_per_page'] = '3'; + $handler->display->display_options['pager']['type'] = 'some'; + $handler->display->display_options['pager']['options']['items_per_page'] = '1'; $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['defaults']['style_plugin'] = FALSE; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['defaults']['style_options'] = FALSE; @@ -247,6 +243,7 @@ function groups_events_views_default_views() { /* Display: Landing Page pane */ $handler = $view->new_display('panel_pane', 'Landing Page pane', 'panel_pane_2'); $handler->display->display_options['defaults']['title'] = FALSE; + $handler->display->display_options['title'] = 'Upcoming events'; $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; $handler->display->display_options['defaults']['exposed_form'] = FALSE; $handler->display->display_options['exposed_form']['type'] = 'basic'; @@ -268,18 +265,18 @@ function groups_events_views_default_views() { $handler->display->display_options['empty']['area']['content'] = 'No events have been created yet.'; $handler->display->display_options['empty']['area']['format'] = 'filtered_html'; $handler->display->display_options['defaults']['sorts'] = FALSE; - /* Sort criterion: Content: Promoted to front page */ - $handler->display->display_options['sorts']['promote']['id'] = 'promote'; - $handler->display->display_options['sorts']['promote']['table'] = 'node'; - $handler->display->display_options['sorts']['promote']['field'] = 'promote'; - $handler->display->display_options['sorts']['promote']['exposed'] = TRUE; - $handler->display->display_options['sorts']['promote']['expose']['label'] = 'Featured'; /* Sort criterion: Content: Date - start date (field_date) */ $handler->display->display_options['sorts']['field_date_value']['id'] = 'field_date_value'; $handler->display->display_options['sorts']['field_date_value']['table'] = 'field_data_field_date'; $handler->display->display_options['sorts']['field_date_value']['field'] = 'field_date_value'; $handler->display->display_options['sorts']['field_date_value']['exposed'] = TRUE; $handler->display->display_options['sorts']['field_date_value']['expose']['label'] = 'Date'; + /* Sort criterion: Content: Promoted to front page */ + $handler->display->display_options['sorts']['promote']['id'] = 'promote'; + $handler->display->display_options['sorts']['promote']['table'] = 'node'; + $handler->display->display_options['sorts']['promote']['field'] = 'promote'; + $handler->display->display_options['sorts']['promote']['exposed'] = TRUE; + $handler->display->display_options['sorts']['promote']['expose']['label'] = 'Featured'; $handler->display->display_options['inherit_panels_path'] = '1'; $export['groups_events_upcoming_events'] = $view; diff --git a/modules/groups/groups_homepage/groups_homepage.info b/modules/groups/groups_homepage/groups_homepage.info index 77bc9e8..00fda53 100644 --- a/modules/groups/groups_homepage/groups_homepage.info +++ b/modules/groups/groups_homepage/groups_homepage.info @@ -6,11 +6,11 @@ project = groups_homepage dependencies[] = ctools dependencies[] = ds dependencies[] = features +dependencies[] = groups_events dependencies[] = menu dependencies[] = page_manager dependencies[] = panels_mini dependencies[] = strongarm -dependencies[] = groups_events features[ctools][] = ds:ds:1 features[ctools][] = page_manager:pages_default:1 features[ctools][] = panels_mini:panels_default:1 @@ -25,3 +25,4 @@ features[panels_mini][] = recent_activity features[panels_mini][] = upcoming_events features[variable][] = panels_ajax_tab features[variable][] = site_frontpage +mtime = 1421138870 diff --git a/modules/groups/groups_homepage/groups_homepage.pages_default.inc b/modules/groups/groups_homepage/groups_homepage.pages_default.inc index 3032faf..fbdf853 100644 --- a/modules/groups/groups_homepage/groups_homepage.pages_default.inc +++ b/modules/groups/groups_homepage/groups_homepage.pages_default.inc @@ -79,10 +79,10 @@ function groups_homepage_default_page_manager_pages() { $display->content = array(); $display->panels = array(); $pane = new stdClass(); - $pane->pid = 'new-7bf353ed-b2a0-414f-b90e-cf8c4647a2f8'; + $pane->pid = 'new-E519BFFF-E7E6-4152-B57B-325564FA7B29'; $pane->panel = 'os_bottom_left'; $pane->type = 'views_panes'; - $pane->subtype = 'commons_events_upcoming-panel_pane_2'; + $pane->subtype = 'groups_events_upcoming_events-panel_pane_2'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array(); @@ -94,9 +94,9 @@ function groups_homepage_default_page_manager_pages() { $pane->extras = array(); $pane->position = 0; $pane->locks = array(); - $pane->uuid = '7bf353ed-b2a0-414f-b90e-cf8c4647a2f8'; - $display->content['new-7bf353ed-b2a0-414f-b90e-cf8c4647a2f8'] = $pane; - $display->panels['os_bottom_left'][0] = 'new-7bf353ed-b2a0-414f-b90e-cf8c4647a2f8'; + $pane->uuid = 'E519BFFF-E7E6-4152-B57B-325564FA7B29'; + $display->content['new-E519BFFF-E7E6-4152-B57B-325564FA7B29'] = $pane; + $display->panels['os_bottom_left'][0] = 'new-E519BFFF-E7E6-4152-B57B-325564FA7B29'; $pane = new stdClass(); $pane->pid = 'new-cd740d02-05e4-4170-ac8f-a7c5d32da4aa'; $pane->panel = 'os_bottom_right'; diff --git a/themes/openstack_bootstrap/custom-sass/partials/_event.scss b/themes/openstack_bootstrap/custom-sass/partials/_event.scss new file mode 100644 index 0000000..694938d --- /dev/null +++ b/themes/openstack_bootstrap/custom-sass/partials/_event.scss @@ -0,0 +1,22 @@ +.pane-content .node-event, +.view-groups-events-upcoming-events { + p { + font-size: 14px; + line-height: 1em; + color: #888; + a { + color: #30739C; + text-decoration: underline; + } + } +} + +.pane-content .node-event { + .field-name-field-date { + color: #DA422F; + } +} + +.nav-tabs { + margin-bottom: 0.5em; +} \ No newline at end of file diff --git a/themes/openstack_bootstrap/custom-sass/style.scss b/themes/openstack_bootstrap/custom-sass/style.scss index c79775a..d47ffcf 100644 --- a/themes/openstack_bootstrap/custom-sass/style.scss +++ b/themes/openstack_bootstrap/custom-sass/style.scss @@ -19,6 +19,7 @@ @import 'partials/comment'; @import 'partials/post'; @import 'partials/profile'; +@import 'partials/event'; /* Custom override */ @@ -143,7 +144,8 @@ /* === Upcoming events block === */ .view-id-commons_events_upcoming, -.view-commons-events-upcoming { +.view-commons-events-upcoming, +.pane-groups-events-upcoming-events-panel-pane-2 { // Hide sort filter and event count .attachment-before, .view-filters { @@ -162,6 +164,11 @@ .views-row-first { padding-top: 0px; } + /* hide comment count and attendee numbers */ + .views-field-comment-count, + .views-field-capacity-used { + display: none; + } .views-field-title-field, h3 { margin: 0px; diff --git a/themes/openstack_bootstrap/templates/views-view-fields--groups-events-upcoming-events--panel-pane-1.tpl.php b/themes/openstack_bootstrap/templates/views-view-fields--groups-events-upcoming-events--panel-pane-1.tpl.php index 61bd6e6..48b1b31 100644 --- a/themes/openstack_bootstrap/templates/views-view-fields--groups-events-upcoming-events--panel-pane-1.tpl.php +++ b/themes/openstack_bootstrap/templates/views-view-fields--groups-events-upcoming-events--panel-pane-1.tpl.php @@ -17,7 +17,9 @@