diff --git a/modules/groups/groups_pages/groups_pages.info b/modules/groups/groups_pages/groups_pages.info index 0d907b3..9c27ac2 100644 --- a/modules/groups/groups_pages/groups_pages.info +++ b/modules/groups/groups_pages/groups_pages.info @@ -16,4 +16,4 @@ features[ctools][] = strongarm:strongarm:1 features[features_api][] = api:2 features[panelizer_defaults][] = node:group:default features[variable][] = panelizer_defaults_node_group -mtime = 1418722134 +mtime = 1420554875 diff --git a/modules/groups/groups_pages/groups_pages.panelizer.inc b/modules/groups/groups_pages/groups_pages.panelizer.inc index ab6a784..e1f0fd3 100644 --- a/modules/groups/groups_pages/groups_pages.panelizer.inc +++ b/modules/groups/groups_pages/groups_pages.panelizer.inc @@ -181,6 +181,35 @@ function groups_pages_panelizer_defaults() { $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-89D9A851-8F3A-45BA-AF74-7E55EBF9BB3C'; + $pane->panel = 'two_66_33_second'; + $pane->type = 'entity_field'; + $pane->subtype = 'node:field_group_status'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'label' => 'hidden', + 'formatter' => 'list_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 = 1; + $pane->locks = array(); + $pane->uuid = '89D9A851-8F3A-45BA-AF74-7E55EBF9BB3C'; + $display->content['new-89D9A851-8F3A-45BA-AF74-7E55EBF9BB3C'] = $pane; + $display->panels['two_66_33_second'][1] = 'new-89D9A851-8F3A-45BA-AF74-7E55EBF9BB3C'; + $pane = new stdClass(); $pane->pid = 'new-B17247AB-8C6E-4DB5-A8E0-78C8CF4462FA'; $pane->panel = 'two_66_33_second'; $pane->type = 'views_panes'; @@ -199,11 +228,11 @@ function groups_pages_panelizer_defaults() { ); $pane->css = array(); $pane->extras = array(); - $pane->position = 1; + $pane->position = 2; $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'; + $display->panels['two_66_33_second'][2] = 'new-B17247AB-8C6E-4DB5-A8E0-78C8CF4462FA'; $pane = new stdClass(); $pane->pid = 'new-737D0A90-738F-4637-ABE7-39AF64CC3A1F'; $pane->panel = 'two_66_33_second'; @@ -222,11 +251,11 @@ function groups_pages_panelizer_defaults() { ); $pane->css = array(); $pane->extras = array(); - $pane->position = 2; + $pane->position = 3; $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->panels['two_66_33_second'][3] = 'new-737D0A90-738F-4637-ABE7-39AF64CC3A1F'; $display->hide_title = PANELS_TITLE_FIXED; $display->title_pane = '0'; $panelizer->display = $display; diff --git a/themes/openstack_bootstrap/custom-sass/partials/_group.scss b/themes/openstack_bootstrap/custom-sass/partials/_group.scss index f072146..ce31457 100644 --- a/themes/openstack_bootstrap/custom-sass/partials/_group.scss +++ b/themes/openstack_bootstrap/custom-sass/partials/_group.scss @@ -137,4 +137,37 @@ position: absolute; float: left; } -} \ No newline at end of file +} + +.group-status-logo { + background: url(../images/group-logo.png); + background-repeat: no-repeat; + width: 32px; + height: 32px; + display: block; + margin-left: -40px; + margin-top: 2px; + float: left; +} + +.node-group.group-status-unsupported .group-status-logo { + background-position: -32px 0px; +} + +.node-group.group-status-official .group-status-logo { + background-position: 0px 0px; +} + +.field-name-field-group-status { + margin-top: 0.5em; + color: #000; + font-size: 14px; + font-weight: 600; + .group-status-logo { + background: url(../images/group-logo-small.png); + width: 16px; + height: 16px; + margin-left: 0px; + margin-right: 4px; + } +} diff --git a/themes/openstack_bootstrap/images/group-logo-small.png b/themes/openstack_bootstrap/images/group-logo-small.png new file mode 100644 index 0000000..c876572 Binary files /dev/null and b/themes/openstack_bootstrap/images/group-logo-small.png differ diff --git a/themes/openstack_bootstrap/images/group-logo.png b/themes/openstack_bootstrap/images/group-logo.png new file mode 100644 index 0000000..c0a6e08 Binary files /dev/null and b/themes/openstack_bootstrap/images/group-logo.png differ diff --git a/themes/openstack_bootstrap/template.php b/themes/openstack_bootstrap/template.php index 51f5f27..6d8df55 100755 --- a/themes/openstack_bootstrap/template.php +++ b/themes/openstack_bootstrap/template.php @@ -24,6 +24,17 @@ function openstack_bootstrap_preprocess_page(&$variables) { } } +/** + * Implements hook_preprocess_field(). + */ +function openstack_bootstrap_preprocess_field(&$variables, $hook) { + if ($node = menu_get_object()) { + if (($node->type == 'group') && ($variables['field_name_css'] == 'field-group-status')) { + $status = $node->field_group_status[LANGUAGE_NONE][0]['value'] == 1; + $variables['items'][0]['#markup'] = $status ? ''.t('Official user group') : ''; + } + } +} /** * Implements hook_page_alter(). @@ -189,6 +200,11 @@ function openstack_bootstrap_preprocess_node(&$variables, $hook) { unset($variables['content']['links']['flag']['#links']['flag-inappropriate_node']); } } + // Add group-status-[official|unsupported] class to css + if ($node->type == 'group') { + $status = $node->field_group_status[LANGUAGE_NONE][0]['value'] == 1; + $variables['classes_array'][] = $status ? 'group-status-official' : 'group-status-unsupported'; + } // Remove Log in or register from comments openstack_bootstrap_preprocess_comment($variables); } diff --git a/themes/openstack_bootstrap/templates/node.tpl.php b/themes/openstack_bootstrap/templates/node.tpl.php index 4a8dddb..9441c56 100644 --- a/themes/openstack_bootstrap/templates/node.tpl.php +++ b/themes/openstack_bootstrap/templates/node.tpl.php @@ -113,6 +113,9 @@ $footer_attributes = ''; ?>
> + + + >