From 7d0ff7f56984c77d56e70af7474885eaad43350e Mon Sep 17 00:00:00 2001 From: oliver Date: Sat, 26 Mar 2016 17:52:16 +0100 Subject: [PATCH] add notification for Character titles --- controllers/QrController.inc | 10 +++++++++- controllers/components/NotificationComponent.inc | 6 ++++++ views/html/html.tpl | 5 +++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/controllers/QrController.inc b/controllers/QrController.inc index ce4111d5..9d2c43ef 100644 --- a/controllers/QrController.inc +++ b/controllers/QrController.inc @@ -65,7 +65,7 @@ $character['id'] ); - // Add notifications + // Add notification $this->Notification->addNotification( \hhu\z\controllers\components\NotificationComponent::TYPE_ACHIEVEMENT, $achievement['title'], @@ -130,6 +130,14 @@ $character['id'] ); + // Add notification + $this->Notification->addNotification( + \hhu\z\controllers\components\NotificationComponent::TYPE_CHARACTERTITLE, + ($character['gender'] === 1) + ? $title['title_male'] + : $title['title_female'] + ); + // Redirect $this->redirect( $this->linker->link( diff --git a/controllers/components/NotificationComponent.inc b/controllers/components/NotificationComponent.inc index da1b508b..19ceb6dd 100644 --- a/controllers/components/NotificationComponent.inc +++ b/controllers/components/NotificationComponent.inc @@ -31,6 +31,12 @@ * @var string */ const TYPE_CHARACTERGROUPSACHIEVEMENT = 'charactergroupsachievement'; + /** + * Type: Character title + * + * @var string + */ + const TYPE_CHARACTERTITLE = 'charactertitle'; /** * Type: Level-up * diff --git a/views/html/html.tpl b/views/html/html.tpl index 192aff5c..93dd24e5 100644 --- a/views/html/html.tpl +++ b/views/html/html.tpl @@ -98,6 +98,11 @@

+ +
  • +

    :

    +

    +