diff options
-rw-r--r-- | app/index.php | 15 | ||||
-rw-r--r-- | app/model/pad.php | 21 | ||||
-rw-r--r-- | app/view/datalsts.php | 37 | ||||
-rw-r--r-- | app/view/pad.php | 50 | ||||
-rw-r--r-- | app/view/stdpage.php | 7 |
5 files changed, 130 insertions, 0 deletions
diff --git a/app/index.php b/app/index.php index d20aaff..182ab1b 100644 --- a/app/index.php +++ b/app/index.php @@ -69,6 +69,21 @@ function main(array $argv) : void setPageName("<i>Pads</i>"); require "view/pads.php"; break; + + default: + /* view object */ + if (table::isGUID($argv[0])) + { + switch (obj::typeOf($argv[0])) + { + case "pad": + $obj = new pad($argv[0]); + setPageObj($obj); + setPageName($obj->name); + require "view/pad.php"; + break; + } + } } } diff --git a/app/model/pad.php b/app/model/pad.php new file mode 100644 index 0000000..d29b1f6 --- /dev/null +++ b/app/model/pad.php @@ -0,0 +1,21 @@ +<?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 "class/pad.class.php"; + +$pad = getPageObj(); +$stages = $pad->getStages(); +$stages = array_reverse($stages); + +?> diff --git a/app/view/datalsts.php b/app/view/datalsts.php index 16df7d7..b0564b3 100644 --- a/app/view/datalsts.php +++ b/app/view/datalsts.php @@ -15,6 +15,8 @@ namespace datalsts; require_once "class/obj.class.php"; +require_once "class/stage.class.php"; +require_once "class/issue.class.php"; ?> <?php function objHeadCircle(\obj $obj, int $height) : void { ?> @@ -111,3 +113,38 @@ require_once "class/obj.class.php"; </a> <?php } ?> +<?php function stageListItem(\stage $s) : void { ?> + + <div class="panel panel-default"> + <h2 class="text-center"><?=$s->name?></h2> + + <table class="table table-hover"> + <?php foreach ($s->getIssues_ordByDueByNumb() as $i) { ?> + <?=issueListItem($i)?> + <?php } ?> + </table> + </div> + +<?php } ?> +<?php function issueListItem(\issue $i) : void { ?> + + <tr class="issueListItem" data-guid="<?=$i->guid?>"> + <!-- TODO --> + <td class="col-md-2"><?=$i->guid?> (#<?=$i->numb?>)</td> + <td class="col-md-5"><?=$i->name?></td> + <td class="col-md-3"><?=objHeadCircle(\user::getCurrent(), 32)?>TODO HEADS</td> + + <td class="col-md-2"> + <div class="btn-group"> + <button type="button" class="btn btn-default"> + <span class="glyphicon glyphicon-circle-arrow-up"></span> + </button> + + <button type="button" class="btn btn-success"> + <span class="glyphicon glyphicon-ok"></span> + </button> + </div> + </td> + </tr> + +<?php } ?> diff --git a/app/view/pad.php b/app/view/pad.php new file mode 100644 index 0000000..82ee84f --- /dev/null +++ b/app/view/pad.php @@ -0,0 +1,50 @@ +<?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"; + +?> + +<!DOCTYPE html> + +<html lang="en"> + <head> + <?=stdpage\head( getPageName() )?> + </head> + + <body> + <?=stdpage\top()?> + <?=stdpage\nav()?> + + <div class="container"> + <div class="well well-lg"> + <div class="row"> + <div class="col-md-12"> + <h1> + <?=datalsts\objHeadCircle($pad, 100)?> + <?=$pad->name?> + </h1> + </div> + </div> + </div> + + <?php foreach ($stages as $s) { ?> + <?=datalsts\stageListItem($s)?> + <?php } ?> + </div> + + <?=stdpage\foot()?> + </body> +</html> diff --git a/app/view/stdpage.php b/app/view/stdpage.php index 064f6e7..38674ea 100644 --- a/app/view/stdpage.php +++ b/app/view/stdpage.php @@ -147,6 +147,13 @@ require_once "view/settings.php"; </script> <?php } ?> + <script type="text/javascript"> + $(".issueListItem").click(function () { + //$(this).data("guid"); + $("#aboutModal").modal("show"); + }); + </script> + <?php } ?> <?php function about() : void { ?> |