Templating

This commit is contained in:
Dennis Eichhorn 2016-01-09 19:46:27 +01:00
parent 4e5b92e70c
commit 6db172956b
11 changed files with 259 additions and 172 deletions

View File

@ -68,7 +68,7 @@
"uri": "/{/lang}/backend/accounting/stack/list",
"target": "self",
"icon": null,
"order": 20,
"order": 10,
"from": 1002600000,
"permission": null,
"parent": 1002601001,
@ -108,6 +108,21 @@
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
"type": 3,
"subtype": 1,
"name": "Predefined",
"uri": "/{/lang}/backend/accounting/stack/predefined/list",
"target": "self",
"icon": null,
"order": 10,
"from": 1002600000,
"permission": null,
"parent": 1002605001,
"children": []
},
{
"id": 1002605401,
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "/{/lang}/backend/accounting/stack/create",
"target": "self",
@ -119,6 +134,23 @@
"children": []
}
]
},
{
"id": 1002606001,
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
"type": 2,
"subtype": 1,
"name": "Entries",
"uri": "/{/lang}/backend/accounting/entries/dashboard",
"target": "self",
"icon": null,
"order": 1,
"from": 1002600000,
"permission": null,
"parent": 1002601001,
"children": [
]
}
]
}

View File

@ -87,10 +87,11 @@ class Controller extends ModuleAbstract implements WebInterface
'^.*/backend/accounting/impersonal/journal/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewJournalList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/archive/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackArchiveList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/entries.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackEntries', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/archive/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackArchiveList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/stack/predefined/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewStackPredefinedList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/gl/list.*$' => [['dest' => '\Modules\Accounting\Controller:viewGLList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/accounting/gl/create.*$' => [['dest' => '\Modules\Accounting\Controller:viewGLCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
@ -177,6 +178,25 @@ class Controller extends ModuleAbstract implements WebInterface
return $view;
}
/**
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public function viewStackPredefinedList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
{
$view = new View($this->app, $request, $response);
$view->setTemplate('/Modules/Accounting/Theme/Backend/stack-predefined-list');
$view->addData('nav', $this->createNavigation(1002605001, $request, $response));
return $view;
}
/**
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response

View File

@ -22,5 +22,7 @@ $MODLANG['Navigation'] = [
'CostObjects' => 'Cost Objects',
'Creditors' => 'Creditors',
'Debitors' => 'Debitors',
'Entries' => 'Entries',
'Postings' => 'Postings',
'Predefined' => 'Predefined',
];

View File

@ -14,19 +14,36 @@
* @link http://orange-management.com
*/
$MODLANG['Accounting'] = [
'BatchPostings' => 'Batch Postings',
'CostCenter' => 'Cost Center',
'CostCenters' => 'Cost Centers',
'CostObject' => 'Cost Object',
'CostObjects' => 'Cost Objects',
'Created' => 'Created',
'Creator' => 'Creator',
'Incoming' => 'Incoming',
'GL' => 'GL',
'Name' => 'Name',
'Outgoing' => 'Outgoing',
'Parent' => 'Parent',
'Stack' => 'Stack',
'TAccount' => 'T-Account',
'Type' => 'Type',
'Account' => 'Account',
'Accounts' => 'Accounts',
'BatchPostings' => 'Batch Postings',
'Charts' => 'Charts',
'ContraAccount' => 'Contra Account',
'CostCenter' => 'Cost Center',
'CostCenters' => 'Cost Centers',
'CostObject' => 'Cost Object',
'CostObjects' => 'Cost Objects',
'Created' => 'Created',
'Creator' => 'Creator',
'Credit' => 'Credit',
'Debit' => 'Debit',
'Due' => 'Due',
'Entries' => 'Entries',
'EntryDate' => 'Entry Date',
'Evaluation' => 'Evaluation',
'ExternalVoucher' => 'External Voucher',
'Incoming' => 'Incoming',
'GL' => 'GL',
'List' => 'List',
'Name' => 'Name',
'Outgoing' => 'Outgoing',
'Parent' => 'Parent',
'Receipt' => 'Receipt',
'ReceiptDate' => 'Receipt Date',
'Stack' => 'Stack',
'TAccount' => 'T-Account',
'Text' => 'Text',
'To' => 'To',
'Total' => 'Total',
'Type' => 'Type',
];

View File

@ -1,33 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.0
*
* @category TBD
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright 2013 Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://orange-management.com
*/
echo $this->getData('nav')->render(); ?>
<section class="box w-50">
<h1><?= $this->l11n->lang['Accounting']['CostCenter']; ?></h1>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td><label for="iId"><?= $this->l11n->lang[0]['ID']; ?></label>
<tr><td><input type="text" id="iId" name="id">
<tr><td><label for="iName"><?= $this->l11n->lang['Accounting']['Name']; ?></label>
<tr><td><input type="text" id="iName" name="name">
<tr><td><label for="iParent"><?= $this->l11n->lang['Accounting']['Parent']; ?></label>
<tr><td><input type="text" id="iParent" name="parent">
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Create']; ?>">
</table>
</form>
</div>
</section>

View File

@ -1,16 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.0
*
* @category TBD
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright 2013 Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://orange-management.com
*/
echo $this->getData('nav')->render(); ?>

View File

@ -1,33 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.0
*
* @category TBD
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright 2013 Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://orange-management.com
*/
echo $this->getData('nav')->render(); ?>
<section class="box w-50">
<h1><?= $this->l11n->lang['Accounting']['CostObject']; ?></h1>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td><label for="iId"><?= $this->l11n->lang[0]['ID']; ?></label>
<tr><td><input type="text" id="iId" name="id">
<tr><td><label for="iName"><?= $this->l11n->lang['Accounting']['Name']; ?></label>
<tr><td><input type="text" id="iName" name="name">
<tr><td><label for="iParent"><?= $this->l11n->lang['Accounting']['Parent']; ?></label>
<tr><td><input type="text" id="iParent" name="parent">
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Create']; ?>">
</table>
</form>
</div>
</section>

View File

