mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-01-31 08:58:41 +00:00
Language display optimized
Language is now no longer direct array access but provided through a function. This can be later used to hot load language files instead of pre-loading them.
This commit is contained in:
parent
eadb3b4841
commit
d2015ea93c
|
|
@ -20,20 +20,20 @@
|
|||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-33">
|
||||
<header><h1><?= $this->l11n->lang['Organization']['Department']; ?></h1></header>
|
||||
<header><h1><?= $this->l11n->getText('Organization', 'Department'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iName"><?= $this->l11n->lang['Organization']['Name']; ?></label>
|
||||
<tr><td><label for="iName"><?= $this->l11n->getText('Organization', 'Name'); ?></label>
|
||||
<tr><td><input type="text" name="name" id="iName" placeholder=" R&D" required>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->lang['Organization']['Parent']; ?></label>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->getText('Organization', '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->l11n->lang['Organization']['Unit']; ?></label>
|
||||
<tr><td><label for="iUnit"><?= $this->l11n->getText('Organization', 'Unit'); ?></label>
|
||||
<tr><td><select name="unit" id="iUnit">
|
||||
</select>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->lang['Organization']['Description']; ?></label>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->getText('Organization', 'Description'); ?></label>
|
||||
<tr><td><textarea name="description" id="iDescription" placeholder=""></textarea>
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Create'] ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Create') ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ echo $this->getData('nav')->render(); ?>
|
|||
|
||||
<div class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->l11n->lang['Organization']['Departments']; ?></caption>
|
||||
<caption><?= $this->l11n->getText('Organization', 'Departments'); ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->l11n->lang[0]['ID']; ?>
|
||||
<td class="wf-100"><?= $this->l11n->lang['Organization']['Name']; ?>
|
||||
<td><?= $this->l11n->lang['Organization']['Parent']; ?>
|
||||
<td><?= $this->l11n->lang['Organization']['Unit']; ?>
|
||||
<td><?= $this->l11n->getText(0, 'ID'); ?>
|
||||
<td class="wf-100"><?= $this->l11n->getText('Organization', 'Name'); ?>
|
||||
<td><?= $this->l11n->getText('Organization', 'Parent'); ?>
|
||||
<td><?= $this->l11n->getText('Organization', 'Unit'); ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="4"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
|
|
@ -48,7 +48,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php endforeach; ?>
|
||||
<?php if($c === 0) : ?>
|
||||
<tr>
|
||||
<td colspan="4" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
|
||||
<td colspan="4" class="empty"><?= $this->l11n->getText(0, 'Empty'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,22 +22,22 @@ $department = $this->getData('department');
|
|||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-33">
|
||||
<h1><?= $this->l11n->lang['Organization']['Position']; ?></h1>
|
||||
<h1><?= $this->l11n->getText('Organization', 'Position'); ?></h1>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iName"><?= $this->l11n->lang['Organization']['Name']; ?></label>
|
||||
<tr><td><label for="iName"><?= $this->l11n->getText('Organization', 'Name'); ?></label>
|
||||
<tr><td><input type="text" name="name" id="iName" value="<?= $department->getName(); ?>">
|
||||
<tr><td><label for="iParent"><?= $this->l11n->lang['Organization']['Parent']; ?></label>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->getText('Organization', 'Parent'); ?></label>
|
||||
<tr><td><input type="text" name="parent" id="iParent" value="<?= $department->getParent(); ?>">
|
||||
<tr><td><label for="iStatus"><?= $this->l11n->lang['Organization']['Status']; ?></label>
|
||||
<tr><td><label for="iStatus"><?= $this->l11n->getText('Organization', 'Status'); ?></label>
|
||||
<tr><td><select name="status" id="iStatus">
|
||||
<option><?= $this->l11n->lang['Organization']['Active']; ?>
|
||||
<option><?= $this->l11n->lang['Organization']['Inactive']; ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Active'); ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Inactive'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->lang['Organization']['Description']; ?></label>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->getText('Organization', 'Description'); ?></label>
|
||||
<tr><td><textarea name="description" id="iDescription"><?= $department->getDescription(); ?></textarea>
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Save'] ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Save') ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,22 +20,22 @@
|
|||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-33">
|
||||
<header><h1><?= $this->l11n->lang['Organization']['Position']; ?></h1></header>
|
||||
<header><h1><?= $this->l11n->getText('Organization', 'Position'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iName"><?= $this->l11n->lang['Organization']['Name']; ?></label>
|
||||
<tr><td><label for="iName"><?= $this->l11n->getText('Organization', 'Name'); ?></label>
|
||||
<tr><td><input type="text" name="name" id="iName" placeholder=" Orange Management" required>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->lang['Organization']['Parent']; ?></label>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->getText('Organization', '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->l11n->lang['Organization']['Status']; ?></label>
|
||||
<tr><td><label for="iStatus"><?= $this->l11n->getText('Organization', 'Status'); ?></label>
|
||||
<tr><td><select name="status" id="iStatus">
|
||||
<option><?= $this->l11n->lang['Organization']['Active']; ?>
|
||||
<option><?= $this->l11n->lang['Organization']['Inactive']; ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Active'); ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Inactive'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->lang['Organization']['Description']; ?></label>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->getText('Organization', 'Description'); ?></label>
|
||||
<tr><td><textarea name="description" id="iDescription" placeholder=""></textarea>
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Create'] ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Create') ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ echo $this->getData('nav')->render(); ?>
|
|||
|
||||
<div class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->l11n->lang['Organization']['Positions']; ?></caption>
|
||||
<caption><?= $this->l11n->getText('Organization', 'Positions'); ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->l11n->lang[0]['ID']; ?>
|
||||
<td class="wf-100"><?= $this->l11n->lang['Organization']['Name']; ?>
|
||||
<td><?= $this->l11n->lang['Organization']['Parent']; ?>
|
||||
<td><?= $this->l11n->getText(0, 'ID'); ?>
|
||||
<td class="wf-100"><?= $this->l11n->getText('Organization', 'Name'); ?>
|
||||
<td><?= $this->l11n->getText('Organization', 'Parent'); ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="3"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
|
|
@ -47,7 +47,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count === 0) : ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->l11n->getText(0, 'Empty'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,22 +22,22 @@ $unit = $this->getData('unit');
|
|||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-33">
|
||||
<header><h1><?= $this->l11n->lang['Organization']['Position']; ?></h1></header>
|
||||
<header><h1><?= $this->l11n->getText('Organization', 'Position'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iName"><?= $this->l11n->lang['Organization']['Name']; ?></label>
|
||||
<tr><td><label for="iName"><?= $this->l11n->getText('Organization', 'Name'); ?></label>
|
||||
<tr><td><input type="text" name="name" id="iName" value="<?= $unit->getName(); ?>">
|
||||
<tr><td><label for="iParent"><?= $this->l11n->lang['Organization']['Parent']; ?></label>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->getText('Organization', 'Parent'); ?></label>
|
||||
<tr><td><input type="text" name="parent" id="iParent" value="<?= $unit->getParent(); ?>">
|
||||
<tr><td><label for="iStatus"><?= $this->l11n->lang['Organization']['Status']; ?></label>
|
||||
<tr><td><label for="iStatus"><?= $this->l11n->getText('Organization', 'Status'); ?></label>
|
||||
<tr><td><select name="status" id="iStatus">
|
||||
<option><?= $this->l11n->lang['Organization']['Active']; ?>
|
||||
<option><?= $this->l11n->lang['Organization']['Inactive']; ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Active'); ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Inactive'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->lang['Organization']['Description']; ?></label>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->getText('Organization', 'Description'); ?></label>
|
||||
<tr><td><textarea name="description" id="iDescription"><?= $unit->getDescription(); ?></textarea>
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Save'] ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Save') ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,22 +20,22 @@
|
|||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-33">
|
||||
<header><h1><?= $this->l11n->lang['Organization']['Unit']; ?></h1></header>
|
||||
<header><h1><?= $this->l11n->getText('Organization', 'Unit'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iName"><?= $this->l11n->lang['Organization']['Name']; ?></label>
|
||||
<tr><td><label for="iName"><?= $this->l11n->getText('Organization', 'Name'); ?></label>
|
||||
<tr><td><input type="text" name="name" id="iName" placeholder=" Orange Management" required>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->lang['Organization']['Parent']; ?></label>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->getText('Organization', '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->l11n->lang['Organization']['Status']; ?></label>
|
||||
<tr><td><label for="iStatus"><?= $this->l11n->getText('Organization', 'Status'); ?></label>
|
||||
<tr><td><select name="status" id="iStatus">
|
||||
<option><?= $this->l11n->lang['Organization']['Active']; ?>
|
||||
<option><?= $this->l11n->lang['Organization']['Inactive']; ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Active'); ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Inactive'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->lang['Organization']['Description']; ?></label>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->getText('Organization', 'Description'); ?></label>
|
||||
<tr><td><textarea name="description" id="iDescription" placeholder=""></textarea>
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Create'] ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Create') ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,21 +28,21 @@ echo $this->getData('nav')->render(); ?>
|
|||
|
||||
<div class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->l11n->lang['Organization']['Units']; ?></caption>
|
||||
<caption><?= $this->l11n->getText('Organization', 'Units'); ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->l11n->lang[0]['ID']; ?>
|
||||
<td class="wf-100"><?= $this->l11n->lang['Organization']['Name']; ?>
|
||||
<td><?= $this->l11n->lang['Organization']['Parent']; ?>
|
||||
<td><?= $this->l11n->getText(0, 'ID'); ?>
|
||||
<td class="wf-100"><?= $this->l11n->getText('Organization', 'Name'); ?>
|
||||
<td><?= $this->l11n->getText('Organization', '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->l11n->lang[0]['ID']; ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
|
||||
<td data-label="<?= $this->l11n->lang['Organization']['Name']; ?>"><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
|
||||
<td data-label="<?= $this->l11n->lang['Organization']['Parent']; ?>"><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
|
||||
<td data-label="<?= $this->l11n->getText(0, 'ID'); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
|
||||
<td data-label="<?= $this->l11n->getText('Organization', 'Name'); ?>"><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
|
||||
<td data-label="<?= $this->l11n->getText('Organization', 'Parent'); ?>"><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,22 +22,22 @@ $unit = $this->getData('unit');
|
|||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-33">
|
||||
<header><h1><?= $this->l11n->lang['Organization']['Unit']; ?></h1></header>
|
||||
<header><h1><?= $this->l11n->getText('Organization', 'Unit'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iName"><?= $this->l11n->lang['Organization']['Name']; ?></label>
|
||||
<tr><td><label for="iName"><?= $this->l11n->getText('Organization', 'Name'); ?></label>
|
||||
<tr><td><input type="text" name="name" id="iName" value="<?= $unit->getName(); ?>">
|
||||
<tr><td><label for="iParent"><?= $this->l11n->lang['Organization']['Parent']; ?></label>
|
||||
<tr><td><label for="iParent"><?= $this->l11n->getText('Organization', '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->l11n->lang['Organization']['Status']; ?></label>
|
||||
<tr><td><label for="iStatus"><?= $this->l11n->getText('Organization', 'Status'); ?></label>
|
||||
<tr><td><select name="status" id="iStatus">
|
||||
<option><?= $this->l11n->lang['Organization']['Active']; ?>
|
||||
<option><?= $this->l11n->lang['Organization']['Inactive']; ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Active'); ?>
|
||||
<option><?= $this->l11n->getText('Organization', 'Inactive'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->lang['Organization']['Description']; ?></label>
|
||||
<tr><td><label for="iDescription"><?= $this->l11n->getText('Organization', 'Description'); ?></label>
|
||||
<tr><td><textarea name="description" id="iDescription"><?= $unit->getDescription(); ?></textarea>
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Save'] ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Save') ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user