summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/theme.maintenance.inc2
-rw-r--r--modules/simpletest/tests/menu.test2
-rw-r--r--modules/system/system.admin.inc4
-rw-r--r--modules/system/system.install40
-rw-r--r--sites/default/default.settings.php4
-rw-r--r--themes/garland/color/base.pngbin29774 -> 23869 bytes
-rw-r--r--themes/garland/color/preview.pngbin22111 -> 16841 bytes
-rw-r--r--themes/garland/garland.info3
-rw-r--r--themes/garland/minnelli/color/base.pngbin30077 -> 0 bytes
-rw-r--r--themes/garland/minnelli/color/color.inc75
-rw-r--r--themes/garland/minnelli/color/preview.pngbin23895 -> 0 bytes
-rw-r--r--themes/garland/minnelli/logo.pngbin5399 -> 0 bytes
-rw-r--r--themes/garland/minnelli/minnelli.css14
-rw-r--r--themes/garland/minnelli/minnelli.info8
-rw-r--r--themes/garland/minnelli/screenshot.pngbin11612 -> 0 bytes
-rw-r--r--themes/garland/style.css15
-rw-r--r--themes/garland/template.php20
-rw-r--r--themes/garland/theme-settings.php25
18 files changed, 109 insertions, 103 deletions
diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc
index a9b50bca5..1698630b5 100644
--- a/includes/theme.maintenance.inc
+++ b/includes/theme.maintenance.inc
@@ -44,7 +44,7 @@ function _drupal_maintenance_theme() {
drupal_load('module', 'system');
}
- $custom_theme = variable_get('maintenance_theme', 'minnelli');
+ $custom_theme = variable_get('maintenance_theme', 'garland');
}
$themes = list_themes();
diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test
index cab0dc9aa..0ff063ae8 100644
--- a/modules/simpletest/tests/menu.test
+++ b/modules/simpletest/tests/menu.test
@@ -60,7 +60,7 @@ class MenuIncTestCase extends DrupalWebTestCase {
// For a regular user, the fact that the site is in maintenance mode means
// we expect the theme callback system to be bypassed entirely.
$this->drupalGet('menu-test/theme-callback/use-admin-theme');
- $this->assertRaw('minnelli/minnelli.css', t("The maintenance theme's CSS appears on the page."));
+ $this->assertRaw('garland/style.css', t("The maintenance theme's CSS appears on the page."));
// An administrator, however, should continue to see the requested theme.
$admin_user = $this->drupalCreateUser(array('access site in maintenance mode'));
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 33e22362f..8489287ff 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -307,8 +307,10 @@ function system_themes_page() {
// There are two possible theme groups.
$theme_group_titles = array(
'enabled' => format_plural(count($theme_groups['enabled']), 'Enabled theme', 'Enabled themes'),
- 'disabled' => format_plural(count($theme_groups['disabled']), 'Disabled theme', 'Disabled themes'),
);
+ if (!empty($theme_groups['disabled'])) {
+ $theme_group_titles['disabled'] = format_plural(count($theme_groups['disabled']), 'Disabled theme', 'Disabled themes');
+ };
uasort($theme_groups['enabled'], 'system_sort_themes');
drupal_alter('system_themes_page', $theme_groups);
diff --git a/modules/system/system.install b/modules/system/system.install
index ccaf437c4..987e7a0e4 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -2766,6 +2766,46 @@ function system_update_7045() {
}
/**
+ * Switch from the Minnelli theme if it is the default or admin theme.
+ */
+function system_update_7046() {
+ if (variable_get('theme_default') == 'minnelli' || variable_get('admin_theme') == 'minnelli') {
+ // Make sure Garland is enabled.
+ db_update('system')
+ ->fields(array('status' => 1))
+ ->condition('type', 'theme')
+ ->condition('name', 'garland')
+ ->execute();
+ if (variable_get('theme_default') != 'garland') {
+ // If the default theme isn't Garland, transfer all of Minnelli's old
+ // settings to Garland.
+ $settings = variable_get('theme_minnelli_settings', array());
+ // Set the theme setting width to "fixed" to match Minnelli's old layout.
+ $settings['garland_width'] = 'fixed';
+ variable_set('theme_garland_settings', $settings);
+ // Remove Garland's color files since they won't match Minnelli's.
+ foreach (variable_get('color_garland_files', array()) as $file) {
+ @unlink($file);
+ }
+ if (isset($file) && $file = dirname($file)) {
+ @rmdir($file);
+ }
+ variable_del('color_garland_palette');
+ variable_del('color_garland_stylesheets');
+ variable_del('color_garland_logo');
+ variable_del('color_garland_files');
+ variable_del('color_garland_screenshot');
+ }
+ if (variable_get('theme_default') == 'minnelli') {
+ variable_set('theme_default', 'garland');
+ }
+ if (variable_get('admin_theme') == 'minnelli') {
+ variable_set('admin_theme', 'garland');
+ }
+ }
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 17190bee1..d8c3c72e8 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -251,7 +251,7 @@ ini_set('session.cookie_lifetime', 2000000);
* Remove the leading hash signs to enable.
*/
# $conf['site_name'] = 'My Drupal site';
-# $conf['theme_default'] = 'minnelli';
+# $conf['theme_default'] = 'garland';
# $conf['anonymous'] = 'Visitor';
/**
@@ -262,7 +262,7 @@ ini_set('session.cookie_lifetime', 2000000);
* theme. It is located inside 'modules/system/maintenance-page.tpl.php'.
* Note: This setting does not apply to installation and update pages.
*/
-# $conf['maintenance_theme'] = 'minnelli';
+# $conf['maintenance_theme'] = 'garland';
/**
* reverse_proxy accepts a boolean value.
diff --git a/themes/garland/color/base.png b/themes/garland/color/base.png
index 4a31efed0..428c21221 100644
--- a/themes/garland/color/base.png
+++ b/themes/garland/color/base.png
Binary files differ
diff --git a/themes/garland/color/preview.png b/themes/garland/color/preview.png
index 3403ee8dd..d80ad30f8 100644
--- a/themes/garland/color/preview.png
+++ b/themes/garland/color/preview.png
Binary files differ
diff --git a/themes/garland/garland.info b/themes/garland/garland.info
index 4c9597771..13576cd1e 100644
--- a/themes/garland/garland.info
+++ b/themes/garland/garland.info
@@ -1,9 +1,10 @@
; $Id$
name = Garland
-description = Tableless, recolorable, multi-column, fluid width theme.
+description = A multi-column theme which can be configured to modify colors and switch between fixed and fluid width layouts.
package = Core
version = VERSION
core = 7.x
engine = phptemplate
stylesheets[all][] = style.css
stylesheets[print][] = print.css
+settings[garland_width] = fluid
diff --git a/themes/garland/minnelli/color/base.png b/themes/garland/minnelli/color/base.png
deleted file mode 100644
index ef1df365e..000000000
--- a/themes/garland/minnelli/color/base.png
+++ /dev/null
Binary files differ
diff --git a/themes/garland/minnelli/color/color.inc b/themes/garland/minnelli/color/color.inc
deleted file mode 100644
index eab1235be..000000000
--- a/themes/garland/minnelli/color/color.inc
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-// $Id$
-
-$info = array(
-
- // Pre-defined color schemes.
- 'schemes' => array(
- '#0072b9,#027ac6,#2385c2,#5ab5ee,#494949' => t('Blue Lagoon (Default)'),
- '#464849,#2f416f,#2a2b2d,#5d6779,#494949' => t('Ash'),
- '#55c0e2,#000000,#085360,#007e94,#696969' => t('Aquamarine'),
- '#d5b048,#6c420e,#331900,#971702,#494949' => t('Belgian Chocolate'),
- '#3f3f3f,#336699,#6598cb,#6598cb,#000000' => t('Bluemarine'),
- '#d0cb9a,#917803,#efde01,#e6fb2d,#494949' => t('Citrus Blast'),
- '#0f005c,#434f8c,#4d91ff,#1a1575,#000000' => t('Cold Day'),
- '#c9c497,#0c7a00,#03961e,#7be000,#494949' => t('Greenbeam'),
- '#ffe23d,#a9290a,#fc6d1d,#a30f42,#494949' => t('Mediterrano'),
- '#788597,#3f728d,#a9adbc,#d4d4d4,#707070' => t('Mercury'),
- '#5b5fa9,#5b5faa,#0a2352,#9fa8d5,#494949' => t('Nocturnal'),
- '#7db323,#6a9915,#b5d52a,#7db323,#191a19' => t('Olivia'),
- '#12020b,#1b1a13,#f391c6,#f41063,#898080' => t('Pink Plastic'),
- '#b7a0ba,#c70000,#a1443a,#f21107,#515d52' => t('Shiny Tomato'),
- '#18583d,#1b5f42,#34775a,#52bf90,#2d2d2d' => t('Teal Top'),
- ),
-
- // Images to copy over.
- 'copy' => array(
- '../images/menu-collapsed.gif',
- '../images/menu-collapsed-rtl.gif',
- '../images/menu-expanded.gif',
- '../images/menu-leaf.gif',
- ),
-
- // CSS files (excluding @import) to rewrite with new color scheme.
- 'css' => array(
- '../style.css',
- ),
-
- // Coordinates of gradient (x, y, width, height).
- 'gradient' => array(0, 37, 760, 121),
-
- // Color areas to fill (x, y, width, height).
- 'fill' => array(
- 'base' => array(0, 0, 760, 568),
- 'link' => array(107, 533, 41, 23),
- ),
-
- // Coordinates of all the theme slices (x, y, width, height)
- // with their filename as used in the stylesheet.
- 'slices' => array(
- '../images/body.png' => array(0, 37, 1, 280),
- '../images/bg-bar.png' => array(202, 530, 76, 14),
- '../images/bg-bar-white.png' => array(202, 506, 76, 14),
- '../images/bg-tab.png' => array(107, 533, 41, 23),
- '../images/bg-navigation.png' => array(0, 0, 7, 37),
- '../images/bg-content-left.png' => array(40, 117, 50, 352),
- '../images/bg-content-right.png' => array(510, 117, 50, 352),
- '../images/bg-content.png' => array(299, 117, 7, 200),
- '../images/bg-navigation-item.png' => array(32, 37, 17, 12),
- '../images/bg-navigation-item-hover.png' => array(54, 37, 17, 12),
- '../images/gradient-inner.png' => array(646, 307, 112, 42),
-
- 'logo.png' => array(622, 51, 64, 73),
- 'screenshot.png' => array(0, 37, 400, 240),
- ),
-
- // Reference color used for blending. Matches the base.png's colors.
- 'blend_target' => '#ffffff',
-
- // Preview files.
- 'preview_image' => 'color/preview.png',
- 'preview_css' => '../color/preview.css',
-
- // Base file for image generation.
- 'base_image' => 'color/base.png',
-);
diff --git a/themes/garland/minnelli/color/preview.png b/themes/garland/minnelli/color/preview.png
deleted file mode 100644
index b7e9a1ac5..000000000
--- a/themes/garland/minnelli/color/preview.png
+++ /dev/null
Binary files differ
diff --git a/themes/garland/minnelli/logo.png b/themes/garland/minnelli/logo.png
deleted file mode 100644
index 3529fef31..000000000
--- a/themes/garland/minnelli/logo.png
+++ /dev/null
Binary files differ
diff --git a/themes/garland/minnelli/minnelli.css b/themes/garland/minnelli/minnelli.css
deleted file mode 100644
index 017801d9b..000000000
--- a/themes/garland/minnelli/minnelli.css
+++ /dev/null
@@ -1,14 +0,0 @@
-/* $Id$ */
-
-body #wrapper #container {
- width: 560px;
-}
-
-body.two-sidebars #wrapper #container {
- width: 980px;
-}
-
-body.sidebar-first #wrapper #container,
-body.sidebar-second #wrapper #container {
- width: 770px;
-}
diff --git a/themes/garland/minnelli/minnelli.info b/themes/garland/minnelli/minnelli.info
deleted file mode 100644
index e5c88fe72..000000000
--- a/themes/garland/minnelli/minnelli.info
+++ /dev/null
@@ -1,8 +0,0 @@
-; $Id$
-name = Minnelli
-description = Tableless, recolorable, multi-column, fixed width theme.
-package = Core
-version = VERSION
-core = 7.x
-base theme = garland
-stylesheets[all][] = minnelli.css
diff --git a/themes/garland/minnelli/screenshot.png b/themes/garland/minnelli/screenshot.png
deleted file mode 100644
index 518871b2f..000000000
--- a/themes/garland/minnelli/screenshot.png
+++ /dev/null
Binary files differ
diff --git a/themes/garland/style.css b/themes/garland/style.css
index f865cee3e..0f92c757f 100644
--- a/themes/garland/style.css
+++ b/themes/garland/style.css
@@ -366,9 +366,24 @@ table .form-button, table .form-submit {
background: #edf5fa url(images/body.png) repeat-x 50% 0;
}
+/* Set container widths when we are using the "fixed width" option. */
#wrapper #container {
+ width: 560px;
margin: 0 auto;
padding: 0 20px;
+}
+
+body.one-sidebar #wrapper #container {
+ width: 770px;
+}
+
+body.two-sidebars #wrapper #container {
+ width: 980px;
+}
+
+/* Unset container width when we are using the "fluid width" option. */
+body.fluid-width #wrapper #container {
+ width: auto;
max-width: 1270px;
}
diff --git a/themes/garland/template.php b/themes/garland/template.php
index 66f3f3957..677d13831 100644
--- a/themes/garland/template.php
+++ b/themes/garland/template.php
@@ -22,6 +22,26 @@ function garland_breadcrumb($variables) {
}
/**
+ * Override or insert variables into the maintenance page template.
+ */
+function garland_preprocess_maintenance_page(&$vars) {
+ // Toggle fixed or fluid width.
+ if (theme_get_setting('garland_width') == 'fluid') {
+ $vars['classes_array'][] = 'fluid-width';
+ }
+}
+
+/**
+ * Override or insert variables into the html template.
+ */
+function garland_preprocess_html(&$vars) {
+ // Toggle fixed or fluid width.
+ if (theme_get_setting('garland_width') == 'fluid') {
+ $vars['classes_array'][] = 'fluid-width';
+ }
+}
+
+/**
* Override or insert variables into the html template.
*/
function garland_process_html(&$vars) {
diff --git a/themes/garland/theme-settings.php b/themes/garland/theme-settings.php
new file mode 100644
index 000000000..9f79b150e
--- /dev/null
+++ b/themes/garland/theme-settings.php
@@ -0,0 +1,25 @@
+<?php
+// $Id$
+
+/**
+ * Implement hook_form_system_theme_settings_alter().
+ *
+ * @param $form
+ * The form.
+ * @param $form_state
+ * The form state.
+ */
+function garland_form_system_theme_settings_alter(&$form, $form_state) {
+ $form['garland_width'] = array(
+ '#type' => 'radios',
+ '#title' => t('Content width'),
+ '#options' => array(
+ 'fluid' => t('Fluid width'),
+ 'fixed' => t('Fixed width'),
+ ),
+ '#default_value' => theme_get_setting('garland_width'),
+ '#description' => t('Specify whether the content will wrap to a fixed width or will fluidly expand to the width of the browser window.'),
+ // Place this above the color scheme options.
+ '#weight' => -2,
+ );
+}