diff options
Diffstat (limited to 'app/view')
| -rw-r--r-- | app/view/issue.php | 86 | ||||
| -rw-r--r-- | app/view/pad.php | 12 | ||||
| -rw-r--r-- | app/view/pad_closed.php | 64 | 
3 files changed, 117 insertions, 45 deletions
diff --git a/app/view/issue.php b/app/view/issue.php index 5f1c518..6edf7cf 100644 --- a/app/view/issue.php +++ b/app/view/issue.php @@ -109,53 +109,55 @@ 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" 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> - -                                <div class="collapse" id="assignCollapse-<?=$i->guid?>"> -                                    <div class="form-group"> -                                        <label>Select assignee</label> +                            <?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> -                                        <select name="input[assignee]" class="form-control selectpicker"> -                                            <option data-icon="glyphicon-user" value="<?=$i->getParent()->getParent()->getOwner()->guid?>"> -                                                <?=$i->getParent()->getParent()->getOwner()->getDisplayName()?> -                                            </option> +                                    <div class="collapse" id="assignCollapse-<?=$i->guid?>"> +                                        <div class="form-group"> +                                            <label>Select assignee</label> -                                            <?php foreach ($i->getParent()->getParent()->getMembers() as $memb) { ?> -                                                <option data-icon="glyphicon-user" value="<?=$memb->guid?>"> -                                                    <?=$memb->getDisplayName()?> +                                            <select name="input[assignee]" class="form-control selectpicker"> +                                                <option data-icon="glyphicon-user" value="<?=$i->getParent()->getParent()->getOwner()->guid?>"> +                                                    <?=$i->getParent()->getParent()->getOwner()->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> +                                                <?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> +                                    <?=\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..19864cd --- /dev/null +++ b/app/view/pad_closed.php @@ -0,0 +1,64 @@ +<?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"> +                <table class="table table-hover"> +                    <?php foreach ($closed_issues as $i) { ?> +                        <?=datalsts\issueListItem($i)?> +                    <?php } ?> +                </table> +            </div> +        </div> + +        <?=stdpage\foot()?> +    </body> +</html>  | 
