diff --git a/groups.info b/groups.info index b04b401..4ddff73 100644 --- a/groups.info +++ b/groups.info @@ -153,4 +153,5 @@ dependencies[] = groups_homepage dependencies[] = groups_common dependencies[] = groups_auth dependencies[] = groups_feeds -dependencies[] = groups_events_pages \ No newline at end of file +dependencies[] = groups_events_pages +dependencies[] = groups_pages \ No newline at end of file diff --git a/groups.install b/groups.install index 17cb9f4..cb79af2 100644 --- a/groups.install +++ b/groups.install @@ -153,6 +153,16 @@ function groups_update_7105() { variable_set('theme_default', 'openstack_bootstrap'); } +/** + * Enable groups_pages module. + */ +function groups_update_7104() { + if (!module_exists('groups_pages')) { + module_enable(array('groups_pages')); + drupal_flush_all_caches(); + } +} + /** * Add markdown filter with permissions. */ diff --git a/modules/groups/groups_pages/groups_pages.features.inc b/modules/groups/groups_pages/groups_pages.features.inc new file mode 100644 index 0000000..5a242a6 --- /dev/null +++ b/modules/groups/groups_pages/groups_pages.features.inc @@ -0,0 +1,17 @@ + "1"); + } + if ($module == "strongarm" && $api == "strongarm") { + return array("version" => "1"); + } +} diff --git a/modules/groups/groups_pages/groups_pages.info b/modules/groups/groups_pages/groups_pages.info new file mode 100644 index 0000000..dc9aab2 --- /dev/null +++ b/modules/groups/groups_pages/groups_pages.info @@ -0,0 +1,18 @@ +name = Groups Group Pages +description = Enhances the appearance of group landing pages and allows them to be customized. +core = 7.x +package = Groups - Landing pages +version = 7.x-1.0 +project = groups_pages +dependencies[] = commons_activity_streams +dependencies[] = commons_activity_streams_groups +dependencies[] = commons_bw +dependencies[] = ctools +dependencies[] = groups_groups +dependencies[] = panelizer +dependencies[] = strongarm +features[ctools][] = panelizer:panelizer:1 +features[ctools][] = strongarm:strongarm:1 +features[features_api][] = api:2 +features[panelizer_defaults][] = node:group:default +features[variable][] = panelizer_defaults_node_group diff --git a/modules/groups/groups_pages/groups_pages.install b/modules/groups/groups_pages/groups_pages.install new file mode 100644 index 0000000..acd255f --- /dev/null +++ b/modules/groups/groups_pages/groups_pages.install @@ -0,0 +1,9 @@ +'.t('Join to our user group, participate on local events, contribute to our community, and stay informed about latest news.').'

'; + break; + case 'group unsubscribe': + $variables['items'][0]['#title'] = 'x '.$variables['items'][0]['#title']; + $variables['items'][0]['#prefix'] = '

'.t('You are an active member of this group.').'

'; + break; + } + } +} \ No newline at end of file diff --git a/modules/groups/groups_pages/groups_pages.panelizer.inc b/modules/groups/groups_pages/groups_pages.panelizer.inc new file mode 100644 index 0000000..f92056d --- /dev/null +++ b/modules/groups/groups_pages/groups_pages.panelizer.inc @@ -0,0 +1,191 @@ +disabled = FALSE; /* Edit this to true to make a default panelizer disabled initially */ + $panelizer->api_version = 1; + $panelizer->name = 'node:group:default'; + $panelizer->title = 'Default'; + $panelizer->panelizer_type = 'node'; + $panelizer->panelizer_key = 'group'; + $panelizer->no_blocks = FALSE; + $panelizer->css_id = ''; + $panelizer->css = ''; + $panelizer->pipeline = 'standard'; + $panelizer->contexts = array(); + $panelizer->relationships = array(); + $panelizer->access = array(); + $panelizer->view_mode = 'page_manager'; + $panelizer->css_class = ''; + $panelizer->title_element = 'H2'; + $panelizer->link_to_entity = TRUE; + $panelizer->extra = array(); + $display = new panels_display(); + $display->layout = 'two_66_33'; + $display->layout_settings = array(); + $display->panel_settings = array( + 'style_settings' => array( + 'default' => NULL, + 'two_66_33_top' => NULL, + 'two_66_33_first' => NULL, + 'two_66_33_second' => NULL, + 'two_66_33_bottom' => NULL, + ), + ); + $display->cache = array(); + $display->title = '%node:title'; + $display->uuid = 'E6B07C18-BB1E-460D-BFDA-18B5E5E701AD'; + $display->content = array(); + $display->panels = array(); + $pane = new stdClass(); + $pane->pid = 'new-D535E2E0-1D0E-4B62-9093-D9DE4722EB29'; + $pane->panel = 'two_66_33_first'; + $pane->type = 'entity_field'; + $pane->subtype = 'node:body'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'label' => 'hidden', + 'formatter' => 'text_default', + 'delta_limit' => 0, + 'delta_offset' => '0', + 'delta_reversed' => FALSE, + 'formatter_settings' => array(), + 'context' => 'panelizer', + 'override_title' => 0, + 'override_title_text' => '', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = 'D535E2E0-1D0E-4B62-9093-D9DE4722EB29'; + $display->content['new-D535E2E0-1D0E-4B62-9093-D9DE4722EB29'] = $pane; + $display->panels['two_66_33_first'][0] = 'new-D535E2E0-1D0E-4B62-9093-D9DE4722EB29'; + $pane = new stdClass(); + $pane->pid = 'new-4D07DA83-5650-4EE6-AA34-DEBDE8467ADB'; + $pane->panel = 'two_66_33_first'; + $pane->type = 'entity_field'; + $pane->subtype = 'node:field_resource_links'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'label' => 'hidden', + 'formatter' => 'field_property_list_raw', + 'delta_limit' => '0', + 'delta_offset' => '0', + 'delta_reversed' => 0, + 'formatter_settings' => array(), + 'context' => 'panelizer', + 'override_title' => 0, + 'override_title_text' => '', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 1; + $pane->locks = array(); + $pane->uuid = '4D07DA83-5650-4EE6-AA34-DEBDE8467ADB'; + $display->content['new-4D07DA83-5650-4EE6-AA34-DEBDE8467ADB'] = $pane; + $display->panels['two_66_33_first'][1] = 'new-4D07DA83-5650-4EE6-AA34-DEBDE8467ADB'; + $pane = new stdClass(); + $pane->pid = 'new-0702E7C9-CCB9-4EA3-B2C5-7D1ACDF55BD5'; + $pane->panel = 'two_66_33_second'; + $pane->type = 'entity_field'; + $pane->subtype = 'node:group_group'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'label' => 'hidden', + 'formatter' => 'og_group_subscribe', + 'delta_limit' => 0, + 'delta_offset' => '0', + 'delta_reversed' => FALSE, + 'formatter_settings' => array( + 'field_name' => '0', + ), + 'context' => 'panelizer', + 'override_title' => 0, + 'override_title_text' => '', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '0702E7C9-CCB9-4EA3-B2C5-7D1ACDF55BD5'; + $display->content['new-0702E7C9-CCB9-4EA3-B2C5-7D1ACDF55BD5'] = $pane; + $display->panels['two_66_33_second'][0] = 'new-0702E7C9-CCB9-4EA3-B2C5-7D1ACDF55BD5'; + $pane = new stdClass(); + $pane->pid = 'new-B17247AB-8C6E-4DB5-A8E0-78C8CF4462FA'; + $pane->panel = 'two_66_33_second'; + $pane->type = 'views_panes'; + $pane->subtype = 'activity_group-panel_pane_1'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'items_per_page' => '5', + 'arguments' => array( + 'gid' => '%node:nid', + ), + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 1; + $pane->locks = array(); + $pane->uuid = 'B17247AB-8C6E-4DB5-A8E0-78C8CF4462FA'; + $display->content['new-B17247AB-8C6E-4DB5-A8E0-78C8CF4462FA'] = $pane; + $display->panels['two_66_33_second'][1] = 'new-B17247AB-8C6E-4DB5-A8E0-78C8CF4462FA'; + $pane = new stdClass(); + $pane->pid = 'new-737D0A90-738F-4637-ABE7-39AF64CC3A1F'; + $pane->panel = 'two_66_33_second'; + $pane->type = 'views_panes'; + $pane->subtype = 'commons_contributors_group-panel_pane_2'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'context' => array( + 0 => 'panelizer', + ), + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 2; + $pane->locks = array(); + $pane->uuid = '737D0A90-738F-4637-ABE7-39AF64CC3A1F'; + $display->content['new-737D0A90-738F-4637-ABE7-39AF64CC3A1F'] = $pane; + $display->panels['two_66_33_second'][2] = 'new-737D0A90-738F-4637-ABE7-39AF64CC3A1F'; + $display->hide_title = PANELS_TITLE_FIXED; + $display->title_pane = '0'; + $panelizer->display = $display; + $export['node:group:default'] = $panelizer; + + return $export; +} diff --git a/modules/groups/groups_pages/groups_pages.strongarm.inc b/modules/groups/groups_pages/groups_pages.strongarm.inc new file mode 100644 index 0000000..d10abb6 --- /dev/null +++ b/modules/groups/groups_pages/groups_pages.strongarm.inc @@ -0,0 +1,80 @@ +disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'panelizer_defaults_node_group'; + $strongarm->value = array( + 'status' => 1, + 'view modes' => array( + 'page_manager' => array( + 'status' => 1, + 'default' => 1, + 'choice' => 0, + ), + 'default' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'full' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'teaser' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'rss' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'search_index' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'search_result' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'ical' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'diff_standard' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'token' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + 'revision' => array( + 'status' => 0, + 'default' => 0, + 'choice' => 0, + ), + ), + ); + $export['panelizer_defaults_node_group'] = $strongarm; + + return $export; +} diff --git a/themes/openstack_bootstrap/custom-sass/style.scss b/themes/openstack_bootstrap/custom-sass/style.scss index f61bf00..6dd014a 100644 --- a/themes/openstack_bootstrap/custom-sass/style.scss +++ b/themes/openstack_bootstrap/custom-sass/style.scss @@ -181,6 +181,84 @@ } +/* === Groups page === */ + +.two-66-33 { + @extend .container; + .region-two-66-33-first { + @extend .col-md-8; + } + .region-two-66-33-second { + @extend .col-md-4; + } +} + +.page-node { + h2.pane-title { + color: #2A4E68; + font-weight: 300; + font-size: 18px; + margin-bottom: 25px; + } + .pane-node-body { + margin-top: 25px; + font-size: 16px; + color: #888; + line-height: 1.4; + a { + color: #30739C; + text-decoration: underline; + } + } + .pane-node-field-resource-links { + border-top: 1px dotted #C5E2EA; + margin-top: 25px; + padding-top: 25px; + .property-title { + background: #C4E0E9; + display: inline-block; + color: #254C7C; + padding: 0px 10px; + } + a { + color: #30739C; + text-decoration: underline; + } + } + .pane-node-group-group { + margin-top: 25px; + background: #EDF2F7; + padding: 10px; + border-radius: 4px; + text-align: right; + p { + text-align: left; + } + .group.unsubscribe { + font-size: 10px; + } + } +} + +.view-profile-badges { + h3 { + color: #CF2F19; + font-size: 16px; + font-weight: 300; + + } +} + +.profile-badges { + list-style: none; + padding-left: 0px; + li { + float: left; + margin-right: 10px; + margin-bottom: 10px; + } +} + /* === Groups directory === */ .two-33-66 {