From 2997750b68a6306c7bbe6574bbb5dca40a3c836a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 6 Sep 2017 15:42:35 +0200 Subject: [PATCH] Added group status --- Theme/Backend/Lang/en.lang.php | 3 +++ Theme/Backend/groups-list.tpl.php | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index ffb46fe..6995fd8 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -134,4 +134,7 @@ return ['Admin' => [ 'Status2' => 'Inactive', 'Status3' => 'Timehout', 'Status4' => 'Banned', + 'GroupStatus1' => 'Active', + 'GroupStatus2' => 'Inactive', + 'GroupStatus4' => 'Hidden', ]]; diff --git a/Theme/Backend/groups-list.tpl.php b/Theme/Backend/groups-list.tpl.php index 01fb617..f8b9b6c 100644 --- a/Theme/Backend/groups-list.tpl.php +++ b/Theme/Backend/groups-list.tpl.php @@ -31,6 +31,7 @@ echo $this->getData('nav')->render(); ?> getHtml('ID', 0, 0); ?> + getHtml('Status') ?> getHtml('Name') ?> getHtml('Parents') ?> getHtml('Children') ?> @@ -39,9 +40,14 @@ echo $this->getData('nav')->render(); ?> render(); ?> getData('list:elements') as $key => $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/group/settings?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/group/settings?{?}&id=' . $value->getId()); + $color = 'darkred'; + if($value->getStatus() === \phpOMS\Account\GroupStatus::ACTIVE) { $color = 'green'; } + elseif($value->getStatus() === \phpOMS\Account\GroupStatus::INACTIVE) { $color = 'darkblue'; } + elseif($value->getStatus() === \phpOMS\Account\GroupStatus::HIDDEN) { $color = 'purple'; } ?> getId(), ENT_COMPAT, 'utf-8'); ?> + getHtml('Status'. $value->getStatus()); ?> getName(), ENT_COMPAT, 'utf-8'); ?>