Skip to content
Snippets Groups Projects
Commit 4289ed20 authored by Tim Steiner's avatar Tim Steiner
Browse files

Updates to the look and feel of the public-view.

parent 9b22e61a
No related branches found
No related tags found
No related merge requests found
Showing
with 460 additions and 324 deletions
......@@ -268,21 +268,12 @@ class Courses_PublicViewController extends App_Controller_Action {
public function searchAction()
{
$this->view->activityTypes = array(
1 => 'Lec - Lecture',
2 => 'Lab - Lab',
3 => 'Quz - Quiz',
4 => 'Rct - Recitation',
5 => 'Stu - Studio',
6 => 'Fld - Field',
7 => 'Ind - Independent Study',
8 => 'Psi - Personalized System of Instruction'
);
$this->_loadSearchBoxViewData();
$in = $this->_getAllParams();
$criteria = $in;
$criteria['title'] = $criteria['courseTitle'];
$courses = Courses_CourseModel::findWithCriteria($criteria);
$courses = Courses_CourseModel::findWithCriteria($criteria, true);
$data = new Unl_Model_Collection('Unl_Model_Array');
foreach ($courses as $requestId => $course) {
......@@ -318,6 +309,7 @@ class Courses_PublicViewController extends App_Controller_Action {
'department' => $course->getDepartment(),
'title' => $title,
'courseId' => $course->getCourseId(),
'className' => ($course->getRemoved() ? 'removed': '')
));
}
......@@ -343,35 +335,11 @@ class Courses_PublicViewController extends App_Controller_Action {
$this->view->data = $data;
$this->view->criteria = $criteria;
$this->view->hasSearched = isset($criteria['college']);
$hierarchy = Courses_CourseModel::getSubjectDepartmentCollegeHierarchy();
$colleges = array();
$departments = array();
$departmentsSerial = array();
$subjects = array();
$subjectsSerial = array();
foreach ($hierarchy as $collegeId => $college) {
$colleges[$collegeId] = $college['name'];
foreach ($college['departments'] as $departmentId => $department) {
$departments[$department['name']] = array('collegeId' => $collegeId, 'departmentId' => $departmentId);
$departmentsSerial[$departmentId] = $department['name'];
foreach ($department['subjects'] as $subjectCode => $subjectName) {
$subjects[$subjectCode . ' - ' . $subjectName] = array('departmentId' => $departmentId, 'subjectCode' => $subjectCode);
$subjectsSerial[$subjectCode] = $subjectCode . ' - ' . $subjectName;
}
}
}
ksort($departments);
ksort($subjects);
$this->view->colleges = $colleges;
$this->view->departments = $departments;
$this->view->departmentsSerial = $departmentsSerial;
$this->view->subjects = $subjects;
$this->view->subjectsSerial = $subjectsSerial;
$this->view->revise = $in['revise'];
if (isset($criteria['college'])) {
$this->render('results');
}
}
......@@ -403,17 +371,21 @@ class Courses_PublicViewController extends App_Controller_Action {
}
}
$this->view->colleges = $colleges;
$this->view->departments = $departments;
$this->view->departmentsSerial = $departmentsSerial;
$this->view->subjects = $subjects;
$this->view->subjectsSerial = $subjectsSerial;
$this->view->criteria = $session->recentSearchCriteria;
$this->view->course = $course;
$this->_loadSearchBoxViewData();
$previousRequests = Courses_CourseModel::findAllRequestsForCourse($course);
$previousRequests->orderBy('getLastApprovalTimestamp', SORT_DESC);
$this->view->effectiveDate = new Zend_Date(0);
foreach ($previousRequests as $previousRequest) {
$this->view->effectiveDate = $previousRequest->getLastApprovalTime();
break;
}
$requestParentCourses = Courses_CourseModel::findParentOfRequest($previousRequests);
$requestFinalCourses = Courses_CourseModel::findLatestOfRequest($previousRequests);
......@@ -425,7 +397,89 @@ class Courses_PublicViewController extends App_Controller_Action {
$this->view->requestComments = $requestComments;
$offerings = Courses_ScheduleModel::fetchForCourses($course);
$offerings->orderBy('getSemesterCode', SORT_DESC);
$session = new Zend_Session_Namespace(__CLASS__ . __METHOD__);
// sort offerings
$sortBy = $session->sortBy;
if (!Unl_Util::isArray($sortBy)) {
$sortBy = array('semesterCode');
}
if ($in['sort']) {
if (($key = array_search($in['sort'], $sortBy)) !== FALSE) {
unset($sortBy[$key]);
}
$sortBy[] = $in['sort'];
}
$session->sortBy = $sortBy;
// sort request history
$sortBy = $session->sortHistoryBy;
if (!Unl_Util::isArray($sortBy)) {
$sortBy = array();
}
if ($in['sort-history']) {
if (($key = array_search($in['sort-history'], $sortBy)) !== FALSE) {
unset($sortBy[$key]);
}
$sortBy[] = $in['sort-history'];
}
$session->sortHistoryBy = $sortBy;
foreach ($sortBy as $sortKey) {
if ($sortKey == 'lastApprovalTimestamp') {
$previousRequests->orderBy('get' . $sortKey, SORT_DESC);
} else {
$previousRequests->orderBy('get' . $sortKey);
}
}
$this->view->offerings = $offerings;
}
protected function _loadSearchBoxViewData()
{
$hierarchy = Courses_CourseModel::getSubjectDepartmentCollegeHierarchy();
$colleges = array();
$departments = array();
$departmentsSerial = array();
$subjects = array();
$subjectsSerial = array();
foreach ($hierarchy as $collegeId => $college) {
$colleges[$collegeId] = $college['name'];
foreach ($college['departments'] as $departmentId => $department) {
$departments[$department['name']] = array('collegeId' => $collegeId, 'departmentId' => $departmentId);
$departmentsSerial[$departmentId] = $department['name'];
foreach ($department['subjects'] as $subjectCode => $subjectName) {
$subjects[$subjectCode . ' - ' . $subjectName] = array('departmentId' => $departmentId, 'subjectCode' => $subjectCode);
$subjectsSerial[$subjectCode] = $subjectCode . ' - ' . $subjectName;
}
}
}
ksort($departments);
ksort($subjects);
$this->view->colleges = $colleges;
$this->view->departments = $departments;
$this->view->departmentsSerial = $departmentsSerial;
$this->view->subjects = $subjects;
$this->view->subjectsSerial = $subjectsSerial;
$this->view->activityTypes = array(
1 => 'Lec - Lecture',
2 => 'Lab - Lab',
3 => 'Quz - Quiz',
4 => 'Rct - Recitation',
5 => 'Stu - Studio',
6 => 'Fld - Field',
7 => 'Ind - Independent Study',
8 => 'Psi - Personalized System of Instruction'
);
}
}
......@@ -479,9 +479,9 @@ class Courses_CourseModel extends Unl_Model
return self::find($generationIds);
}
static public function findWithCriteria(&$criteria = array())
static public function findWithCriteria(&$criteria = array(), $includeRemoved = false)
{
$validKeys = array('college', 'department', 'subject', 'courseNumber', 'courseLetter', 'title', 'campus', 'ace', 'aceOutcomes', 'essentialStudies', 'integratedStudies');
$validKeys = array('college', 'department', 'subject', 'courseNumber', 'courseLetter', 'title', 'campus', 'ace', 'aceOutcomes', 'essentialStudies', 'integratedStudies', 'activity');
$criteria = array_intersect_key($criteria, array_flip($validKeys));
$emptySearch = true;
foreach ($criteria as $value) {
......@@ -504,7 +504,9 @@ class Courses_CourseModel extends Unl_Model
$select->join(array('g' => 'creqCourseGenerations'), 'x.generation = g.courseGenerationId', array('courseGenerationId'));
$select->join(array('p' => 'creqCourses'), 'g.courseGenerationId = p.currentGeneration', array());
$select->join(array('e' => 'creqCourseDetails'), 'g.courseGenerationId = e.generation', array());
if (!$includeRemoved) {
$select->where('g.removed = "no"');
}
$select->where('g.type = "official"');
if ($criteria['college']) {
$select->where('l.collegeId = ?', $criteria['college']);
......
<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/iace/reports/weekly.css', 'all'); ?>
<?php $this->layout()->breadcrumbs = array('Curriculum Search'); ?>
<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/courses/public-view/results.css', 'all'); ?>
<?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/courses/public-view/results.js'); ?>
<?php $this->layout()->hideMenu = true; ?>
<h2>Results for:</h2>
<div>
<?php
foreach ($this->criteria as $key => $value) {
if ($value && $value != -1) {
?>
<?php echo $key; ?> <?php echo $value; ?>
<?php } } ?>
<?php echo $this->partial('public-view/search-box-sidebar.phtml', $this); ?>
<div id="instructions">
<button id="printButton">Print</button>
You can sort the list below by clicking on any column heading. Click on a specific course to see more details.
</div>
<?php if ($this->data && count($this->data) > 0) { ?>
<div id="results">
<?php
echo $this->collectionTable(
$this->data,
array('slo' => 'SLO', 'college' => 'College', 'courseCode' => 'Course', 'title' => 'Title'),
array('courseCode' => 'Course', 'title' => 'Title', 'college' => 'College', 'department' => 'Department', 'slo' => 'ACE/CEP Status'),
$this->criteria,
array('courseCode' => array('type' => 'link',
'urlSpec' => array($this->baseUrl() . '/courses/public-view/view/id/%s', 'courseId')))
'urlSpec' => array($this->baseUrl() . '/courses/public-view/view/id/%s', 'courseId'))),
'className'
);
?>
</div>
<?php } else { ?>
<div class="warning">
Unfortunately, no courses were found.
</div>
<?php }
<form method="get"
action="<?php echo $this->baseUrl(); ?>/courses/public-view/search"
id="searchForm"
>
<?php
$this->searchBoxFull = true;
echo $this->partial('public-view/search-box.phtml', $this);
?>
</form>
<div id="searchFormSidebar">
<form method="get" action="<?php echo $this->baseUrl(); ?>/courses/public-view/search" id="searchFormSmall">
<?php echo $this->partial('public-view/search-box.phtml', $this); ?>
</form>
<button id="restartSearchButton" onclick="location.href = '<?php echo $this->baseUrl(); ?>/courses/public-view/search';">Restart Search</button>
<button id="logInButton" onclick="location.href = '<?php echo $this->baseUrl(); ?>/auth/index/login';">Log In</button>
</div>
\ No newline at end of file
<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/courses/public-view/search-box.css', 'all'); ?>
<?php $this->headScript()->appendFile($this->baseUrl() . '/javascript/courses/public-view/search-box.js'); ?>
<div class="helpText">
Begin your search by entering or selecting information in at least<br /> on of the following fields:
</div>
<?php if (!$this->searchBoxFull) { ?>
<h3>Results for</h3>
<?php } ?>
<div>
<label class="aligned" for="college">College</label>
<?php echo $this->formSelect('college', $this->criteria['college'], null, array(0 => '') + $this->colleges); ?>
</div>
<div>
<label class="aligned" for="department">Department</label>
<select id="department" name="department">
<option value="0"></option>
<?php foreach ($this->departments as $departmentName => $departmentInfo) { ?>
<option rel="<?php echo $departmentInfo['collegeId']; ?>"
value="<?php echo $departmentInfo['departmentId']; ?>"
<?php if ($this->criteria['department'] == $departmentInfo['departmentId']) { ?>selected="selected"<?php } ?>
>
<?php echo $departmentName; ?>
</option>
<?php } ?>
</select>
</div>
<div>
<label class="aligned" for="subject">Subject</label>
<select id="subject" name="subject">
<option value="0"></option>
<?php foreach ($this->subjects as $subjectName => $subjectInfo) { ?>
<option rel="<?php echo $subjectInfo['departmentId']; ?>"
value="<?php echo $subjectInfo['subjectCode']; ?>"
<?php if ($this->criteria['subject'] == $subjectInfo['subjectCode']) { ?>selected="selected"<?php } ?>
>
<?php echo $subjectName; ?>
</option>
<?php }?>
</select>
</div>
<div>
<label class="aligned" for="courseNumber"><span class="verbose">Course </span>Number</label>
<?php echo $this->formText('courseNumber', $this->criteria['courseNumber']); ?>
<a class="hoverHelp" target="_new" href="#">
<span class="hoverHelpText">Specifc number (i.e. 101) or Partial number (i.e. 1 for 100 level courses)</span>
?
</a>
<label for="courseLetter"><span class="verbose">Course </span>Letter</label>
<?php echo $this->formText('courseLetter', $this->criteria['courseLetter']); ?>
<a class="hoverHelp" target="_new" href="#">
<span class="hoverHelpText">One letter (i.e. H for Honors courses, or A, G, etc.)</span>
?
</a>
</div>
<div>
<label class="aligned" for="courseTitle">Title Keyword(s)</label>
<?php echo $this->formText('courseTitle', $this->criteria['courseTitle']); ?>
</div>
<div class="helpText">
You can narrow your results further by selecting one or more of the following
</div>
<div>
<label class="aligned" for="activity">Activity Type</label>
<?php echo $this->formSelect('activity', $this->criteria['activity'], null, array(-1 => '') + $this->activityTypes); ?>
<label for="campus">Campus</label>
<?php echo $this->formSelect('campus', $this->criteria['campus'], null, array('' => '', 'UNL' => 'UNL', 'UNO' => 'UNO', 'UNK' => 'UNK')); ?>
<?php echo $this->formCheckbox('specialFee', null, array('disabled' => 'disabled')); ?>
<label for="specialFee">Special Fees</label>
</div>
<div>
General Education Designation:
<?php echo $this->formCheckbox('ace', $this->criteria['ace'], null, array('1', '0')); ?>
<label for="ace">ACE</label>
<?php
$aceOutcomesOptions = array('multiple' => 'multiple');
if (!$this->criteria['ace']) {
$aceOutcomesOptions['disabled'] = 'disabled';
}
echo $this->formSelect('aceOutcomes',
$this->criteria['aceOutcomes'],
$aceOutcomesOptions,
array(1 => 'ACE 1','ACE 2','ACE 3','ACE 4','ACE 5','ACE 6','ACE 7','ACE 8','ACE 9','ACE 10')); ?>
<label for="essentialStudies">ES</label>
<?php echo $this->formCheckbox('essentialStudies', $this->criteria['essentialStudies'], null, array('1', '0')); ?>
<label for="integratedStudies">IS</label>
<?php echo $this->formCheckbox('integratedStudies', $this->criteria['integratedStudies'], null, array('1', '0')); ?>
</div>
<div class="helpText">
You can narow your search to one or more ACE Outcomes by selecting from the list.
To select multiple outcomes hold down the Ctrl key (Windows) or Command Key (Mac).
</div>
<?php echo $this->formSubmit('submit', 'Search'); ?>
<?php echo $this->formReset('reset', 'Clear Form')?>
\ No newline at end of file
<?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()->breadcrumbs = array('Curriculum Search'); ?>
<?php $this->layout()->tagline = 'Curriculum Search'; ?>
<?php $this->layout()->hideMenu = true; ?>
<?php if ($this->hasSearched && !$this->revise) { ?>
<?php echo $this->partial('public-view/search-summary.phtml', $this); ?>
<div id="instructions">
<button id="printButton">Print</button>
You can sort the list below by clicking on any column heading. Click on a specific course to see more details.
</div>
<?php } ?>
<form method="get"
action="<?php echo $this->baseUrl(); ?>/courses/public-view/search"
id="searchForm"
<?php if ($this->hasSearched && !$this->revise) { ?> style="display:none;"<?php }?>
>
<div class="helpText">
Begin your search by entering or selecting information in at least<br /> on of the following fields:
</div>
<div>
<label class="aligned" for="college">College</label>
<?php echo $this->formSelect('college', $this->criteria['college'], null, array(0 => '') + $this->colleges); ?>
</div>
<div>
<label class="aligned" for="department">Department</label>
<select id="department" name="department">
<option value="0"></option>
<?php foreach ($this->departments as $departmentName => $departmentInfo) { ?>
<option rel="<?php echo $departmentInfo['collegeId']; ?>"
value="<?php echo $departmentInfo['departmentId']; ?>"
<?php if ($this->criteria['department'] == $departmentInfo['departmentId']) { ?>selected="selected"<?php } ?>
>
<?php echo $departmentName; ?>
</option>
<?php } ?>
</select>
</div>
<div>
<label class="aligned" for="subject">Subject</label>
<select id="subject" name="subject">
<option value="0"></option>
<?php foreach ($this->subjects as $subjectName => $subjectInfo) { ?>
<option rel="<?php echo $subjectInfo['departmentId']; ?>"
value="<?php echo $subjectInfo['subjectCode']; ?>"
<?php if ($this->criteria['subject'] == $subjectInfo['subjectCode']) { ?>selected="selected"<?php } ?>
>
<?php echo $subjectName; ?>
</option>
<?php }?>
</select>
</div>
<div>
<label class="aligned" for="courseNumber">Course Number</label>
<?php echo $this->formText('courseNumber', $this->criteria['courseNumber']); ?>
<a class="hoverHelp" target="_new" href="#">
<span class="hoverHelpText">Specifc number (i.e. 101) or Partial number (i.e. 1 for 100 level courses)</span>
?
</a>
<label for="courseLetter">Course Letter</label>
<?php echo $this->formText('courseLetter', $this->criteria['courseLetter']); ?>
<a class="hoverHelp" target="_new" href="#">
<span class="hoverHelpText">One letter (i.e. H for Honors courses, or A, G, etc.)</span>
?
</a>
</div>
<div>
<label class="aligned" for="courseTitle">Title Keyword(s)</label>
<?php echo $this->formText('courseTitle', $this->criteria['courseTitle']); ?>
</div>
<div class="helpText">
You can narrow your results further by selecting one or more of the following
</div>
<div>
<label class="aligned" for="activity">Activity Type</label>
<?php echo $this->formSelect('activity', $this->criteria['activity'], null, array(-1 => '') + $this->activityTypes); ?>
<label for="campus">Campus</label>
<?php echo $this->formSelect('campus', $this->criteria['campus'], null, array('' => '', 'UNL' => 'UNL', 'UNO' => 'UNO', 'UNK' => 'UNK')); ?>
<?php echo $this->formCheckbox('specialFee', null, array('disabled' => 'disabled')); ?>
<label for="specialFee">Special Fees</label>
</div>
<div>
General Education Designation:
<?php echo $this->formCheckbox('ace', $this->criteria['ace'], null, array('1', '0')); ?>
<label for="ace">ACE</label>
<?php
$aceOutcomesOptions = array('multiple' => 'multiple');
if (!$this->criteria['ace']) {
$aceOutcomesOptions['disabled'] = 'disabled';
}
echo $this->formSelect('aceOutcomes',
$this->criteria['aceOutcomes'],
$aceOutcomesOptions,
array(1 => 'ACE 1','ACE 2','ACE 3','ACE 4','ACE 5','ACE 6','ACE 7','ACE 8','ACE 9','ACE 10')); ?>
<label for="essentialStudies">ES</label>
<?php echo $this->formCheckbox('essentialStudies', $this->criteria['essentialStudies'], null, array('1', '0')); ?>
<label for="integratedStudies">IS</label>
<?php echo $this->formCheckbox('integratedStudies', $this->criteria['integratedStudies'], null, array('1', '0')); ?>
</div>
<div class="helpText">
You can narow your search to one or more ACE Outcomes by selecting from the list.
To select multiple outcomes hold down the Ctrl key (Windows) or Command Key (Mac).
</div>
<?php echo $this->formSubmit('submit', 'Search'); ?>
<?php echo $this->formReset('reset', 'Clear Form')?>
</form>
<?php if ($this->hasSearched && $this->data && count($this->data) > 0) { ?>
<div id="results">
<?php
echo $this->collectionTable(
$this->data,
array('courseCode' => 'Course', 'title' => 'Title', 'college' => 'College', 'department' => 'Department', 'slo' => 'ACE/CEP Status'),
$this->criteria,
array('courseCode' => array('type' => 'link',
'urlSpec' => array($this->baseUrl() . '/courses/public-view/view/id/%s', 'courseId')))
);
?>
</div>
<?php } else if ($this->hasSearched) { ?>
<div class="warning">
Unfortunately, no courses were found.
</div>
<?php }
<?php echo $this->partial('public-view/search-box-full.phtml', $this);
......@@ -2,7 +2,15 @@
<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/courses/public-view/view.css', 'all'); ?>
<?php $this->layout()->hideMenu = true; ?>
<?php echo $this->partial('public-view/search-summary.phtml', $this); ?>
<?php echo $this->partial('public-view/search-box-sidebar.phtml', $this); ?>
<div id="viewMain">
<div id="printAndBackButtons">
<button id="printButton">Print</button><br />
<button id="backToResultsButton">Back to Results</button><br />
<button id="returnToHistoryButton">Back to Request History</button>
</div>
<div id="courseDescription">
<div class="heading">Course Description:</div>
......@@ -11,17 +19,36 @@
</div>
</div>
<button id="backToResultsButton">Back to Results</button>
<button id="printButton">Print</button>
<button id="returnToHistoryButton">Return to History</button>
<div id="courseStatus">
<div class="heading">Course Status:</div>
<div class="content">
<?php if ($this->course->getRemoved()) { ?>
REMOVED
<?php } else { ?>
ACTIVE
<?php } ?>
</div>
</div>
<div id="effectiveDate">
<div class="heading">Effective Date:</div>
<div class="content">
<?php echo $this->effectiveDate->toString('MMM d, yyyy'); ?>
</div>
</div>
<div class="clear"></div>
<table id="historyTable">
<caption>Curriculum Request History</caption>
<tbody>
<tr>
<th>Date</th>
<th>Curriculum Request Type</th>
<th>
<a href="<?php echo $this->url(array('sort-history' => 'lastApprovalTimestamp')); ?>">Date</a>
</th>
<th>
<a href="<?php echo $this->url(array('sort-history' => 'typeDescription')); ?>">Curriculum Request Type</a>
</th>
<th></th>
</tr>
<?php foreach ($this->previousRequests as $request) { ?>
......@@ -37,6 +64,7 @@
<?php } ?>
</tbody>
</table>
<button id="viewAllDetailsButton">View All Details</button>
<div class="clear"></div>
......@@ -45,21 +73,11 @@
<?php foreach ($this->previousRequests as $request) { ?>
<div class="requestDetail" id="requestDetail<?php echo $request->getId();?>">
<div class="titled_box">
<div class="box_shadow_2">
<div class="tr"></div>
<div class="tl">
<h2>
Details for: <?php echo $request->getTypeDescription(); ?>
<img src="<?php echo $this->baseUrl(); ?>/images/index/arrow1.png" alt="arrow 1" class="toggle_arrow" />
</h2>
<h3><em><?php echo $request->getLastApprovalTime()->toString('MMM d, yyyy'); ?></em></h3>
</div>
<div class="bl"></div>
</div>
<div class="content">
<div class="heading">Details for: <?php echo $request->getTypeDescription(); ?> | <?php echo $request->getLastApprovalTime()->toString('MMM d, yyyy'); ?></div>
<?php echo $this->partial('view/course-info.phtml', array('request' => $request,
'course' => $this->requestFinalCourses[$request->getId()],
'parentCourse' => $this->requestParentCourses[$request->getId()])); ?>
......@@ -82,12 +100,13 @@
} else { ?>
<div>No comments for this request</div>
<?php } } else { ?>
<div>Log in is required to view comments associated with this request. <a href="<?php echo $this->baseUrl(); ?>/auth/index/login">Log In</a></div>
<span class="loginMessage">
<a href="<?php echo $this->baseUrl(); ?>/auth/index/login">Log In</a>
to view comments associated with this request (users must have approval)
</span>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
</div>
......@@ -95,6 +114,7 @@
<?php /* ?>
<div id="offeringsContainer" class="titled_box">
<div class="box_shadow_2">
<div class="tr"></div>
......@@ -119,3 +139,6 @@
); ?>
</div>
</div>
*/ ?>
</div>
\ No newline at end of file
......@@ -114,18 +114,14 @@
<table id="otherInfo">
<caption>Other Information</caption>
<?php if (in_array($this->request->getType(), array('ChangeCourse', 'AddISToCourse', 'AddACEAndChangeCourse'))) { ?>
<tr>
<th>DF Removal</th>
<td><?php echo $course->getDfRemoval(); ?></td>
</tr>
<?php } ?>
<?php if (!in_array($this->request->getType(), array('RemoveCourse', 'AddACEToCourse', 'RemoveACEFromCourse'))) { ?>
<tr>
<th>Grading Type</th>
<td><?php echo $course->getGradingType(); ?></td>
</tr>
<?php } ?>
<tr>
<th>Effective Term</th>
<td><?php echo $course->getEffectiveSemester(); ?></td>
......
@CHARSET "UTF-8";
#printButton {float: right;}
#instructions {margin: 1em 0;}
@media print {
#instructions {display: none;}
}
#results table {color: #a00; text-align: center;}
#results table th {background-color: #aaa; padding: 0.3em 0.5em; white-space: nowrap;}
#results table tr.even {background-color: #ddd;}
#results table td {padding: 0.5em 0.5em;}
#results table tr.removed td {text-decoration: line-through;}
@CHARSET "UTF-8";
#searchForm,#searchFormSmall {background-color: #ccc; border: 1px solid #888; padding: 1px;}
#searchForm {width: 550px; padding: 0 5px; border-radius: 20px; -moz-border-radius: 20px; -webkit-border-radius: 20px; margin: 0px auto;}
#searchFormSidebar {float: left;}
#searchFormSmall {width: 200px; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px;}
#searchFormSmall .verbose {display: none;}
#searchForm div {margin: 0.5em 0;}
#searchForm .helpText {color: #048; text-align: center;}
#searchFormSmall .helpText {display: none;}
#searchFormSmall h3 {text-align: center;}
#searchForm label.aligned {display: block; float: left; width: 100px; text-align: right; margin: 0em 1em;}
#searchForm #college,#searchForm #department,#searchForm #subject, #searchForm #courseTitle {width: 400px;}
#searchFormSmall #college,#searchFormSmall #department,#searchFormSmall #subject, #searchFormSmall #courseTitle {width: 195px;}
#searchForm #courseNumber, #searchForm #activity {width: 120px;}
#searchFormSmall #courseNumber {width: 45px;}
#searchFormSmall #activity {width: 100px;}
#courseLetter {width: 45px;}
#aceOutcomes {height: 4em; vertical-align: top;}
#submit {height: 25px; padding: 0px 1em; color: #fff; font-size: 14px; background-image: url(../../../images/redBlackGrad.png); border: 1px solid #000; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; margin: 0px auto; display: block;}
#reset {display: block; margin: 0.5em auto; color: #c00; border: 0px solid #000; background-color: transparent; }
#creqMain a.hoverHelp {color: #c00; text-decoration: none; background: none;}
#searchFormSmall a.hoverHelp {display: none;}
.hoverHelpText {display: none;}
#floating_help_text_div {background-color: #eee; border: 1px solid #000;}
#restartSearchButton, #logInButton {clear: left; float: left; width: 120px; margin-left: 40px; margin-top: 1em; border: 1px solid #444; font-size: 12px; padding: 2px 0; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;}
#logInButton {color: #c00;}
\ No newline at end of file
@CHARSET "UTF-8";
#creqMain {width: 940px;}
#searchForm {width: 550px; background-color: #ccc; border: 1px solid #888; padding: 0 5px; border-radius: 20px; -moz-border-radius: 20px; -webkit-border-radius: 20px; margin: 0px auto;}
#searchForm div {margin: 0.5em 0;}
#searchForm .helpText {color: #048; text-align: center;}
#searchForm label.aligned {display: block; float: left; width: 100px; text-align: right; margin: 0em 1em;}
#college,#department,#subject,#courseTitle {width: 400px;}
#courseNumber, #activity {width: 120px;}
#courseLetter {width: 50px;}
#aceOutcomes {height: 4em; vertical-align: top;}
#creqMain .warning {border: 2px dashed #ff0; background-color: #ffc; padding: 0.5em;}
#printButton {float: right;}
#instructions {margin: 1em 0;}
@media print {
#instructions {display: none;}
}
#creqMain a.hoverHelp {color: #c00; text-decoration: none; background: none;}
.hoverHelpText {display: none;}
#floating_help_text_div {background-color: #eee; border: 1px solid #000;}
#submit {height: 25px; padding: 0px 1em; color: #fff; font-size: 14px; background-image: url(../../../images/redBlackGrad.png); border: 1px solid #000; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; margin: 0px auto; display: block;}
#reset {display: block; margin: 0.5em auto; color: #c00; border: 0px solid #000; background-color: transparent; }
\ No newline at end of file
......@@ -2,21 +2,34 @@
#creqMain {width: 944px;}
#viewMain {overflow: hidden; padding-left: 5px;}
#courseDescription {margin: 1em 0;}
#courseDescription .heading {float: left; font-size: 18px; line-height: 25px; padding: 0 0.5em 0 0; width: 125px;}
#courseDescription .content {overflow: hidden; border: 1px solid #888; background-color: #ccc; min-height: 4em;}
#courseDescription .heading {float: left; font-size: 16px; line-height: 25px; padding: 0 0.5em 0 0; width: 125px;}
#courseDescription .content {overflow: hidden; min-height: 4em;}
#courseStatus {margin: 1em 0;}
#courseStatus .heading {float: left; font-size: 16px; padding: 0 0.5em 0 0; width: 125px;}
#courseStatus .content {float: left; color: #c00;}
#printButton, #backToResultsButton {float: right; margin-left: 1em;}
#effectiveDate {margin: 1em 0;}
#effectiveDate .heading {float: left; font-size: 16px; padding: 0 0.5em 0 1em; width: 125px;}
#printAndBackButtons {float: right; margin-left: 1em; text-align: right;}
#printAndBackButtons button {margin-top: 1em; border: 1px solid #444; font-size: 12px; padding: 2px 0; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;}
#printButton {width: 75px;}
#historyTable {width: 100%;}
#historyTable caption {background-color: #aaa; font-size: 18px; text-align: left; padding: 0.2em 0.5em;}
#historyTable caption,
.requestDetail .heading {background-color: #999; font-size: 18px; text-align: left; padding: 0.2em 0.5em; color: #fff;}
#historyTable td {text-align: center; padding: 0.2em 0;}
#historyTable .even {background-color: #ccc;}
#viewAllDetailsButton {float: right;}
#returnToHistoryButton {float: right; display: none;}
#requestDetailsContainer {display: none;}
.requestDetail {display: none;}
.requestDetail {display: none; margin-bottom: 1em;}
.requestDetail .heading {margin-bottom: 1em;}
.requestDetail .content {margin: 2em 3px;}
.courseInfo {overflow: hidden;}
......@@ -25,6 +38,8 @@
.requestComments table th {background-color: #aaa;}
.requestComments table .even {background-color: #ccc;}
.loginMessage {background-color: #ccc; font-weight: bold; padding: 0.5em;}
#offeringsContainer table {width: 100%;}
#offeringsContainer table th {background-color: #aaa;}
#offeringsContainer table .even {background-color: #ccc;}
......
......@@ -36,6 +36,12 @@ function handleViewDetailsLinkClick()
document.getElementById('viewAllDetailsButton').style.display = 'none';
document.getElementById('returnToHistoryButton').style.display = 'inline';
document.getElementById('requestDetailsContainer').style.display = 'block';
var requestDetails = getElementsByClassName('requestDetail');
for (var i = requestDetails.length - 1; i >= 0; i--) {
requestDetails[i].style.display = 'none';
}
document.getElementById('requestDetail' + requestId).style.display = 'block';
return false;
......
......@@ -4,7 +4,8 @@ class App_View_Helper_CollectionTable extends Zend_View_Helper_Abstract
public function collectionTable(Unl_Model_Collection $collection,
array $columns,
array $searchUrlParameters = null,
array $formatOptions = null)
array $formatOptions = null,
$rowClassColumn = null)
{
if (!is_array($searchUrlParameters)) {
......@@ -20,24 +21,37 @@ class App_View_Helper_CollectionTable extends Zend_View_Helper_Abstract
$output .= "<tr>\n";
foreach ($columns as $field => $title) {
$output .= "<th>\n";
if ($field[0] != '#') {
$output .= '<a href="'
. $this->view->url(array_merge($searchUrlParameters, array('sort' => $field)))
. '">' . $title . '</a>' . "\n";
}
$output .= "</th>\n";
}
$output .= "</tr>\n";
foreach ($collection as $row) {
$rowClasses = array();
if ($rowCount++ % 2) {
$output .= '<tr class="even">';
$rowClasses[] = 'even';
}
if ($rowClassColumn) {
if ($row->{'get' . $rowClassColumn}()) {
$rowClasses[] = $row->{'get' . $rowClassColumn}();
}
}
if ($rowClasses) {
$output .= '<tr class="' . implode(' ', $rowClasses) . '">';
} else {
$output .= '<tr>';
}
foreach ($columns as $field => $title) {
$output .= "<td>";
$output .= $this->_applyFormatting($row->{'get' . $field}(), $formatOptions[$field], $row);
if ($url) {
$output .= '</a>';
if ($field[0] == '#') {
$data = $title;
} else {
$data = $row->{'get' . $field}();
}
$output .= "<td>";
$output .= $this->_applyFormatting($data, $formatOptions[$field], $row);
$output .= "</td>\n";
}
$output .= "</tr>\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment