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

Make each request show up as its own section under detailed history in public view.

parent f8e73a7e
No related branches found
No related tags found
No related merge requests found
......@@ -41,70 +41,33 @@
<div class="clear"></div>
<div id="requestDetailsContainer">
<?php foreach ($this->previousRequests as $request) { ?>
<div id="requestDetailsContainer" class="titled_box">
<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
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></em></h3>
<h3><em><?php echo $request->getLastApprovalTime()->toString('MMM d, yyyy'); ?></em></h3>
</div>
<div class="bl"></div>
</div>
<div class="content">
<?php foreach ($this->previousRequests as $request) { ?>
<div class="requestDetail" id="requestDetail<?php echo $request->getId();?>">
<div class="requestDetailDateType">
<?php if ($request->getLastApprovalTime()) { ?>
<?php echo $request->getLastApprovalTime()->toString('MMM d, yyyy'); ?>
<br />
<?php } ?>
<?php echo $request->getTypeDescription(); ?>
</div>
<?php echo $this->partial('view/course-info.phtml', array('request' => $request,
'course' => $this->requestFinalCourses[$request->getId()],
'parentCourse' => $this->requestParentCourses[$request->getId()])); ?>
</div>
<?php } ?>
</div>
</div>
<h2>Comments</h2>
<?php if (Zend_Auth::getInstance()->getIdentity()) { ?>
<div id="requestCommentsContainer" class="titled_box">
<div class="box_shadow_2">
<div class="tr"></div>
<div class="tl">
<h2>
Comments
<img src="<?php echo $this->baseUrl(); ?>/images/index/arrow1.png" alt="arrow 1" class="toggle_arrow" />
</h2>
<h3><em></em></h3>
</div>
<div class="bl"></div>
</div>
<div class="content">
<?php foreach ($this->previousRequests as $request) { ?>
<div class="requestComments" id="requestComments<?php echo $request->getId();?>">
<div class="requestDetailDateType">
<?php if ($request->getLastApprovalTime()) { ?>
<?php echo $request->getLastApprovalTime()->toString('MMM d, yyyy'); ?>
<br />
<?php } ?>
<?php echo $request->getTypeDescription(); ?>
</div>
<?php
if (count($this->requestComments[$request->getId()]) > 0) {
echo $this->collectionTable(
......@@ -117,17 +80,17 @@
);
} 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>
<?php } ?>
<div class="clear"></div>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
</div>
......
......@@ -15,12 +15,13 @@
#viewAllDetailsButton {float: right;}
#returnToHistoryButton {float: right; display: none;}
#requestDetailsContainer, #requestCommentsContainer {display: none;}
.requestDetail, .requestComments {display: none; margin: 2em 3px; border-left: 5px solid #c00;}
#requestDetailsContainer {display: none;}
.requestDetail {display: none;}
.requestDetail .content {margin: 2em 3px;}
.requestDetailDateType {float: left; width: 100px; padding-left: 5px;}
.courseInfo {overflow: hidden;}
.requestComments table {width: 100%;}
.requestComments table th {background-color: #aaa;}
.requestComments table .even {background-color: #ccc;}
......
......@@ -37,10 +37,6 @@ function handleViewDetailsLinkClick()
document.getElementById('returnToHistoryButton').style.display = 'inline';
document.getElementById('requestDetailsContainer').style.display = 'block';
document.getElementById('requestDetail' + requestId).style.display = 'block';
if (document.getElementById('requestCommentsContainer')) {
document.getElementById('requestCommentsContainer').style.display = 'block';
document.getElementById('requestComments' + requestId).style.display = 'block';
}
return false;
}
......@@ -55,13 +51,6 @@ function handleViewAllDetailsClick()
for (var i = requestDetails.length - 1; i >= 0; i--) {
requestDetails[i].style.display = 'block';
}
if (document.getElementById('requestCommentsContainer')) {
document.getElementById('requestCommentsContainer').style.display = 'block';
var requestComments = getElementsByClassName('requestComments');
for (var i = requestComments.length - 1; i >= 0; i--) {
requestComments[i].style.display = 'block';
}
}
return false;
}
......@@ -73,13 +62,6 @@ function handleReturnToHistoryClick()
for (var i = requestDetails.length - 1; i >= 0; i--) {
requestDetails[i].style.display = '';
}
if (document.getElementById('requestCommentsContainer')) {
document.getElementById('requestCommentsContainer').style.display = '';
var requestComments = getElementsByClassName('requestComments');
for (var i = requestComments.length - 1; i >= 0; i--) {
requestComments[i].style.display = '';
}
}
document.getElementById('historyTable').style.display = '';
document.getElementById('viewAllDetailsButton').style.display = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment