diff options
-rw-r--r-- | app/class/agent.class.php | 1 | ||||
-rw-r--r-- | app/model/issue.php | 12 | ||||
-rw-r--r-- | app/view/datalsts.php | 2 | ||||
-rw-r--r-- | app/view/issue.php | 40 |
4 files changed, 39 insertions, 16 deletions
diff --git a/app/class/agent.class.php b/app/class/agent.class.php index 4651a10..cf6ae9b 100644 --- a/app/class/agent.class.php +++ b/app/class/agent.class.php @@ -82,6 +82,7 @@ abstract class agent extends obj foreach ($issue->getAssignees() as $assign) { if ($assign->assignee->guid == $this->guid + && $assign->signedoff == "" && $assign->dismissed == "") return true; } diff --git a/app/model/issue.php b/app/model/issue.php index 41392e8..c3423f7 100644 --- a/app/model/issue.php +++ b/app/model/issue.php @@ -106,6 +106,18 @@ if (isAction("iss-mesg-add")) $log = mesg::initNewLog("%s closed issue", $user, $issue); } + else if (isset(input()['signoff'])) + { + if (!$user->isAssignedTo($issue)) + { + logError(ERROR, "You are not an active assignee of this issue"); + return; + } + + $issue->signoffAssignee($user); + $log = mesg::initNewLog("%s signed off", $user, $issue); + } + /* automatically redisplay issue modal */ if ($form->nopop != "1") setAutoModal("#issueModal-" . $issue->guid); diff --git a/app/view/datalsts.php b/app/view/datalsts.php index b80de78..298d036 100644 --- a/app/view/datalsts.php +++ b/app/view/datalsts.php @@ -163,7 +163,7 @@ require_once "view/formctrl.php"; <span class="glyphicon glyphicon-chevron-up"></span> </button> - <button type="submit" name="input[closeIssue]" class="btn btn-sm btn-default" title="Close issue"> + <button type="submit" name="input[closeIssue]" class="btn btn-sm btn-success" title="Close issue"> <span class="glyphicon glyphicon-ok"></span> </button> </div> diff --git a/app/view/issue.php b/app/view/issue.php index 4ca0e3b..fbd180a 100644 --- a/app/view/issue.php +++ b/app/view/issue.php @@ -122,22 +122,32 @@ require_once "class/issue.class.php"; <?=\formctrl\hidden( "issue", $i->guid )?> <?=\formctrl\textarea( "New message", "mesg", 5 )?> - <div class="btn-group pull-right"> - <button type="submit" name="input[postMesg]" class="btn btn-primary" title="Post message"> - <span class="glyphicon glyphicon-envelope"></span> - </button> - - <button type="submit" name="input[closeIssue]" class="btn btn-default" title="Close issue"> - <span class="glyphicon glyphicon-ok"></span> - </button> - - <button type="submit" name="input[advIssue]" class="btn btn-default" title="Advance issue"> - <span class="glyphicon glyphicon-chevron-up"></span> - </button> + <div class="btn-toolbar pull-right"> + <div class="btn-group"> + <button type="submit" name="input[postMesg]" class="btn btn-primary" title="Post message"> + <span class="glyphicon glyphicon-envelope"></span> + </button> + + <button type="submit" name="input[closeIssue]" class="btn btn-success" title="Close issue"> + <span class="glyphicon glyphicon-ok"></span> + </button> + + <button type="submit" name="input[advIssue]" class="btn btn-default" title="Advance issue"> + <span class="glyphicon glyphicon-chevron-up"></span> + </button> + + <button type="button" class="btn btn-default" data-toggle="collapse" data-target="#assignCollapse-<?=$i->guid?>" title="Assign issue"> + <span class="glyphicon glyphicon-share-alt"></span> + </button> + </div> - <button type="button" class="btn btn-default" data-toggle="collapse" data-target="#assignCollapse-<?=$i->guid?>" title="Assign issue"> - <span class="glyphicon glyphicon-share-alt"></span> - </button> + <?php if (\user::getCurrent()->isAssignedTo($i)) { ?> + <div class="btn-group"> + <button type="submit" name="input[signoff]" class="btn btn-warning" title="Signoff issue"> + <span class="glyphicon glyphicon-ok"></span> + </button> + </div> + <?php } ?> </div> <div class="collapse" id="assignCollapse-<?=$i->guid?>"> |