From adef663bbc9ba807369a8609311909677d0f3486 Mon Sep 17 00:00:00 2001 From: Marton Kiss Date: Mon, 29 Feb 2016 10:04:13 +0100 Subject: [PATCH] Add a standalone map page Render an embeddable map at /map url, so it won't contain any footer or header content. Change-Id: I462d5d641bb96372f8a8086eacf43165fb74420a --- .../groups_directory.views_default.inc | 6 ++++++ themes/openstack_bootstrap/template.php | 3 +++ themes/openstack_bootstrap/templates/page--map.tpl.php | 10 ++++++++++ 3 files changed, 19 insertions(+) create mode 100644 themes/openstack_bootstrap/templates/page--map.tpl.php diff --git a/modules/groups/groups_directory/groups_directory.views_default.inc b/modules/groups/groups_directory/groups_directory.views_default.inc index a7a368c..b0fb3aa 100644 --- a/modules/groups/groups_directory/groups_directory.views_default.inc +++ b/modules/groups/groups_directory/groups_directory.views_default.inc @@ -94,6 +94,7 @@ function groups_directory_views_default_views() { /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['title'] = 'Groups map'; $handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['access']['type'] = 'perm'; $handler->display->display_options['cache']['type'] = 'none'; @@ -134,6 +135,11 @@ function groups_directory_views_default_views() { /* Display: Content pane */ $handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1'); + + /* Display: Page */ + $handler = $view->new_display('page', 'Page', 'page_1'); + $handler->display->display_options['path'] = 'map'; + $export['groups_map'] = $view; return $export; diff --git a/themes/openstack_bootstrap/template.php b/themes/openstack_bootstrap/template.php index ac1421d..8955dc7 100755 --- a/themes/openstack_bootstrap/template.php +++ b/themes/openstack_bootstrap/template.php @@ -22,6 +22,9 @@ function openstack_bootstrap_preprocess_page(&$variables) { unset($variables['navbar_classes_array'][$key]); $variables['navbar_classes_array'][] = 'navbar-os'; } + if (request_path() == 'map') { + $vars['theme_hook_suggestions'][] = 'page__map'; + } drupal_add_css('//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css', array('type' => 'external')); } diff --git a/themes/openstack_bootstrap/templates/page--map.tpl.php b/themes/openstack_bootstrap/templates/page--map.tpl.php new file mode 100644 index 0000000..2aa9162 --- /dev/null +++ b/themes/openstack_bootstrap/templates/page--map.tpl.php @@ -0,0 +1,10 @@ + +
+ +