You are here

function theme_asset_popup in Asset 6

Same name in this branch
  1. 6 asset_wizard.inc \theme_asset_popup()
  2. 6 inc/asset_wizard.themes.inc \theme_asset_popup()
Same name and namespace in other branches
  1. 5 asset_wizard.inc \theme_asset_popup()

Much trimmed down version of theme_page();

1 theme call to theme_asset_popup()
asset_wizard in ./asset.module
Menu callback to load the asset popup window.

File

inc/asset_wizard.themes.inc, line 5

Code

function theme_asset_popup($content) {
  $title = drupal_get_title();

  // build $styles to not include theme styles
  $styles = '';
  $css = drupal_add_css();
  foreach ($css as $media => $types) {
    foreach ($types as $type => $files) {
      if ($type != 'theme') {
        foreach ($types[$type] as $file => $preprocess) {
          $styles .= '<style type="text/css" media="' . $media . '">@import "' . base_path() . $file . '";</style>' . "\n";
        }
      }
    }
  }
  $scripts = drupal_get_js();
  $head = drupal_get_html_head();
  $messages = theme('status_messages');
  return <<<POPUP
\t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\t<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print {<span class="php-variable">$language</span>} ?>" xml:lang="<?php print {<span class="php-variable">$language</span>} ?>">
\t<head>
\t<title>{<span class="php-variable">$title</span>}</title>
\t{<span class="php-variable">$head</span>}
\t{<span class="php-variable">$styles</span>}
\t{<span class="php-variable">$scripts</span>}
\t</head>
\t<body id="asset-popup">
\t<h1>{<span class="php-variable">$title</span>}</h1>
\t{<span class="php-variable">$messages</span>}
\t<div class="content">{<span class="php-variable">$content</span>}</div>
</body>
</html>
POPUP;
}