Organization tpl flexbox integration

This commit is contained in:
Dennis Eichhorn 2017-01-29 10:29:35 +01:00
parent 2de2b27a1c
commit c1cbc56c9c
8 changed files with 197 additions and 165 deletions

View File

@ -19,22 +19,26 @@
echo $this->getData('nav')->render(); ?>
<section class="box w-33">
<header><h1><?= $this->getText('Department'); ?></h1></header>
<div class="inner">
<form id="fDepartmentCreate" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/base}{/rootPath}{/lang}/api/organization/department'); ?>">
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; R&D" required>
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" name="parent" id="iParent"></span>
<tr><td><label for="iUnit"><?= $this->getText('Unit'); ?></label>
<tr><td><select name="unit" id="iUnit">
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription" placeholder="&#xf040;"></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">
</table>
</form>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getText('Department'); ?></h1></header>
<div class="inner">
<form id="fDepartmentCreate" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/base}{/rootPath}{/lang}/api/organization/department'); ?>">
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; R&D" required>
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" name="parent" id="iParent"></span>
<tr><td><label for="iUnit"><?= $this->getText('Unit'); ?></label>
<tr><td><select name="unit" id="iUnit">
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription" placeholder="&#xf040;"></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">
</table>
</form>
</div>
</section>
</div>
</section>
</div>

View File