@ -1,52 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.0
*
* @category TBD
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright 2013 Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://orange-management.com
*/
/**
* @var \phpOMS\Views\View $this
*/
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
$footerView->setPages(1 / 25);
$footerView->setPage(1);
$footerView->setResults(1);
echo $this->getData('nav')->render(); ?>
<section class="box w-100">
<table class="table">
<caption><?= $this->l11n->lang['Accounting']['CostObjects']; ?></caption>
<thead>
<tr>
<td><?= $this->l11n->lang[0]['ID']; ?>
<td class="wf-100"><?= $this->l11n->lang['Accounting']['Name']; ?>
<tfoot>
<tr><td colspan="5"><?= $footerView->render(); ?>
<tbody>
<?php $c = 0; foreach ([] as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td>
<td>
<td>
<?php endforeach; ?>
<?php if($c === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<?php endif; ?>
</table>
</section>

View File

@ -1,16 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.0
*
* @category TBD
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright 2013 Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://orange-management.com
*/
echo $this->getData('nav')->render(); ?>

View File

@ -13,4 +13,167 @@
* @version 1.0.0
* @link http://orange-management.com
*/
echo $this->getData('nav')->render(); ?>
//echo $this->getData('nav')->render();
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
$footerView->setPages(1 / 25);
$footerView->setPage(1);
$footerView->setResults(1);
?>
<section class="box w-100">
<div class="inner">
<form>
<table class="layout wf-100">
<tr>
<td><label for="iAccountStart"><?= $this->l11n->lang['Accounting']['Account']; ?></label>
<td><label for="iAccountStart"><?= $this->l11n->lang['Accounting']['CostCenter']; ?>
<td><label for="iAccountStart"><?= $this->l11n->lang['Accounting']['CostObject']; ?>
<td><label for="iAccountStart"><?= $this->l11n->lang['Accounting']['EntryDate']; ?>
<tr>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i>
</button><input type="number" id="iId" min="1" name="id" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i>
</button><input type="number" id="iId" min="1" name="id" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i>
</button><input type="number" id="iId" min="1" name="id" required></span>
<td><input type="datetime-local" id="iId" min="1" name="id" required>
<tr>
<td><label for="iAccountStart"><?= $this->l11n->lang['Accounting']['To']; ?></label>
<td><label for="iAccountStart"><?= $this->l11n->lang['Accounting']['To']; ?>
<td><label for="iAccountStart"><?= $this->l11n->lang['Accounting']['To']; ?>
<td><label for="iAccountStart"><?= $this->l11n->lang['Accounting']['To']; ?>
<tr>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i>
</button><input type="number" id="iId" min="1" name="id" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i>
</button><input type="number" id="iId" min="1" name="id" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i>
</button><input type="number" id="iId" min="1" name="id" required></span>
<td><input type="datetime-local" id="iId" min="1" name="id" required>
<tr>
<td colspan="4"><input type="submit" value="<?= $this->l11n->lang[0]['Search'] ?>">
</table>
</form>
</div>
</section>
<section class="box w-100">
<div class="tabular-2">
<ul class="tab-links">
<li><label for="c-tab2-1"><?= $this->l11n->lang['Accounting']['List']; ?></label></li>
<li><label for="c-tab2-2"><?= $this->l11n->lang['Accounting']['Evaluation']; ?></label></li>
<li><label for="c-tab2-3"><?= $this->l11n->lang['Accounting']['Charts']; ?></label></li>
</ul>
<div class="tab-content">
<input type="radio" id="c-tab2-1" name="tabular-2" checked>
<div class="tab">
<section class="wf-100">
<table class="table">
<caption><?= $this->l11n->lang['Accounting']['Entries'] ?></caption>
<thead>
<tr>
<td><?= $this->l11n->lang['Accounting']['EntryDate']; ?>
<td><?= $this->l11n->lang['Accounting']['Receipt']; ?>
<td><?= $this->l11n->lang['Accounting']['Debit']; ?>
<td><?= $this->l11n->lang['Accounting']['Credit']; ?>
<td class="wf-100"><?= $this->l11n->lang['Accounting']['Text']; ?>
<td><?= $this->l11n->lang['Accounting']['Account']; ?>
<td><?= $this->l11n->lang['Accounting']['ContraAccount']; ?>
<td><?= $this->l11n->lang['Accounting']['CostCenter']; ?>
<td><?= $this->l11n->lang['Accounting']['CostObject']; ?>
<td><?= $this->l11n->lang['Accounting']['ReceiptDate']; ?>
<td><?= $this->l11n->lang['Accounting']['ExternalVoucher']; ?>
<td><?= $this->l11n->lang['Accounting']['Creator']; ?>
<td><?= $this->l11n->lang['Accounting']['Created']; ?>
<tfoot>
<tr>
<td colspan="13"><?= $footerView->render(); ?>
<tbody>
<?php $count = 0;
foreach ([] as $key => $value) : $count++; ?>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr>
<td colspan="13" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<?php endif; ?>
</table>
</section>
</div>
<input type="radio" id="c-tab2-2" name="tabular-2">
<div class="tab tab-2">
<section class="box w-33 floatLeft">
<table class="table">
<caption><?= $this->l11n->lang['Accounting']['Accounts'] ?></caption>
<thead>
<tr>
<td><?= $this->l11n->lang['Accounting']['Account']; ?>
<td class="wf-100"><?= $this->l11n->lang['Accounting']['Name']; ?>
<td><?= $this->l11n->lang['Accounting']['Total']; ?>
<tbody>
<?php $count = 0;
foreach ([] as $key => $value) : $count++; ?>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr>
<td colspan="13" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<?php endif; ?>
</table>
</section>
<section class="box w-33 floatLeft">
<table class="table floatLeft">
<caption><?= $this->l11n->lang['Accounting']['CostCenter'] ?></caption>
<thead>
<tr>
<td><?= $this->l11n->lang['Accounting']['CostCenter']; ?>
<td class="wf-100"><?= $this->l11n->lang['Accounting']['Name']; ?>
<td><?= $this->l11n->lang['Accounting']['Total']; ?>
<tbody>
<?php $count = 0;
foreach ([] as $key => $value) : $count++; ?>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr>
<td colspan="13" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<?php endif; ?>
</table>
</section>
<section class="box w-33 floatLeft">
<table class="table">
<caption><?= $this->l11n->lang['Accounting']['CostObject'] ?></caption>
<thead>
<tr>
<td><?= $this->l11n->lang['Accounting']['Account']; ?>
<td class="wf-100"><?= $this->l11n->lang['Accounting']['Name']; ?>
<td><?= $this->l11n->lang['Accounting']['Total']; ?>
<tbody>
<?php $count = 0;
foreach ([] as $key => $value) : $count++; ?>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr>
<td colspan="13" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<?php endif; ?>
</table>
</section>
</div>
<input type="radio" id="c-tab2-3" name="tabular-2">
<div class="tab tab-3">
<section class="box w-50 floatLeft">
<div class="inner">
</div>
</section>
<section class="box w-50 floatLeft">
<div class="inner">
</div>
</section>
<section class="box w-50 floatLeft">
<div class="inner">
</div>
</section>
</div>
</div>
</div>
</section>

View File

@ -28,11 +28,14 @@ echo $this->getData('nav')->render(); ?>
<section class="box w-100">
<table class="table">
<caption><?= $this->l11n->lang['Accounting']['CostCenters']; ?></caption>
<caption><?= $this->l11n->lang['Accounting']['BatchPostings']; ?></caption>
<thead>
<tr>
<td><?= $this->l11n->lang[0]['ID']; ?>
<td><?= $this->l11n->lang['Accounting']['Due']; ?>
<td class="wf-100"><?= $this->l11n->lang['Accounting']['Name']; ?>
<td><?= $this->l11n->lang['Accounting']['Creator']; ?>
<td><?= $this->l11n->lang['Accounting']['Created']; ?>
<tfoot>
<tr><td colspan="5"><?= $footerView->render(); ?>
<tbody>