N°7157 - Allow users to unsubscribe from notification channels (#611)

* N°7157 - Allow users to unsubscribe from notification channels

* Fix type hinting

* Add missing dict entries

* Allows to subscribe/unsubscribe from notifications individually

* Refactor NotificationsService to singleton pattern

* Refactor NotificationsRepository to singleton pattern and rename methods to a more functional naming

* Add PHPDoc and type hints

* Dump autoloaders

* Replace modals with toasts

* Add dict entry

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
This commit is contained in:
Stephen Abello
2024-02-19 09:25:47 +01:00
committed by GitHub
parent efe5f004a1
commit ceba1ad1e9
28 changed files with 1305 additions and 24 deletions

View File

@@ -0,0 +1,32 @@
<?php
/**
* Copyright (C) 2013-2024 Combodo SARL
*
* This file is part of iTop.
*
* iTop is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* iTop is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
*/
Dict::Add('EN US', 'English', 'English', array(
'UI:NotificationsCenter:Page:Title' => 'Notifications center',
'UI:NotificationsCenter:Panel:Title' => 'Notifications center',
'UI:NotificationsCenter:Panel:SubTitle' => 'Manage your notifications subscriptions. For more granularity, you can also manage individual subscriptions using the <a href="%1$s">advanced mode</a>.',
'UI:NotificationsCenter:Panel:Advanced:SubTitle' => 'Manage your notifications subscriptions individually. To manage your subscriptions by type, use the <a href="%1$s">standard mode</a>.',
'UI:NotificationsCenter:Panel:Table:Channels' => 'Channels.',
'UI:NotificationsCenter:Unsubscribe:Success' => 'You have been successfully unsubscribed from the selected notifications.',
'UI:NotificationsCenter:Unsubscribe:Error' => 'An error occurred while unsubscribing from the selected notifications.',
'UI:NotificationsCenter:Subscribe:Success' => 'You have been successfully subscribed to the selected notifications.',
'UI:NotificationsCenter:Subscribe:Error' => 'An error occurred while subscribing to the selected notifications.',
'UI:NotificationsCenter:Channel:OutOf:Text' => '%1$s out of %2$s',
'UI:NotificationsCenter:Advanced:Input:Label' => '%1$s: %2$s',
));