From d2015ea93cef9694d22f77891f19b99e0374b7c9 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 2 Jul 2016 14:14:31 +0200 Subject: [PATCH] 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. --- Theme/Backend/department-create.tpl.php | 12 ++++++------ Theme/Backend/department-list.tpl.php | 12 ++++++------ Theme/Backend/department-profile.php | 16 ++++++++-------- Theme/Backend/position-create.tpl.php | 16 ++++++++-------- Theme/Backend/position-list.tpl.php | 10 +++++----- Theme/Backend/position-profile.tpl.php | 16 ++++++++-------- Theme/Backend/unit-create.tpl.php | 16 ++++++++-------- Theme/Backend/unit-list.tpl.php | 14 +++++++------- Theme/Backend/unit-profile.tpl.php | 16 ++++++++-------- 9 files changed, 64 insertions(+), 64 deletions(-) diff --git a/Theme/Backend/department-create.tpl.php b/Theme/Backend/department-create.tpl.php index 9783f18..a536dd9 100644 --- a/Theme/Backend/department-create.tpl.php +++ b/Theme/Backend/department-create.tpl.php @@ -20,20 +20,20 @@ echo $this->getData('nav')->render(); ?>
-

l11n->lang['Organization']['Department']; ?>

+

l11n->getText('Organization', 'Department'); ?>

-
+
-
+
-
+
-
+
-
+
diff --git a/Theme/Backend/department-list.tpl.php b/Theme/Backend/department-list.tpl.php index 73d311d..a7aada1 100644 --- a/Theme/Backend/department-list.tpl.php +++ b/Theme/Backend/department-list.tpl.php @@ -28,13 +28,13 @@ echo $this->getData('nav')->render(); ?>
- + - @@ -48,7 +48,7 @@ echo $this->getData('nav')->render(); ?> -
l11n->lang['Organization']['Departments']; ?>l11n->getText('Organization', 'Departments'); ?>
l11n->lang[0]['ID']; ?> - l11n->lang['Organization']['Name']; ?> - l11n->lang['Organization']['Parent']; ?> - l11n->lang['Organization']['Unit']; ?> + l11n->getText(0, 'ID'); ?> + l11n->getText('Organization', 'Name'); ?> + l11n->getText('Organization', 'Parent'); ?> + l11n->getText('Organization', 'Unit'); ?>
render(); ?>
l11n->lang[0]['Empty']; ?> + l11n->getText(0, 'Empty'); ?>
diff --git a/Theme/Backend/department-profile.php b/Theme/Backend/department-profile.php index dd5dc78..ed82e7a 100644 --- a/Theme/Backend/department-profile.php +++ b/Theme/Backend/department-profile.php @@ -22,22 +22,22 @@ $department = $this->getData('department'); echo $this->getData('nav')->render(); ?>
-

l11n->lang['Organization']['Position']; ?>

+

l11n->getText('Organization', 'Position'); ?>

-
+
-
+
-
+
-
+
-
+
diff --git a/Theme/Backend/position-create.tpl.php b/Theme/Backend/position-create.tpl.php index 5c6bfe5..2314687 100644 --- a/Theme/Backend/position-create.tpl.php +++ b/Theme/Backend/position-create.tpl.php @@ -20,22 +20,22 @@ echo $this->getData('nav')->render(); ?>
-

l11n->lang['Organization']['Position']; ?>

+

l11n->getText('Organization', 'Position'); ?>

-
+
-
+
-
+
-
+
-
+
diff --git a/Theme/Backend/position-list.tpl.php b/Theme/Backend/position-list.tpl.php index 4012554..0ab9006 100644 --- a/Theme/Backend/position-list.tpl.php +++ b/Theme/Backend/position-list.tpl.php @@ -30,12 +30,12 @@ echo $this->getData('nav')->render(); ?>
- + - @@ -47,7 +47,7 @@ echo $this->getData('nav')->render(); ?>
l11n->lang['Organization']['Positions']; ?>l11n->getText('Organization', 'Positions'); ?>
l11n->lang[0]['ID']; ?> - l11n->lang['Organization']['Name']; ?> - l11n->lang['Organization']['Parent']; ?> + l11n->getText(0, 'ID'); ?> + l11n->getText('Organization', 'Name'); ?> + l11n->getText('Organization', 'Parent'); ?>
render(); ?>
getParent(); ?> -
l11n->lang[0]['Empty']; ?> +
l11n->getText(0, 'Empty'); ?>
diff --git a/Theme/Backend/position-profile.tpl.php b/Theme/Backend/position-profile.tpl.php index 56bd741..b7b47d4 100644 --- a/Theme/Backend/position-profile.tpl.php +++ b/Theme/Backend/position-profile.tpl.php @@ -22,22 +22,22 @@ $unit = $this->getData('unit'); echo $this->getData('nav')->render(); ?>
-

l11n->lang['Organization']['Position']; ?>

+

l11n->getText('Organization', 'Position'); ?>

-
+
-
+
-
+
-
+
-
+
diff --git a/Theme/Backend/unit-create.tpl.php b/Theme/Backend/unit-create.tpl.php index 53c8d87..173ad98 100644 --- a/Theme/Backend/unit-create.tpl.php +++ b/Theme/Backend/unit-create.tpl.php @@ -20,22 +20,22 @@ echo $this->getData('nav')->render(); ?>
-

l11n->lang['Organization']['Unit']; ?>

+

l11n->getText('Organization', 'Unit'); ?>

-
+
-
+
-
+
-
+
-
+
diff --git a/Theme/Backend/unit-list.tpl.php b/Theme/Backend/unit-list.tpl.php index 25401ec..69fb705 100644 --- a/Theme/Backend/unit-list.tpl.php +++ b/Theme/Backend/unit-list.tpl.php @@ -28,21 +28,21 @@ echo $this->getData('nav')->render(); ?>
- + - getData('list:elements') as $key => $value) : $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/organization/unit/profile?id=' . $value->getId()); ?> -
l11n->lang['Organization']['Units']; ?>l11n->getText('Organization', 'Units'); ?>
l11n->lang[0]['ID']; ?> - l11n->lang['Organization']['Name']; ?> - l11n->lang['Organization']['Parent']; ?> + l11n->getText(0, 'ID'); ?> + l11n->getText('Organization', 'Name'); ?> + l11n->getText('Organization', 'Parent'); ?>
render(); ?>
getId(); ?> - getName(); ?> - getParent(); ?> + getId(); ?> + getName(); ?> + getParent(); ?>
diff --git a/Theme/Backend/unit-profile.tpl.php b/Theme/Backend/unit-profile.tpl.php index 170eade..6178728 100644 --- a/Theme/Backend/unit-profile.tpl.php +++ b/Theme/Backend/unit-profile.tpl.php @@ -22,22 +22,22 @@ $unit = $this->getData('unit'); echo $this->getData('nav')->render(); ?>
-

l11n->lang['Organization']['Unit']; ?>

+

l11n->getText('Organization', 'Unit'); ?>

-
+
-
+
-
+
-
+
-
+