summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-10-18 18:25:53 -0400
committerMalfurious <m@lfurio.us>2021-10-18 18:25:53 -0400
commit68d0262464933a158e31f76fd927b72b19fdf497 (patch)
tree682e7dda4052273a6130107449eadc469b508a8d
parent00f0fcc8895df860aaec0421385b6be7c8d8f7db (diff)
downloadscrott-68d0262464933a158e31f76fd927b72b19fdf497.tar.gz
scrott-68d0262464933a158e31f76fd927b72b19fdf497.zip
Add additional info / controls to issueListItem
The list of assignees, the owner (opener), and quick controls for advancing or closing an issue are now available in the issue listing for pad stages (or the closed issue list, which is missing the new control buttons). If using the quick control buttons to manipulate an issue, the issue modal is not called-up on the page reload. Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--app/model/issue.php4
-rw-r--r--app/view/datalsts.php43
-rw-r--r--app/view/pad_closed.php2
3 files changed, 43 insertions, 6 deletions
diff --git a/app/model/issue.php b/app/model/issue.php
index dd904e4..3f7b620 100644
--- a/app/model/issue.php
+++ b/app/model/issue.php
@@ -25,6 +25,7 @@ if (isAction("iss-mesg-add"))
$form->text("issue");
$form->text("mesg", false);
$form->text("assignee");
+ $form->flag("nopop");
if (!$form->populate(input()))
return;
@@ -106,7 +107,8 @@ if (isAction("iss-mesg-add"))
}
/* automatically redisplay issue modal */
- setAutoModal("#issueModal-" . $issue->guid);
+ if ($form->nopop != "1")
+ setAutoModal("#issueModal-" . $issue->guid);
}
?>
diff --git a/app/view/datalsts.php b/app/view/datalsts.php
index ba9021b..b80de78 100644
--- a/app/view/datalsts.php
+++ b/app/view/datalsts.php
@@ -17,6 +17,7 @@ namespace datalsts;
require_once "class/obj.class.php";
require_once "class/stage.class.php";
require_once "class/issue.class.php";
+require_once "view/formctrl.php";
?>
<?php function objHeadCircle(\obj $obj, int $height) : void { ?>
@@ -130,12 +131,46 @@ require_once "class/issue.class.php";
</div>
<?php } ?>
-<?php function issueListItem(\issue $i) : void { ?>
+<?php function issueListItem(\issue $i, bool $show_ctrls = true) : void { ?>
+
+ <?php $assigns = $i->getAssignees(); ?>
<tr class="issueListItem" data-guid="<?=$i->guid?>">
- <!-- TODO -->
- <td class="col-md-2"><?=$i->guid?> (#<?=$i->numb?>)</td>
- <td class="col-md-10"><?=$i->name?></td>
+ <td class="col-md-1">#<?=$i->numb?></td>
+
+ <td class="col-md-11">
+ <?=$i->name?>
+
+ <span class="pull-right">
+ <form method="post" action="<?=ap()?>">
+ <?=\formctrl\formname( "iss-mesg-add" )?>
+ <?=\formctrl\hidden( "issue", $i->guid )?>
+ <?=\formctrl\hidden( "assignee", " " )?>
+ <?=\formctrl\hidden( "nopop", "1" )?>
+
+ <?php if (count($assigns) == 0) { ?>
+ <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;
+ <?php } foreach ($assigns as $assign) { ?>
+ <?=objHeadCircle($assign->assignee, 20)?>
+ <?php } ?>
+ <span class="glyphicon glyphicon-share-alt"></span>
+ <?=objHeadCircle($i->getOwner(), 20)?>
+
+ <?php if ($show_ctrls) { ?>
+ &nbsp;
+ <div class="btn-group" role="group">
+ <button type="submit" name="input[advIssue]" class="btn btn-sm btn-default" title="Advance issue">
+ <span class="glyphicon glyphicon-chevron-up"></span>
+ </button>
+
+ <button type="submit" name="input[closeIssue]" class="btn btn-sm btn-default" title="Close issue">
+ <span class="glyphicon glyphicon-ok"></span>
+ </button>
+ </div>
+ <?php } ?>
+ </form>
+ </span>
+ </td>
</tr>
<?php } ?>
diff --git a/app/view/pad_closed.php b/app/view/pad_closed.php
index 412ce4f..c0678e3 100644
--- a/app/view/pad_closed.php
+++ b/app/view/pad_closed.php
@@ -64,7 +64,7 @@ require_once "view/issue.php";
<table class="table table-hover">
<?php foreach ($closed_issues as $i) { ?>
- <?=datalsts\issueListItem($i)?>
+ <?=datalsts\issueListItem($i, false)?>
<?php } ?>
</table>
</div>