From ea5fc2d5febbcd89425b67b682719d8890991c84 Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Mon, 30 Mar 2009 17:14:56 +0000
Subject: [PATCH] Make title and tagline static and move previously tagline
 text to breadcrumbs.

---
 .../courses/views/scripts/edit/index.phtml    |  2 +-
 .../views/scripts/public-view/results.phtml   |  2 +-
 .../views/scripts/public-view/search.phtml    |  2 +-
 .../courses/views/scripts/view/index.phtml    |  6 +++---
 .../default/views/scripts/index/index.phtml   |  2 +-
 .../default/views/scripts/layout.phtml        | 20 +++++--------------
 .../views/scripts/reports/through-date.phtml  |  1 -
 .../iace/views/scripts/reports/weekly.phtml   |  1 -
 .../approval-body-admin/edit-body.phtml       |  2 +-
 .../approval-body-admin/edit-role.phtml       |  2 +-
 .../scripts/approval-body-admin/index.phtml   |  2 +-
 .../approval-chain-manager/index.phtml        |  2 +-
 .../requests/views/scripts/index/index.phtml  |  2 +-
 13 files changed, 17 insertions(+), 29 deletions(-)

diff --git a/application/modules/courses/views/scripts/edit/index.phtml b/application/modules/courses/views/scripts/edit/index.phtml
index 366609a3..c4b37f2a 100644
--- a/application/modules/courses/views/scripts/edit/index.phtml
+++ b/application/modules/courses/views/scripts/edit/index.phtml
@@ -2,7 +2,7 @@
 <?php $this->headScript()->appendFile($this->baseUrl() . '/tinymce/jscripts/tiny_mce/tiny_mce.js'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/tinymce.js'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/courses/edit.js'); ?>
-<?php $this->layout()->tagline = 'Editing: ' . $this->course->getCourseCode() . ' (' . $this->request->getTypeDescription() . ')'; ?>
+<?php $this->layout()->breadcrumbs = array('Editing: ' . $this->course->getCourseCode() . ' (' . $this->request->getTypeDescription() . ')'); ?>
 
 <form action="<?php echo $this->url(array('action' => 'edit.post')); ?>" enctype="multipart/form-data" method="post">
 
diff --git a/application/modules/courses/views/scripts/public-view/results.phtml b/application/modules/courses/views/scripts/public-view/results.phtml
index eb3b33a4..27d0bee6 100644
--- a/application/modules/courses/views/scripts/public-view/results.phtml
+++ b/application/modules/courses/views/scripts/public-view/results.phtml
@@ -1,5 +1,5 @@
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/iace/reports/weekly.css', 'all'); ?>
-<?php $this->layout()->tagline = 'Curriculum Search'; ?>
+<?php $this->layout()->breadcrumbs = array('Curriculum Search'); ?>
 <?php $this->layout()->hideMenu = true; ?>
 
 <h2>Results for:</h2>
