diff --git a/controllers/Index.php b/controllers/Index.php
index e94ceda..fc62c59 100644
--- a/controllers/Index.php
+++ b/controllers/Index.php
@@ -6,6 +6,7 @@
namespace Modules\RadioHoererCharts\Controllers;
+use Modules\User\Mappers\User as UserMapper;
use Modules\RadioHoererCharts\Mappers\HoererCharts as HoererChartsMapper;
use Modules\RadioHoererCharts\Models\HoererCharts as HoererChartsModel;
use Modules\RadioHoererCharts\Mappers\HoererChartsSuggestion as HoererChartsSuggestionMapper;
@@ -19,6 +20,7 @@ public function indexAction()
{
$hoererchartsMapper = new HoererChartsMapper();
$hoererchartsuservotesMapper = new HoererChartsUserVotesMapper();
+ $userMapper = new UserMapper;
$this->getLayout()->getTitle()
->add($this->getTranslator()->trans('hoerercharts'));
@@ -47,6 +49,7 @@ public function indexAction()
'Star5'=>$this->getConfig()->get('radio_hoerercharts_Star5'),
'Program_Name'=>(($this->getConfig()->get('radio_hoerercharts_Program_Name'))?$this->getConfig()->get('radio_hoerercharts_Program_Name'):$this->getTranslator()->trans('notset')));
$this->getView()->set('config', $hoererchartsconfig);
+ $this->getView()->set('userMapper', $userMapper);
$this->getView()->set('votedatetime', ((!$hoererchartsconfig['start_datetime'] and !$hoererchartsconfig['end_datetime'])?'':$this->getTranslator()->trans('votedatetime').(($hoererchartsconfig['start_datetime'] and $hoererchartsconfig['end_datetime'])?call_user_func_array([$this->getTranslator(), 'trans'], array('fromto', $hoererchartsconfig['start_datetime']->format($formatdatetime),$hoererchartsconfig['end_datetime']->format($formatdatetime))):(($hoererchartsconfig['start_datetime'])?$this->getTranslator()->trans('from').' '.$hoererchartsconfig['start_datetime']->format($formatdatetime):$this->getTranslator()->trans('to').' '.$hoererchartsconfig['end_datetime']->format($formatdatetime)))."
"));
if ($hoererchartsMapper->checkDB()){
diff --git a/controllers/admin/Index.php b/controllers/admin/Index.php
index 1418cdd..d72d483 100644
--- a/controllers/admin/Index.php
+++ b/controllers/admin/Index.php
@@ -113,9 +113,11 @@ public function indexAction()
$this->redirect(['action' => 'index']);
}
}
+ $suggestionentries = $hoererchartssuggestionMapper->getEntries([]);
- if ($this->getRequest()->getParam('suggestion')) $this->getView()->set('entries', $hoererchartssuggestionMapper->getEntries([]));
+ if ($this->getRequest()->getParam('suggestion')) $this->getView()->set('entries', $suggestionentries);
else $this->getView()->set('entries', $hoererchartsMapper->getEntries([]));
+ $this->getView()->set('badgeSuggestion', count($suggestionentries));
}
}
@@ -253,5 +255,7 @@ public function resetAction()
$this->redirect(['action' => 'index']);
}
}
+
+ $this->getView()->set('entries', $hoererchartsuservotesMapper->getEntries([]));
}
}
diff --git a/translations/de.php b/translations/de.php
index 8045ee3..4f1392f 100644
--- a/translations/de.php
+++ b/translations/de.php
@@ -66,4 +66,7 @@
'enable' => 'Freischalten',
'user' => 'Username',
'guest' => 'Gast',
+
+ 'registered_by' => 'Eingetragen von',
+ 'suggestionenable' => 'Vorschlag aktivieren',
];
diff --git a/translations/en.php b/translations/en.php
index c16cbb6..8273c60 100644
--- a/translations/en.php
+++ b/translations/en.php
@@ -66,4 +66,7 @@
'enable' => 'Freischalten',
'user' => 'Username',
'guest' => 'Gast',
+
+ 'registered_by' => 'Registered by',
+ 'suggestionenable' => 'Suggestion enable',
];
diff --git a/views/admin/index/index.php b/views/admin/index/index.php
index 81c8990..070bb9b 100644
--- a/views/admin/index/index.php
+++ b/views/admin/index/index.php
@@ -33,7 +33,7 @@
=$this->getTrans('index') ?>
=$this->getTrans('user') ?> | +=$this->getTrans('datecreate') ?> | +
---|---|
+ getUser_Id(); + $user = $userMapper->getUserById($user_id); + if ($user) + echo $this->escape($user->getName()); + else + echo $this->getTrans('guest'); + ?> + | ++ getLast_Activity()); + echo $datenow->format('d.m.Y H:i'); + ?> + | +