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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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