diff --git a/application/modules/courses/views/scripts/public-view/search.phtml b/application/modules/courses/views/scripts/public-view/search.phtml
index b82eef14..4d1c95c3 100644
--- a/application/modules/courses/views/scripts/public-view/search.phtml
+++ b/application/modules/courses/views/scripts/public-view/search.phtml
@@ -1,7 +1,7 @@
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/courses/public-view/search.css', 'all'); ?>
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/iace/reports/weekly.css', 'all'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/courses/public-view/search.js'); ?>
-<?php $this->layout()->tagline = 'Curriculum Search'; ?>
+<?php $this->layout()->breadcrumbs = array('Curriculum Search'); ?>
 <?php $this->layout()->hideMenu = true; ?>
 
 <?php if ($this->hasSearched) { ?>
diff --git a/application/modules/courses/views/scripts/view/index.phtml b/application/modules/courses/views/scripts/view/index.phtml
index 819af851..e6a66277 100644
--- a/application/modules/courses/views/scripts/view/index.phtml
+++ b/application/modules/courses/views/scripts/view/index.phtml
@@ -2,11 +2,11 @@
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/courses/view.js'); ?>
 <?php
 if ($this->preview) {
-    $tagline = 'Previewing';
+    $breadcrumb = 'Previewing';
 } else {
-	$tagline = 'Viewing';
+	$breadcrumb = 'Viewing';
 }
-$this->layout()->tagline = $tagline . ': ' . $this->course->getCourseCode() . ' (' . $this->request->getTypeDescription() . ')';
+$this->layout()->breadcrumbs = array($breadcrumb . ': ' . $this->course->getCourseCode() . ' (' . $this->request->getTypeDescription() . ')');
 ?>
 <div id="viewRequest">
     <?php echo $this->partial('view/course-info.phtml', $this); ?>
diff --git a/application/modules/default/views/scripts/index/index.phtml b/application/modules/default/views/scripts/index/index.phtml
index 56f2ba4b..88722a51 100644
--- a/application/modules/default/views/scripts/index/index.phtml
+++ b/application/modules/default/views/scripts/index/index.phtml
@@ -1,4 +1,4 @@
-<?php $this->layout()->tagline = 'Welcome'; ?>
+<?php $this->layout()->breadcrumbs = array('Welcome'); ?>
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/index/index.css', 'all'); ?>
 
 <div id="announcements" class="titled_box">
diff --git a/application/modules/default/views/scripts/layout.phtml b/application/modules/default/views/scripts/layout.phtml
index 3f8cb845..e6a42a80 100644
--- a/application/modules/default/views/scripts/layout.phtml
+++ b/application/modules/default/views/scripts/layout.phtml
@@ -7,12 +7,9 @@ $this->headScript()->prependFile($this->baseUrl() . '/javascript/index.js');
 if (!$this->layout()->template) {
 	$this->layout()->template = 'Fixed';
 }
-if (!$this->layout()->title) {
-	$this->layout()->title = 'Course Approval';
-}
-if (!$this->layout()->tagline) {
-	$this->layout()->tagline = '';
-}
+
+$this->layout()->title = 'Office of Undergraduate Studies';
+$this->layout()->tagline = 'Course Approval';
 
 $template = UNL_Templates::factory($this->layout()->template, array('sharedcodepath' => 'sharedcode'));
 $template->titlegraphic = '<h1>' . $this->layout()->title . '</h1>'
@@ -41,17 +38,10 @@ $template->loadSharedCodeFiles();
 
 $defaultBreadcrumbs = array(
     '<a href="http://www.unl.edu/">UNL</a>',
-    '<a href="http://www.unl.edu/ous">Undergraduate Studies</a>'
+    '<a href="http://www.unl.edu/ous">Undergraduate Studies</a>',
+    '<a href="' . Zend_Controller_Front::getInstance()->getBaseUrl() . '">Course Approval</a>'
 );
 
-if (!$this->layout()->breadcrumbs && $this->layout()->title) {
-    $defaultBreadcrumbs[] = '<a href="' . Zend_Controller_Front::getInstance()->getBaseUrl() . '">' . $this->layout()->title . '</a>';
-}
-
-if (!$this->layout()->breadcrumbs && $this->layout()->tagline) {
-    $defaultBreadcrumbs[] = $this->layout()->tagline;
-}
-
 $this->layout()->breadcrumbs = array_merge($defaultBreadcrumbs, (array) $this->layout()->breadcrumbs);
 
 $breadcrumbCount = 0;
diff --git a/application/modules/iace/views/scripts/reports/through-date.phtml b/application/modules/iace/views/scripts/reports/through-date.phtml
index 4903aaf3..dfa980f7 100644
--- a/application/modules/iace/views/scripts/reports/through-date.phtml
+++ b/application/modules/iace/views/scripts/reports/through-date.phtml
@@ -1,5 +1,4 @@
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/iace/reports/weekly.css', 'all'); ?>
-<?php $this->layout()->tagline = ''; ?>
 <?php $this->layout()->hideMenu = true; ?>
 
 <h2>
diff --git a/application/modules/iace/views/scripts/reports/weekly.phtml b/application/modules/iace/views/scripts/reports/weekly.phtml
index 33c68ee0..d8e41030 100644
--- a/application/modules/iace/views/scripts/reports/weekly.phtml
+++ b/application/modules/iace/views/scripts/reports/weekly.phtml
@@ -1,5 +1,4 @@
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/iace/reports/weekly.css', 'all'); ?>
-<?php $this->layout()->tagline = ''; ?>
 <?php $this->layout()->hideMenu = true; ?>
 
 <h2>
diff --git a/application/modules/requests/views/scripts/approval-body-admin/edit-body.phtml b/application/modules/requests/views/scripts/approval-body-admin/edit-body.phtml
index 6229b9d7..0559f525 100644
--- a/application/modules/requests/views/scripts/approval-body-admin/edit-body.phtml
+++ b/application/modules/requests/views/scripts/approval-body-admin/edit-body.phtml
@@ -1,6 +1,6 @@
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/requests/approval-body-admin.css', 'all'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/requests/approval-body-admin.js'); ?>
-<?php $this->layout()->tagline = 'Approval Body Admin'; ?>
+<?php $this->layout()->breadcrumbs = array('Approval Body Admin'); ?>
 <?php $this->layout()->hideMenu = true; ?>
 
 <?php if ($this->approvalBody->getId()) { ?>
diff --git a/application/modules/requests/views/scripts/approval-body-admin/edit-role.phtml b/application/modules/requests/views/scripts/approval-body-admin/edit-role.phtml
index 7394c25c..723f7216 100644
--- a/application/modules/requests/views/scripts/approval-body-admin/edit-role.phtml
+++ b/application/modules/requests/views/scripts/approval-body-admin/edit-role.phtml
@@ -2,7 +2,7 @@
 <?php $this->headScript()->appendFile($this->baseUrl() . '/tinymce/jscripts/tiny_mce/tiny_mce.js'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/tinymce.js'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/requests/approval-body-admin.js'); ?>
-<?php $this->layout()->tagline = 'Approval Body Admin'; ?>
+<?php $this->layout()->breadcrumbs = array('Approval Body Admin'); ?>
 <?php $this->layout()->hideMenu = true; ?>
 
 
diff --git a/application/modules/requests/views/scripts/approval-body-admin/index.phtml b/application/modules/requests/views/scripts/approval-body-admin/index.phtml
index 35690665..0e191c60 100644
--- a/application/modules/requests/views/scripts/approval-body-admin/index.phtml
+++ b/application/modules/requests/views/scripts/approval-body-admin/index.phtml
@@ -1,6 +1,6 @@
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/requests/approval-body-admin.css', 'all'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/requests/approval-body-admin.js'); ?>
-<?php $this->layout()->tagline = 'Approval Body Admin'; ?>
+<?php $this->layout()->breadcrumbs = array('Approval Body Admin'); ?>
 <?php $this->layout()->hideMenu = true; ?>
 
 <ul class="editMenu">
