diff options
Diffstat (limited to 'app/view/issue.php')
-rw-r--r-- | app/view/issue.php | 66 |
1 files changed, 50 insertions, 16 deletions
diff --git a/app/view/issue.php b/app/view/issue.php index 2d781ba..01a9f5f 100644 --- a/app/view/issue.php +++ b/app/view/issue.php @@ -109,23 +109,57 @@ require_once "class/issue.class.php"; </div> <?php } ?> - <form method="post" action="<?=ap()?>" enctype="multipart/form-data"> - <?=\formctrl\formname( "iss-mesg-add" )?> - <?=\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"> - <span class="glyphicon glyphicon-envelope"></span> Post message - </button> - - <button type="submit" name="input[closeIssue]" class="btn btn-success"> - <span class="glyphicon glyphicon-ok"></span> Close issue - </button> - </div> + <?php if ($i->isOpen()) { ?> + <form method="post" action="<?=ap()?>" enctype="multipart/form-data"> + <?=\formctrl\formname( "iss-mesg-add" )?> + <?=\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> + + <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> - <?=\formctrl\file( "Attachment", "attachment" )?> - </form> + <div class="collapse" id="assignCollapse-<?=$i->guid?>"> + <div class="form-group"> + <label>Select assignee</label> + + <select name="input[assignee]" class="form-control selectpicker"> + <?php foreach ($i->getParent()->getParent()->getOwner()->getContainedUsers() as $memb) { ?> + <option data-icon="glyphicon-user" value="<?=$memb->guid?>"> + <?=$memb->getDisplayName()?> + </option> + <?php } ?> + + <?php foreach ($i->getParent()->getParent()->getMembers() as $memb) { ?> + <option data-icon="glyphicon-user" value="<?=$memb->guid?>"> + <?=$memb->getDisplayName()?> + </option> + <?php } ?> + </select> + </div> + + <button type="submit" name="input[assIssue]" class="btn btn-default"> + <span class="glyphicon glyphicon-share-alt"></span> Post and assign issue + </button> + </div> + + <?=\formctrl\file( "Attachment", "attachment" )?> + </form> + <?php } ?> </div> <div class="col-md-4"> |