@ -26,29 +26,33 @@ $footerView->setResults(1);
echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="table">
<caption><?= $this->getText('Departments'); ?></caption>
<thead>
<tr>
<td><?= $this->getText('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Name'); ?>
<td><?= $this->getText('Parent'); ?>
<td><?= $this->getText('Unit'); ?>
<tfoot>
<tr><td colspan="4"><?= $footerView->render(); ?>
<tbody>
<?php $c = 0; foreach ($this->getData('list:elements') as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/organization/department/profile?id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getUnit(); ?></a>
<?php endforeach; ?>
<?php if($c === 0) : ?>
<tr>
<td colspan="4" class="empty"><?= $this->getText('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</div>
<div class="row">
<div class="col-xs-12">
<div class="box wf-100">
<table class="table">
<caption><?= $this->getText('Departments'); ?></caption>
<thead>
<tr>
<td><?= $this->getText('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Name'); ?>
<td><?= $this->getText('Parent'); ?>
<td><?= $this->getText('Unit'); ?>
<tfoot>
<tr><td colspan="4"><?= $footerView->render(); ?>
<tbody>
<?php $c = 0; foreach ($this->getData('list:elements') as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/organization/department/profile?id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getUnit(); ?></a>
<?php endforeach; ?>
<?php if($c === 0) : ?>
<tr>
<td colspan="4" class="empty"><?= $this->getText('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</div>
</div>
</div>

View File

@ -21,24 +21,28 @@ $department = $this->getData('department');
echo $this->getData('nav')->render(); ?>
<section class="box w-33">
<header><h1><?= $this->getText('Department'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $department->getName(); ?>">
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><input type="text" name="parent" id="iParent" value="<?= $department->getParent(); ?>">
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option><?= $this->getText('Active'); ?>
<option><?= $this->getText('Inactive'); ?>
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription"><?= $department->getDescription(); ?></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Save', 0) ?>">
</table>
</form>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getText('Department'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $department->getName(); ?>">
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><input type="text" name="parent" id="iParent" value="<?= $department->getParent(); ?>">
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option><?= $this->getText('Active'); ?>
<option><?= $this->getText('Inactive'); ?>
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription"><?= $department->getDescription(); ?></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Save', 0) ?>">
</table>
</form>
</div>
</section>
</div>
</section>
</div>

View File

@ -19,24 +19,28 @@
echo $this->getData('nav')->render(); ?>
<section class="box w-33">
<header><h1><?= $this->getText('Position'); ?></h1></header>
<div class="inner">
<form id="fPositionCreate" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/base}{/rootPath}{/lang}/api/organization/position'); ?>">
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" name="parent" id="iParent"></span>
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= \Modules\Organization\Models\Status::ACTIVE; ?>"><?= $this->getText('Active'); ?>
<option value="<?= \Modules\Organization\Models\Status::INACTIVE; ?>"><?= $this->getText('Inactive'); ?>
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription" placeholder="&#xf040;"></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">
</table>
</form>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getText('Position'); ?></h1></header>
<div class="inner">
<form id="fPositionCreate" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/base}{/rootPath}{/lang}/api/organization/position'); ?>">
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" name="parent" id="iParent"></span>
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= \Modules\Organization\Models\Status::ACTIVE; ?>"><?= $this->getText('Active'); ?>
<option value="<?= \Modules\Organization\Models\Status::INACTIVE; ?>"><?= $this->getText('Inactive'); ?>
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription" placeholder="&#xf040;"></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">
</table>
</form>
</div>
</section>
</div>
</section>
</div>

View File

@ -28,26 +28,30 @@ $listElements = $this->getData('list:elements') ?? [];
echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="table">
<caption><?= $this->getText('Positions'); ?></caption>
<thead>
<tr>
<td><?= $this->getText('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Name'); ?>
<td><?= $this->getText('Parent'); ?>
<tfoot>
<tr><td colspan="3"><?= $footerView->render(); ?>
<tbody>
<?php $count = 0; foreach($listElements as $key => $value) : $count++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/organization/position/profile?id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
<?php endforeach; ?>
<?php if($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?>
<?php endif; ?>
</table>
<div class="row">
<div class="col-xs-12">
<div class="box wf-100">
<table class="table">
<caption><?= $this->getText('Positions'); ?></caption>
<thead>
<tr>
<td><?= $this->getText('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Name'); ?>
<td><?= $this->getText('Parent'); ?>
<tfoot>
<tr><td colspan="3"><?= $footerView->render(); ?>
<tbody>
<?php $count = 0; foreach($listElements as $key => $value) : $count++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/organization/position/profile?id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
<?php endforeach; ?>
<?php if($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</div>
</div>
</div>

View File

@ -19,24 +19,28 @@
echo $this->getData('nav')->render(); ?>
<section class="box w-33">
<header><h1><?= $this->getText('Unit'); ?></h1></header>
<div class="inner">
<form id="fUnitCreate" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/base}{/rootPath}{/lang}/api/organization/unit'); ?>">
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" name="parent" id="iParent"></span>
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= \Modules\Organization\Models\Status::ACTIVE; ?>"><?= $this->getText('Active'); ?>
<option value="<?= \Modules\Organization\Models\Status::INACTIVE; ?>"><?= $this->getText('Inactive'); ?>
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription" placeholder="&#xf040;"></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">
</table>
</form>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getText('Unit'); ?></h1></header>
<div class="inner">
<form id="fUnitCreate" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/base}{/rootPath}{/lang}/api/organization/unit'); ?>">
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" name="parent" id="iParent"></span>
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= \Modules\Organization\Models\Status::ACTIVE; ?>"><?= $this->getText('Active'); ?>
<option value="<?= \Modules\Organization\Models\Status::INACTIVE; ?>"><?= $this->getText('Inactive'); ?>
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription" placeholder="&#xf040;"></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">
</table>
</form>
</div>
</section>
</div>
</section>
</div>

View File

@ -26,23 +26,27 @@ $footerView->setResults(1);
echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="table">
<caption><?= $this->getText('Units'); ?></caption>
<thead>
<tr>
<td><?= $this->getText('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Name'); ?>
<td><?= $this->getText('Parent'); ?>
<tfoot>
<tr><td colspan="3"><?= $footerView->render(); ?>
<tbody>
<?php foreach ($this->getData('list:elements') as $key => $value) :
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/organization/unit/profile?id=' . $value->getId()); ?>
<tr>
<td data-label="<?= $this->getText('ID', 0, 0); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td data-label="<?= $this->getText('Name'); ?>"><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td data-label="<?= $this->getText('Parent'); ?>"><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
<?php endforeach; ?>
</table>
<div class="row">
<div class="col-xs-12">
<div class="box wf-100">
<table class="table">
<caption><?= $this->getText('Units'); ?></caption>
<thead>
<tr>
<td><?= $this->getText('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Name'); ?>
<td><?= $this->getText('Parent'); ?>
<tfoot>
<tr><td colspan="3"><?= $footerView->render(); ?>
<tbody>
<?php foreach ($this->getData('list:elements') as $key => $value) :
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/organization/unit/profile?id=' . $value->getId()); ?>
<tr>
<td data-label="<?= $this->getText('ID', 0, 0); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td data-label="<?= $this->getText('Name'); ?>"><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td data-label="<?= $this->getText('Parent'); ?>"><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
<?php endforeach; ?>
</table>
</div>
</div>
</div>

View File

@ -21,24 +21,28 @@ $unit = $this->getData('unit');
echo $this->getData('nav')->render(); ?>
<section class="box w-33">
<header><h1><?= $this->getText('Unit'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $unit->getName(); ?>">
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" name="parent" id="iParent" value="<?= $unit->getParent(); ?>" required></span>
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option><?= $this->getText('Active'); ?>
<option><?= $this->getText('Inactive'); ?>
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription"><?= $unit->getDescription(); ?></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Save', 0) ?>">
</table>
</form>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $this->getText('Unit'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $unit->getName(); ?>">
<tr><td><label for="iParent"><?= $this->getText('Parent'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" name="parent" id="iParent" value="<?= $unit->getParent(); ?>" required></span>
<tr><td><label for="iStatus"><?= $this->getText('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option><?= $this->getText('Active'); ?>
<option><?= $this->getText('Inactive'); ?>
</select>
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea name="description" id="iDescription"><?= $unit->getDescription(); ?></textarea>
<tr><td><input type="submit" value="<?= $this->getText('Save', 0) ?>">
</table>
</form>
</div>
</section>
</div>
</section>
</div>