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

Present a feedback message after a user submits decisions.

parent 530fab40
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,10 @@ class Courses_ViewController extends App_Controller_Action ...@@ -104,6 +104,10 @@ class Courses_ViewController extends App_Controller_Action
$this->view->lastRoleId = $roleId; $this->view->lastRoleId = $roleId;
$this->view->action = $action; $this->view->action = $action;
$decisionSession = new Zend_Session_Namespace('decidePostAction');
$this->view->decisionMessage = $decisionSession->message;
unset ($decisionSession->message);
$session = new Zend_Session_Namespace(__CLASS__); $session = new Zend_Session_Namespace(__CLASS__);
if ($session->tabName) { if ($session->tabName) {
$this->view->selectedCommentTab = $session->tabName; $this->view->selectedCommentTab = $session->tabName;
......
...@@ -8,6 +8,11 @@ if ($this->preview) { ...@@ -8,6 +8,11 @@ if ($this->preview) {
} }
$this->layout()->breadcrumbs = array($breadcrumb . ': ' . $this->course->getCourseCode() . ' (' . $this->request->getTypeDescription() . ')'); $this->layout()->breadcrumbs = array($breadcrumb . ': ' . $this->course->getCourseCode() . ' (' . $this->request->getTypeDescription() . ')');
?> ?>
<?php if ($this->decisionMessage) { ?>
<div id="decisionMessage"><?php echo $this->decisionMessage;?></div>
<?php } ?>
<div id="viewRequest"> <div id="viewRequest">
<?php echo $this->partial('view/course-info.phtml', $this); ?> <?php echo $this->partial('view/course-info.phtml', $this); ?>
<?php echo $this->partial('view/course-files.phtml', $this); ?> <?php echo $this->partial('view/course-files.phtml', $this); ?>
......
...@@ -210,6 +210,10 @@ class Requests_IndexController extends App_Controller_Action ...@@ -210,6 +210,10 @@ class Requests_IndexController extends App_Controller_Action
$this->view->user = $user; $this->view->user = $user;
$this->view->userRequests = $userRequestsData; $this->view->userRequests = $userRequestsData;
$decisionSession = new Zend_Session_Namespace('decidePostAction');
$this->view->decisionMessage = $decisionSession->message;
unset($decisionSession->message);
// save the order of requests to the session so we can have next/previous links on other pages. // save the order of requests to the session so we can have next/previous links on other pages.
$session = new Zend_Session_Namespace('My Requests'); $session = new Zend_Session_Namespace('My Requests');
$session->requestOrder = array(); $session->requestOrder = array();
...@@ -271,6 +275,13 @@ class Requests_IndexController extends App_Controller_Action ...@@ -271,6 +275,13 @@ class Requests_IndexController extends App_Controller_Action
} }
Requests_ApprovalChainModel::consider($requests); Requests_ApprovalChainModel::consider($requests);
$session = new Zend_Session_Namespace('decidePostAction');
if (count($requests) == 1) {
$session->message = 'Successfully submitted decision for 1 request.';
} else {
$session->message = 'Successfully submitted decisions for ' . count($requests) . ' requests.';
}
if (array_key_exists('returnUrl', $in)) { if (array_key_exists('returnUrl', $in)) {
$this->_redirect($in['returnUrl']); $this->_redirect($in['returnUrl']);
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
<?php if ($this->decisionMessage) { ?>
<div id="decisionMessage"><?php echo $this->decisionMessage;?></div>
<?php } ?>
<div id="announcements" class="titled_box"> <div id="announcements" class="titled_box">
......
@CHARSET "UTF-8"; @CHARSET "UTF-8";
#creqMain {width: 720px;} #creqMain {width: 720px;}
#decisionMessage {margin: 1em; padding: 0.5em; text-align: center; color: #060; background-color: #cfc; border: 1px solid #4c4;}
#editLink { #editLink {
text-align:center; text-align:center;
} }
......
@CHARSET "UTF-8"; @CHARSET "UTF-8";
#creqMain {width: 720px;} #creqMain {width: 720px;}
#decisionMessage {margin: 1em; padding: 0.5em; text-align: center; color: #060; background-color: #cfc; border: 1px solid #4c4;}
table.course_list {width: 100%;} table.course_list {width: 100%;}
table.course_list tr.odd {background-color:#E3E3E3;} table.course_list tr.odd {background-color:#E3E3E3;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment