Select Git revision
layout.phtml
layout.phtml 3.86 KiB
<?php
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
$staticBaseUrl = '';
if ($_SERVER['HTTPS']) {
$staticBaseUrl = 'https://';
} else {
$staticBaseUrl = 'http://';
}
$staticBaseUrl .= $_SERVER['HTTP_HOST']
. $baseUrl . '/';
$this->headLink()->appendStylesheet($this->baseUrl() . '/css/index.css', 'all');
$this->headLink()->appendStylesheet($this->baseUrl() . '/css/print.css', 'print');
$this->headLink()->appendStylesheet('https://jquery-ui.googlecode.com/svn/tags/1.7.2/themes/base/ui.all.css', 'all');
$this->headScript()->prependFile($this->baseUrl() . '/javascript/index.js');
$this->headScript()->prependFile('https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js');
$this->headScript()->prependFile('https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js');
$this->headLink(array('rel' => 'home',
'href' => $staticBaseUrl,
'title' => 'Course Approval'));
if (!$this->layout()->template) {
$this->layout()->template = 'Fixed';
}
$this->layout()->title = 'University Curriculum Approval';
if (!$this->layout()->tagline) {
$this->layout()->tagline = 'Course Approval';
}
require_once 'UNL/Templates.php';
Unl_Templates::$options['version'] = UNL_Templates::VERSION3;
$template = UNL_Templates::factory($this->layout()->template, array('sharedcodepath' => 'sharedcode'));
$template->titlegraphic = '<h1>' . $this->layout()->title . '</h1>';
$template->pagetitle = '<h2>' . $this->layout()->tagline . '</h2>';
$template->navlinks = $this->render('menu.phtml');
$template->maincontentarea = '<div id="creqMain">' . "\n"
. $this->layout()->content . "\n"
. '</div>' . "\n"
. '<div class="clear">' . "\n"
. '</div>' . "\n";
$template->doctitle = '<title>' . $this->layout()->title . ': ' . $this->layout()->tagline . '</title>';
$template->head .= "\n" . $this->headLink()->__toString()
. "\n" . $this->headMeta()->__toString()
. "\n" . $this->headScript()->__toString()
. "\n" . $this->headStyle()->__toString();
$template->loadSharedCodeFiles();
$defaultBreadcrumbs = array(
'<a href="http://www.unl.edu/">UNL</a>',
'<a href="' . $staticBaseUrl . '">University Curriculum Approval</a>'
);
$this->layout()->breadcrumbs = array_merge($defaultBreadcrumbs, (array) $this->layout()->breadcrumbs);
$breadcrumbCount = 0;
$template->breadcrumbs = '<ul>' . "\n";
foreach ($this->layout()->breadcrumbs as $breadcrumb) {
$breadcrumbCount++;
if ($breadcrumbCount == 1) {
$template->breadcrumbs .= '<li class="first">' . $breadcrumb . '</li>' . "\n";
} else {
$template->breadcrumbs .= '<li>' . $breadcrumb . '</li>' . "\n";
}
}
$template->breadcrumbs .= '</ul>' . "\n";
$template->leftcollinks = <<<EOF
<h3>Related Links</h3>
<ul>
<li><a href="http://www.unl.edu/svcaa/curriculum/" title="Undergraduate Curriculum Committee">Undergraduate Curriculum Committee</a></li>
<li><a href="http://ace.unl.edu/" title="Achievement-Centered Education">Achievement-Centered Education</a></li>
</ul>
EOF;
$template->contactinfo = <<<EOF
<h3>Contact Us</h3>
<p>
<strong>Undergraduate Education</strong><br />
223 Seaton Hall<br />
Lincoln NE 68588-0683<br />
(402) 472-6023<br />
Fax: (402) 472-1910
</p>
EOF;
$template->footercontent = <<<EOF
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7043567-1");
pageTracker._setDomainName(".unl.edu");
pageTracker._setAllowHash(false);
pageTracker._initData();
pageTracker._trackPageview();
} catch(err) {}
WDN.idm.setLogoutURL('$baseUrl/auth/index/logout');
WDN.idm.setLoginURL('$baseUrl/auth/index/login');
</script>
EOF;
echo "<?xml version='1.0' encoding='UTF-8'?>\n";
$html = $template->toHtml();
$html = strtr($html, array('<body' => '<body onload="handleOnLoad(\'' . $this->baseUrl() . '\');"'));
echo $html;