summaryrefslogtreecommitdiffstats
path: root/app/view
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-11-10 23:21:39 -0500
committerMalf Furious <m@lfurio.us>2018-11-10 23:21:39 -0500
commitf3165d28fff6468fca44ff2ec3b6cfb3fb82ee90 (patch)
treea8edb746f0a21d9e7ad134ba79be8278ecce147e /app/view
parent0421aa1b60f4fe6bf140888159c58059c1013588 (diff)
parent295ba9fce85a959b04db4ac74b4ee378b42e6153 (diff)
downloadscrott-f3165d28fff6468fca44ff2ec3b6cfb3fb82ee90.tar.gz
scrott-f3165d28fff6468fca44ff2ec3b6cfb3fb82ee90.zip
Merge branch 'rel/v0.2'v0.2
Diffstat (limited to '')
-rw-r--r--app/view/datalsts.php4
-rw-r--r--app/view/issue.php66
-rw-r--r--app/view/pad.php12
-rw-r--r--app/view/pad_closed.php68
4 files changed, 131 insertions, 19 deletions
diff --git a/app/view/datalsts.php b/app/view/datalsts.php
index 2bbb44e..ba9021b 100644
--- a/app/view/datalsts.php
+++ b/app/view/datalsts.php
@@ -118,6 +118,10 @@ require_once "class/issue.class.php";
<div class="panel panel-default">
<h2 class="text-center"><?=$s->name?></h2>
+ <?php if (count($s->getIssues_ordByDueByNumb()) == 0) { ?>
+ <h4 class="text-info text-center">No issues</h4>
+ <?php } ?>
+
<table class="table table-hover">
<?php foreach ($s->getIssues_ordByDueByNumb() as $i) { ?>
<?=issueListItem($i)?>
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">
diff --git a/app/view/pad.php b/app/view/pad.php
index a9c8508..bf626bf 100644
--- a/app/view/pad.php
+++ b/app/view/pad.php
@@ -42,9 +42,15 @@ require_once "view/issue.php";
<span class="glyphicon glyphicon-edit"></span>
<?=$pad->name?>
- <button type="button" class="btn btn-success" data-toggle="modal" data-target="#newIssueModal">
- <span class="glyphicon glyphicon-plus"></span> Open Issue
- </button>
+ <div class="btn-group">
+ <button type="button" class="btn btn-success" data-toggle="modal" data-target="#newIssueModal">
+ <span class="glyphicon glyphicon-plus"></span> Open Issue
+ </button>
+
+ <a href="<?=ap()?>/closed" class="btn btn-default">
+ View closed issues
+ </a>
+ </div>
</h1>
</div>
</div>
diff --git a/app/view/pad_closed.php b/app/view/pad_closed.php
new file mode 100644
index 0000000..e11ca84
--- /dev/null
+++ b/app/view/pad_closed.php
@@ -0,0 +1,68 @@
+<?php
+
+/*
+ * SCROTT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For more information, please refer to UNLICENSE
+ */
+
+require_once "model/pad.php";
+require_once "view/stdpage.php";
+require_once "view/datalsts.php";
+require_once "view/issue.php";
+
+?>
+
+<!DOCTYPE html>
+
+<html lang="en">
+ <head>
+ <?=stdpage\head( getPageName() )?>
+ </head>
+
+ <body>
+ <?php foreach ($closed_issues as $i) { ?>
+ <?=issue_v\issue($i)?>
+ <?php } ?>
+
+ <?=stdpage\top()?>
+ <?=stdpage\nav()?>
+
+ <div class="container">
+ <div class="well well-lg">
+ <div class="row">
+ <div class="col-md-12">
+ <h1>
+ <span class="glyphicon glyphicon-edit"></span>
+ <?=$pad->name?>
+
+ <a href="<?=ar()?>/<?=$pad->guid?>" class="btn btn-default">
+ View open issues
+ </a>
+ </h1>
+ </div>
+ </div>
+ </div>
+
+ <div class="panel panel-default">
+ <?php if (count($closed_issues) == 0) { ?>
+ <h4 class="text-info text-center">No closed issues</h4>
+ <?php } ?>
+
+ <table class="table table-hover">
+ <?php foreach ($closed_issues as $i) { ?>
+ <?=datalsts\issueListItem($i)?>
+ <?php } ?>
+ </table>
+ </div>
+ </div>
+
+ <?=stdpage\foot()?>
+ </body>
+</html>