autofixes

This commit is contained in:
Dennis Eichhorn 2020-08-30 20:13:10 +02:00
parent f4f6cfeb8d
commit cfcadc4a3b
5 changed files with 28 additions and 26 deletions

View File

@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum;
abstract class PermissionState extends Enum
{
public const CHECKLIST = 1;
public const TEMPLATE = 2;
}

View File

@ -28,24 +28,24 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Checklists') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('Checklists'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td><?= $this->getHtml('Status') ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Creator') ?>
<td><?= $this->getHtml('Created') ?>
<td><?= $this->getHtml('Status'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Creator'); ?>
<td><?= $this->getHtml('Created'); ?>
<tbody>
<?php $c = 0; foreach ([] as $key => $value) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}checklist/single?{?}&id=' . $value->getId()); ?>
<tr>
<td data-label="<?= $this->getHtml('ID', '0', '0') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Status') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()); ?></a>
<td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()); ?></a>
<td data-label="<?= $this->getHtml('Created') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()); ?></a>
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Status'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()); ?></a>
<td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()); ?></a>
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()); ?></a>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr>

View File

@ -21,19 +21,19 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getHtml('General') ?></h1></header>
<header><h1><?= $this->getHtml('General'); ?></h1></header>
<div class="inner">
<form id="fChecklist" method="put" action="<?= \phpOMS\Uri\UriFactory::build('{/api}checklist/template?{?}&csrf={$CSRF}'); ?>">
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label><td>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label><td>
<tr><td><input type="text" id="iName" name="name" required><td>
<tr><td><label for="iDescription"><?= $this->getHtml('Description') ?></label><td>
<tr><td><label for="iDescription"><?= $this->getHtml('Description'); ?></label><td>
<tr><td><textarea id="iDescription" name="description"></textarea><td>
<tr><td><label for="iPermission"><?= $this->getHtml('Permissions') ?></label><td>
<tr><td><label for="iPermission"><?= $this->getHtml('Permissions'); ?></label><td>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button>
<input type="text" id="iPermission" name="permission"></span>
<td><button><?= $this->getHtml('Add', '0', '0'); ?></button>
<tr><td><label for="iFiles"><?= $this->getHtml('Files') ?></label><td>
<tr><td><label for="iFiles"><?= $this->getHtml('Files'); ?></label><td>
<tr><td><input id="iFiles" name="files" type="file" multiple><td>
<tr><td><input type="submit" name="createChecklist" value="<?= $this->getHtml('Create', '0', '0'); ?>"><td>
</table>
@ -44,20 +44,20 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getHtml('Tasks') ?></h1></header>
<header><h1><?= $this->getHtml('Tasks'); ?></h1></header>
<div class="inner">
<table class="layout wf-100">
<tr><td><label for="iETitle"><?= $this->getHtml('Title') ?></label><td>
<tr><td><label for="iETitle"><?= $this->getHtml('Title'); ?></label><td>
<tr><td><input type="text" id="iETitle" name="eTitle" required><td>
<tr><td><label for="iEDescription"><?= $this->getHtml('Description') ?></label><td>
<tr><td><label for="iEDescription"><?= $this->getHtml('Description'); ?></label><td>
<tr><td><textarea id="iEDescription" name="eDescription"></textarea><td>
<tr><td><label for="iETime"><?= $this->getHtml('TimeInMinutes') ?></label><td>
<tr><td><label for="iETime"><?= $this->getHtml('TimeInMinutes'); ?></label><td>
<tr><td><input type="number" min="0" step="1" id="iETime" name="eTime" value="0"><td>
<tr><td><label for="iEPermission"><?= $this->getHtml('Permissions') ?></label><td>
<tr><td><label for="iEPermission"><?= $this->getHtml('Permissions'); ?></label><td>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button>
<input type="text" id="iEPermission" name="ePermission"></span>
<td><button data-action=""><?= $this->getHtml('Add', '0', '0'); ?></button>
<tr><td><label for="iEFiles"><?= $this->getHtml('Files') ?></label><td>
<tr><td><label for="iEFiles"><?= $this->getHtml('Files'); ?></label><td>
<tr><td><input id="iEFiles" name="eFiles" type="file" multiple><td>
<tr><td><input type="submit" name="createChecklistElement" value="<?= $this->getHtml('Add', '0', '0'); ?>" data-action=""><td>
</table>

View File

@ -29,14 +29,14 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12">
<div class="box wf-100">
<table class="default">
<caption><?= $this->getHtml('Templates') ?><i class="fa fa-download floatRight download btn"></i></caption>
<caption><?= $this->getHtml('Templates'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td><?= $this->getHtml('Status') ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Creator') ?>
<td><?= $this->getHtml('Created') ?>
<td><?= $this->getHtml('Status'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Creator'); ?>
<td><?= $this->getHtml('Created'); ?>
<tfoot>
<tr><td colspan="5">
<tbody>

View File

@ -20,6 +20,7 @@ namespace Modules\Checklist\tests\Admin;
class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const MODULE_NAME = 'Checklist';
protected const URI_LOAD = 'http://127.0.0.1/en/backend/checklist';
use \Modules\tests\ModuleTestTrait;