diff --git a/application/modules/requests/views/scripts/approval-chain-manager/index.phtml b/application/modules/requests/views/scripts/approval-chain-manager/index.phtml
index 5edcbd46..162ff2ed 100644
--- a/application/modules/requests/views/scripts/approval-chain-manager/index.phtml
+++ b/application/modules/requests/views/scripts/approval-chain-manager/index.phtml
@@ -1,7 +1,7 @@
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/requests/approval-chain-manager.css', 'all'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/requests/approval-chain-manager.js'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/courses/edit.js'); ?>
-<?php $this->layout()->tagline = 'Approval Chain Manager'; ?>
+<?php $this->layout()->breadcrumbs = array('Approval Chain Manager'); ?>
 <?php $this->layout()->hideMenu = true; ?>
 
 <ul class="editMenu">
diff --git a/application/modules/requests/views/scripts/index/index.phtml b/application/modules/requests/views/scripts/index/index.phtml
index 5e064208..41b605b4 100644
--- a/application/modules/requests/views/scripts/index/index.phtml
+++ b/application/modules/requests/views/scripts/index/index.phtml
@@ -1,4 +1,4 @@
-<?php $this->layout()->tagline = 'My Requests'; ?>
+<?php $this->layout()->breadcrumbs = array('My Requests'); ?>
 <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/requests/index.css', 'all'); ?>
 <?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/requests/index.js'); ?>
 
-- 
GitLab