diff --git a/TODO-2.0.md b/TODO-2.0.md index c0007e980..ad0e6fc73 100644 --- a/TODO-2.0.md +++ b/TODO-2.0.md @@ -1,3 +1,4 @@ +* Calendar in notifications explorer * login history * Test for Zero * updateStatus( Main, SOAP server ) diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm index ad1eea420..60809a8dc 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm @@ -3,7 +3,7 @@ package Lemonldap::NG::Manager::Notifications; use 5.10.0; use utf8; use Mouse; -use JSON qw(to_json); +use JSON qw(from_json to_json); use Lemonldap::NG::Common::Conf::Constants; use Lemonldap::NG::Common::PSGI::Constants; diff --git a/lemonldap-ng-portal/MANIFEST b/lemonldap-ng-portal/MANIFEST index 846019345..938ce101e 100644 --- a/lemonldap-ng-portal/MANIFEST +++ b/lemonldap-ng-portal/MANIFEST @@ -269,8 +269,8 @@ site/templates/common/mail_header.tpl site/templates/common/mail_password.tpl site/templates/common/mail_register_confirm.tpl site/templates/common/mail_register_done.tpl -site/templates/common/notification.tpl site/templates/common/notification.xsl +site/templates/common/notifinclude.tpl site/templates/common/oidc_checksession.tpl site/templates/common/redirect.tpl site/templates/common/script.tpl @@ -362,6 +362,8 @@ t/34-Auth-Proxy-and-SOAP-Server.t t/35-REST-sessions-with-REST-server.t t/35-SOAP-sessions-with-SOAP-server.t t/40-Notifications-JSON-DBI.t +t/40-Notifications-JSON-File-with-token.t +t/40-Notifications-JSON-File.t t/40-Notifications-XML-DBI.t t/40-Notifications-XML-File.t t/41-Captcha.t diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm index 5de7dc31e..e52458437 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm @@ -118,6 +118,7 @@ sub getNotifBack { my $file = $notifs->{$fileName}; my $fileResult = 1; my $json = from_json($file); + $json = [$json] unless ( ref $json eq 'ARRAY' ); # Get pending notifications and verify that they have been accepted foreach my $notif (@$json) { diff --git a/lemonldap-ng-portal/site/templates/bootstrap/notification.tpl b/lemonldap-ng-portal/site/templates/bootstrap/notification.tpl index 28328d116..7a0edb1d6 100644 --- a/lemonldap-ng-portal/site/templates/bootstrap/notification.tpl +++ b/lemonldap-ng-portal/site/templates/bootstrap/notification.tpl @@ -2,7 +2,7 @@
New message(s)
-