autofixes

This commit is contained in:
Dennis Eichhorn 2020-08-30 20:13:11 +02:00
parent 616e73d48b
commit e4a24ea73b
7 changed files with 16 additions and 14 deletions

View File

@ -25,7 +25,7 @@ use phpOMS\Localization\ISO639x1Enum;
* @link https://orange-management.org
* @since 1.0.0
*/
class L11nTag implements ArrayableInterface, \JsonSerializable
class L11nTag implements \JsonSerializable, ArrayableInterface
{
/**
* Article ID.

View File

@ -27,7 +27,7 @@ use phpOMS\Localization\ISO639x1Enum;
* @link https://orange-management.org
* @since 1.0.0
*/
class Tag implements ArrayableInterface, \JsonSerializable
class Tag implements \JsonSerializable, ArrayableInterface
{
/**
* Article ID.

View File

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

View File

@ -20,12 +20,12 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="fUnitCreate" method="put" action="<?= UriFactory::build('{/api}tag'); ?>">
<div class="portlet-head"><?= $this->getHtml('Tag') ?></div>
<div class="portlet-head"><?= $this->getHtml('Tag'); ?></div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iTitle"><?= $this->getHtml('Title') ?></label>
<tr><td><label for="iTitle"><?= $this->getHtml('Title'); ?></label>
<tr><td><input type="text" name="title" id="iTitle" placeholder="&#xf040; oms" required>
<tr><td><label for="iColor"><?= $this->getHtml('Color') ?></label>
<tr><td><label for="iColor"><?= $this->getHtml('Color'); ?></label>
<tr><td><input type="color" name="color" id="iColor"required>
</table>
</div>

View File

@ -27,18 +27,18 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Tags') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('Tags'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<thead>
<tr>
<td class="wf-100"><?= $this->getHtml('Title') ?>
<td class="wf-100"><?= $this->getHtml('Color') ?>
<td class="wf-100"><?= $this->getHtml('Title'); ?>
<td class="wf-100"><?= $this->getHtml('Color'); ?>
<tbody>
<?php $count = 0; foreach ($tags as $key => $value) : ++$count;
$url = UriFactory::build('{/prefix}tag/single?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getTitle()); ?></a>
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><span class="tag" style="background: <?= $this->printHtml(\substr($value->getColor(), 0, 7)); ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></a>
<td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getTitle()); ?></a>
<td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><span class="tag" style="background: <?= $this->printHtml(\substr($value->getColor(), 0, 7)); ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -24,12 +24,12 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="fUnitCreate" method="put" action="<?= UriFactory::build('{/api}tag'); ?>">
<div class="portlet-head"><?= $this->getHtml('Tag') ?></div>
<div class="portlet-head"><?= $this->getHtml('Tag'); ?></div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iTitle"><?= $this->getHtml('Title') ?></label>
<tr><td><label for="iTitle"><?= $this->getHtml('Title'); ?></label>
<tr><td><input type="text" name="title" id="iTitle" placeholder="&#xf040; oms" value="<?= $this->printHtml($tag->getTitle()); ?>" required>
<tr><td><label for="iColor"><?= $this->getHtml('Color') ?></label>
<tr><td><label for="iColor"><?= $this->getHtml('Color'); ?></label>
<tr><td><input type="color" name="color" id="iColor" value="<?= $this->printHtml(\substr($tag->getColor(), 0, 7)); ?>" required>
</table>
</div>
@ -42,7 +42,7 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12 col-md-6">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Language', '0', '0') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('Language', '0', '0'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<thead>
<tr>

View File

@ -20,6 +20,7 @@ namespace Modules\Tag\tests\Admin;
class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const MODULE_NAME = 'Tag';
protected const URI_LOAD = '';
use \Modules\tests\ModuleTestTrait;