draft tags and portlets

This commit is contained in:
Dennis Eichhorn 2020-03-01 15:00:33 +01:00
parent 8d90fcdca9
commit edb12b49a1
10 changed files with 84 additions and 67 deletions

View File

@ -12,18 +12,19 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** /**
* @var \phpOMS\Views\View $this * @var \phpOMS\Views\View $this
*/ */
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <div class="portlet">
<header><h1><?= $this->getHtml('Department') ?></h1></header> <form id="fDepartmentCreate" method="PUT" action="<?= UriFactory::build('{/api}{/rootPath}{/lang}/api/organization/department'); ?>">
<div class="inner"> <div class="portlet-head"><?= $this->getHtml('Department') ?></div>
<form id="fDepartmentCreate" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}{/rootPath}{/lang}/api/organization/department'); ?>"> <div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed"> <table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label> <tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; R&D" required> <tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; R&D" required>
@ -34,11 +35,13 @@ echo $this->getData('nav')->render(); ?>
<tr><td><label for="iDescription"><?= $this->getHtml('Description') ?></label> <tr><td><label for="iDescription"><?= $this->getHtml('Description') ?></label>
<tr><td><?= $this->getData('editor')->render('department-editor'); ?> <tr><td><?= $this->getData('editor')->render('department-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('department-editor', 'description', 'fDepartmentCreate'); ?> <tr><td><?= $this->getData('editor')->getData('text')->render('department-editor', 'description', 'fDepartmentCreate'); ?>
<tr><td><input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</table> </table>
</form> </div>
</div> <div class="portlet-foot">
</section> <input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</div>
</form>
</div>
</div> </div>
</div> </div>

View File

@ -22,17 +22,15 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box wf-100"> <div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Departments') ?><i class="fa fa-download floatRight download btn"></i></div>
<table id="departmentList" class="default"> <table id="departmentList" class="default">
<caption><?= $this->getHtml('Departments') ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getHtml('ID', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td><?= $this->getHtml('ID', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td class="wf-100"><?= $this->getHtml('Name') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td class="wf-100"><?= $this->getHtml('Name') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Parent') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td><?= $this->getHtml('Parent') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Unit') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td><?= $this->getHtml('Unit') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tfoot>
<tr><td colspan="4">
<tbody> <tbody>
<?php $c = 0; foreach ($departments as $key => $value) : ++$c; <?php $c = 0; foreach ($departments as $key => $value) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/department/profile?{?}&id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/department/profile?{?}&id=' . $value->getId()); ?>
@ -47,6 +45,7 @@ echo $this->getData('nav')->render(); ?>
<td colspan="4" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <td colspan="4" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
<div class="portlet-foot"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -12,6 +12,8 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** /**
* @var \phpOMS\Views\View $this * @var \phpOMS\Views\View $this
* @var \Mouldes\Organization\Models $department; * @var \Mouldes\Organization\Models $department;
@ -22,10 +24,10 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <div class="portlet">
<header><h1><?= $this->getHtml('Department') ?></h1></header> <form id="iDepartment" action="<?= UriFactory::build('{/api}organization/department?{?}') ?>" method="POST">
<div class="inner"> <div class="portlet-head"><?= $this->getHtml('Department') ?></div>
<form id="iDepartment" action="<?= \phpOMS\Uri\UriFactory::build('{/api}organization/department?{?}') ?>" method="POST"> <div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed"> <table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label> <tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($department->getName()); ?>"> <tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($department->getName()); ?>">
@ -46,11 +48,13 @@ echo $this->getData('nav')->render(); ?>
$department->getDescriptionRaw(), $department->getDescriptionRaw(),
$department->getDescription() $department->getDescription()
); ?> ); ?>
<tr><td><input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</table> </table>
</form> </div>
</div> <div class="portlet-foot">
</section> <input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</div>
</form>
</div>
</div> </div>
</div> </div>

View File

@ -12,18 +12,19 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** /**
* @var \phpOMS\Views\View $this * @var \phpOMS\Views\View $this
*/ */
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <div class="portlet">
<header><h1><?= $this->getHtml('Position') ?></h1></header> <form id="fPositionCreate" method="POST" action="<?= UriFactory::build('{/api}{/rootPath}{/lang}/api/organization/position'); ?>">
<div class="inner"> <div class="portlet-head"><?= $this->getHtml('Position') ?></div>
<form id="fPositionCreate" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/api}{/rootPath}{/lang}/api/organization/position'); ?>"> <div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed"> <table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label> <tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required> <tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
@ -38,11 +39,13 @@ echo $this->getData('nav')->render(); ?>
</select> </select>
<tr><td><?= $this->getData('editor')->render('position-editor'); ?> <tr><td><?= $this->getData('editor')->render('position-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('position-editor', 'description', 'fPositionCreate'); ?> <tr><td><?= $this->getData('editor')->getData('text')->render('position-editor', 'description', 'fPositionCreate'); ?>
<tr><td><input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</table> </table>
</form> </div>
</div> <div class="portlet-foot">
</section> <input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</div>
</form>
</div>
</div> </div>
</div> </div>

View File

@ -22,17 +22,15 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box wf-100"> <div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Positions') ?><i class="fa fa-download floatRight download btn"></i></div>
<table id="positionList" class="default"> <table id="positionList" class="default">
<caption><?= $this->getHtml('Positions') ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getHtml('ID', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td><?= $this->getHtml('ID', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td class="wf-100"><?= $this->getHtml('Name') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td class="wf-100"><?= $this->getHtml('Name') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Parent') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td><?= $this->getHtml('Parent') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Department') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td><?= $this->getHtml('Department') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tfoot>
<tr><td colspan="3">
<tbody> <tbody>
<?php $count = 0; foreach ($positions as $key => $value) : ++$count; <?php $count = 0; foreach ($positions as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/position/profile?{?}&id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/position/profile?{?}&id=' . $value->getId()); ?>
@ -46,6 +44,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
<div class="portlet-foot"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -12,6 +12,8 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** /**
* @var \phpOMS\Views\View $this * @var \phpOMS\Views\View $this
* @var \Modules\Organization\Models\Position; * @var \Modules\Organization\Models\Position;
@ -22,10 +24,10 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <div class="portlet">
<header><h1><?= $this->getHtml('Position') ?></h1></header> <form id="iPosition" action="<?= UriFactory::build('{/api}organization/position?{?}') ?>" method="POST">
<div class="inner"> <div class="portlet-head"><?= $this->getHtml('Position') ?></div>
<form id="iPosition" action="<?= \phpOMS\Uri\UriFactory::build('{/api}organization/position?{?}') ?>" method="POST"> <div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed"> <table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label> <tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($position->getName()); ?>"> <tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($position->getName()); ?>">
@ -46,11 +48,13 @@ echo $this->getData('nav')->render(); ?>
$position->getDescriptionRaw(), $position->getDescriptionRaw(),
$position->getDescription() $position->getDescription()
); ?> ); ?>
<tr><td><input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</table> </table>
</form> </div>
</div> <div class="portlet-foot">
</section> <input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</div>
</form>
</div>
</div> </div>
</div> </div>

View File

@ -12,18 +12,19 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** /**
* @var \phpOMS\Views\View $this * @var \phpOMS\Views\View $this
*/ */
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <div class="portlet">
<header><h1><?= $this->getHtml('Unit') ?></h1></header> <form id="fUnitCreate" method="put" action="<?= UriFactory::build('{/api}organization/unit'); ?>">
<div class="inner"> <div class="portlet-head"><?= $this->getHtml('Unit') ?></div>
<form id="fUnitCreate" method="put" action="<?= \phpOMS\Uri\UriFactory::build('{/api}organization/unit'); ?>"> <div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed"> <table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label> <tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required> <tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
@ -39,11 +40,13 @@ echo $this->getData('nav')->render(); ?>
</select> </select>
<tr><td><?= $this->getData('editor')->render('unit-editor'); ?> <tr><td><?= $this->getData('editor')->render('unit-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('unit-editor', 'description', 'fUnitCreate'); ?> <tr><td><?= $this->getData('editor')->getData('text')->render('unit-editor', 'description', 'fUnitCreate'); ?>
<tr><td><input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</table> </table>
</form> </div>
</div> <div class="portlet-foot">
</section> <input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</div>
</form>
</div>
</div> </div>
</div> </div>

View File

@ -22,16 +22,14 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box wf-100"> <div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Units') ?><i class="fa fa-download floatRight download btn"></i></div>
<table id="unitList" class="default"> <table id="unitList" class="default">
<caption><?= $this->getHtml('Units') ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getHtml('ID', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td><?= $this->getHtml('ID', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td class="wf-100"><?= $this->getHtml('Name') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td class="wf-100"><?= $this->getHtml('Name') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Parent') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <td><?= $this->getHtml('Parent') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tfoot>
<tr><td colspan="3">
<tbody> <tbody>
<?php foreach ($units as $key => $value) : <?php foreach ($units as $key => $value) :
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit/profile?{?}&id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit/profile?{?}&id=' . $value->getId()); ?>
@ -41,6 +39,7 @@ echo $this->getData('nav')->render(); ?>
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a> <td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
<div class="portlet-foot"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -12,6 +12,8 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** /**
* @var \phpOMS\Views\View $this * @var \phpOMS\Views\View $this
* @var \Modules\Organization\Models\Unit $unit; * @var \Modules\Organization\Models\Unit $unit;
@ -22,10 +24,10 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <div class="portlet">
<header><h1><?= $this->getHtml('Unit') ?></h1></header> <form id="iUnit" action="<?= UriFactory::build('{/api}organization/unit') ?>" method="post">
<div class="inner"> <div class="portlet-head"><?= $this->getHtml('Unit') ?></div>
<form id="iUnit" action="<?= \phpOMS\Uri\UriFactory::build('{/api}organization/unit') ?>" method="post"> <div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed"> <table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label> <tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($unit->getName()); ?>"> <tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($unit->getName()); ?>">
@ -44,13 +46,14 @@ echo $this->getData('nav')->render(); ?>
$unit->getDescriptionRaw(), $unit->getDescriptionRaw(),
$unit->getDescription() $unit->getDescription()
); ?> ); ?>
<tr><td>
<input id="iUnitId" name="id" type="hidden" value="<?= (int) $unit->getId(); ?>">
<input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</table> </table>
</form> </div>
</div> <div class="portlet-foot">
</section> <input id="iUnitId" name="id" type="hidden" value="<?= (int) $unit->getId(); ?>">
<input id="iSubmit" name="submit" type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
</div>
</form>
</div>
</div> </div>
</div> </div>

View File

@ -14,7 +14,7 @@
"name": "Orange Management", "name": "Orange Management",
"website": "www.spl1nes.com" "website": "www.spl1nes.com"
}, },
"description": "The buisness module.", "description": "The business module.",
"directory": "Organization", "directory": "Organization",
"dependencies": { "dependencies": {
"Admin": "1.0.0", "Admin": "1.0.0",
@ -31,7 +31,7 @@
"type": 4, "type": 4,
"for": "Organization", "for": "Organization",
"file": "Organization", "file": "Organization",
"from": "Admin" "from": "Organization"
}, },
{ {
"pid": [ "pid": [