diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 47c99d9..8dc59e1 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -3107,6 +3107,125 @@ function template_process_maintenance_page(&$variables) { } /** + * Process variables for install-page.tpl.php. + * + * The variables array generated here is a mirror of + * template_preprocess_page(). This preprocessor will run its course when + * theme_maintenance_page() is invoked. An alternate template file of + * maintenance-page--offline.tpl.php can be used when the database is offline to + * hide errors and completely replace the content. + * + * The $variables array contains the following arguments: + * - $content + * + * @see install-page.tpl.php + */ +function template_preprocess_install_page(&$variables) { + global $theme; + $language_interface = language(LANGUAGE_TYPE_INTERFACE); + // Retrieve the theme data to list all available regions. + $theme_data = list_themes(); + $regions = $theme_data[$theme]->info['regions']; + + // Add favicon + if (theme_get_setting('toggle_favicon')) { + $favicon = theme_get_setting('favicon'); + $type = theme_get_setting('favicon_mimetype'); + drupal_add_html_head_link(array('rel' => 'shortcut icon', 'href' => drupal_strip_dangerous_protocols($favicon), 'type' => $type)); + } + + // Get all region content set with drupal_add_region_content(). + foreach (array_keys($regions) as $region) { + // Assign region to a region variable. + $region_content = drupal_get_region_content($region); + isset($variables[$region]) ? $variables[$region] .= $region_content : $variables[$region] = $region_content; + } + + // Setup layout variable. + $variables['layout'] = 'none'; + if (!empty($variables['sidebar_first'])) { + $variables['layout'] = 'first'; + } + if (!empty($variables['sidebar_second'])) { + $variables['layout'] = ($variables['layout'] == 'first') ? 'both' : 'second'; + } + + $site_config = config('system.site'); + $site_name = $site_config->get('name'); + $site_slogan = $site_config->get('slogan'); + + // Construct page title + if (drupal_get_title()) { + $head_title = array( + 'title' => strip_tags(drupal_get_title()), + 'name' => check_plain($site_name), + ); + } + else { + $head_title = array('name' => check_plain($site_name)); + if ($site_slogan) { + $head_title['slogan'] = strip_tags(filter_xss_admin($site_slogan)); + } + } + + $variables['head_title_array'] = $head_title; + $variables['head_title'] = implode(' | ', $head_title); + $variables['base_path'] = base_path(); + $variables['front_page'] = url(); + $variables['breadcrumb'] = ''; + $variables['feed_icons'] = ''; + $variables['help'] = ''; + $variables['language'] = $language_interface; + $variables['language']->dir = $language_interface->direction ? 'rtl' : 'ltr'; + $variables['logo'] = theme_get_setting('logo'); + $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : ''; + $variables['main_menu'] = array(); + $variables['secondary_menu'] = array(); + $variables['site_name'] = 'Installing Drupal 8'; + $variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? filter_xss_admin($site_slogan) : ''); + $variables['tabs'] = ''; + $variables['title'] = drupal_get_title(); + + // Compile a list of classes that are going to be applied to the body element. + $variables['attributes']['class'][] = 'in-maintenance'; + if (isset($variables['db_is_active']) && !$variables['db_is_active']) { + $variables['attributes']['class'][] = 'db-offline'; + } + if ($variables['layout'] == 'both') { + $variables['attributes']['class'][] = 'two-sidebars'; + } + elseif ($variables['layout'] == 'none') { + $variables['attributes']['class'][] = 'no-sidebars'; + } + else { + $variables['attributes']['class'][] = 'one-sidebar'; + $variables['attributes']['class'][] = 'sidebar-' . $variables['layout']; + } + + // Dead databases will show error messages so supplying this template will + // allow themers to override the page and the content completely. + if (isset($variables['db_is_active']) && !$variables['db_is_active']) { + $variables['theme_hook_suggestion'] = 'maintenance_page__offline'; + } +} + +/** + * Theme process function for theme_maintenance_field(). + * + * The variables array generated here is a mirror of template_process_html(). + * This processor will run its course when theme_maintenance_page() is invoked. + * + * @see maintenance-page.tpl.php + * @see template_process_html() + */ +function template_process_install_page(&$variables) { + $variables['head'] = drupal_get_html_head(); + $variables['css'] = drupal_add_css(); + $variables['styles'] = drupal_get_css(); + $variables['scripts'] = drupal_get_js(); +} + +/** * Preprocess variables for region.tpl.php * * Prepares the values passed to the theme_region function to be passed into a @@ -3216,7 +3335,8 @@ function drupal_common_theme() { 'template' => 'maintenance-page', ), 'install_page' => array( - 'variables' => array('content' => NULL), + 'variables' => array('content' => NULL, 'show_messages' => TRUE), + 'template' => 'install-page', ), 'task_list' => array( 'variables' => array('items' => NULL, 'active' => NULL), diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index 578d354..3fe48f3 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -148,7 +148,6 @@ function theme_task_list($variables) { /** * Returns HTML for the installation page. * - * Note: this function is not themeable. * * @param $variables * An associative array containing: @@ -156,7 +155,6 @@ function theme_task_list($variables) { */ function theme_install_page($variables) { drupal_add_http_header('Content-Type', 'text/html; charset=utf-8'); - return theme('maintenance_page', $variables); } /** diff --git a/core/modules/system/templates/install-page.tpl.php b/core/modules/system/templates/install-page.tpl.php new file mode 100644 index 0000000..5fad85d --- /dev/null +++ b/core/modules/system/templates/install-page.tpl.php @@ -0,0 +1,88 @@ + + + + + + <?php print $head_title; ?> + + + + + +
+ + +
+ + + + + +
+ +
+

+ +
+ +
+
+ +
+ + + + + +
+ + + +
+ + + diff --git a/core/themes/seven/images/install-logo.png b/core/themes/seven/images/install-logo.png new file mode 100644 index 0000000..4e11615 --- /dev/null +++ b/core/themes/seven/images/install-logo.png @@ -0,0 +1,47 @@ +PNG + + IHDRPj+ pHYs  )iTXtXML:com.adobe.xmp + + + 2013-04-23T18:04:41 + Pixelmator 2.1.4 + + + 1 + 72 + 5 + 1 + 72 + + + 152 + 65535 + 80 + + + +EGv[IDATx Ewvw1,B(B2E(@JQQ ,- +QP$HIĜ`!}}ݙ0L}SSS4-0>} ~`@ddH OaXdH OaXdH OaXdH OaXdH OaXdH OaXdH OaXdH OaXdH OaXdH OaXdi FM@8R`ҟTj-,/2 ++lRJ+;:|iHh2RJtiQKaA(RPl15X? 4Xh +FVMݾZOzC!ZqhʶWK-b6$R_2@Փ=HmyAT~1_YP h Ž'.`Q%/LrJ] +^>YmWxIųʭ7+[aRbt:@VX_l]n=~_}`l}U)GOtbd30L=ڡmP Zg,)ZRSAO(z/ϩ:>zK-Eq#]Qjhv yUf-$_TUˈO\,40Pl.D+l+mFAYjUv8RydU  M* ^Z;G%:}f^ٜy/Q@$x:uTwz#'0c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