N°7397 - Update welcome popup content for iTop 3.2 (#648)

* N°7397 - Update welcome popup content for iTop 3.2

* N°7397 - Display illustrations as restylable SVG, add extension to twig to support absolute url in source function

* N°7397 - Update 3.2 welcome messages dictionaries, add French translations and set up other languages files

---------

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
This commit is contained in:
Molkobain
2024-07-15 16:12:12 +02:00
committed by GitHub
parent f0c37bd69e
commit 1d67d50a20
27 changed files with 879 additions and 284 deletions

View File

@@ -8,6 +8,7 @@ namespace Combodo\iTop\Application\WelcomePopup\Provider;
use Dict;
use AbstractWelcomePopupExtension;
use UserRights;
use utils;
use Combodo\iTop\Application\WelcomePopup\MessageFactory;
@@ -22,13 +23,45 @@ class DefaultProvider extends AbstractWelcomePopupExtension
*/
public function GetMessages(): array
{
return [
MessageFactory::MakeForLeftTextsRightIllustration(
"320_01",
Dict::S("UI:WelcomePopup:Message:320_01:Title"),
Dict::S("UI:WelcomePopup:Message:320_01:Description"),
// Messages for everyone
$aMessages = [
MessageFactory::MakeForLeftTextsRightIllustrationAsSVGMarkup(
"320_01_Welcome",
Dict::S("UI:WelcomePopup:Message:320_01_Welcome:Title"),
Dict::S("UI:WelcomePopup:Message:320_01_Welcome:Description"),
utils::GetAbsoluteUrlAppRoot() . "images/illustrations/undraw_relaunch_day.svg"
),
MessageFactory::MakeForLeftIllustrationAsSVGMarkupRightTexts(
"320_02_Newsroom",
Dict::S("UI:WelcomePopup:Message:320_02_Newsroom:Title"),
Dict::S("UI:WelcomePopup:Message:320_02_Newsroom:Description"),
utils::GetAbsoluteUrlAppRoot() . "images/illustrations/undraw_newspaper.svg"
),
MessageFactory::MakeForLeftIllustrationAsSVGMarkupRightTexts(
"320_03_NotificationsCenter",
Dict::S("UI:WelcomePopup:Message:320_03_NotificationsCenter:Title"),
Dict::S("UI:WelcomePopup:Message:320_03_NotificationsCenter:Description"),
utils::GetAbsoluteUrlAppRoot() . "images/illustrations/undraw_preferences_popup.svg"
),
MessageFactory::MakeForLeftTextsRightIllustrationAsSVGMarkup(
"320_05_A11yThemes",
Dict::S("UI:WelcomePopup:Message:320_05_A11yThemes:Title"),
Dict::S("UI:WelcomePopup:Message:320_05_A11yThemes:Description"),
utils::GetAbsoluteUrlAppRoot() . "images/illustrations/undraw_designer_mindset.svg"
),
];
// For users that can configure notifications
if (UserRights::IsActionAllowed(\Trigger::class, \UR_ACTION_MODIFY))
{
$aMessages[] = MessageFactory::MakeForLeftTextsRightIllustrationAsSVGMarkup(
"320_04_PowerfulNotifications_AdminOnly",
Dict::S("UI:WelcomePopup:Message:320_04_PowerfulNotifications_AdminOnly:Title"),
Dict::S("UI:WelcomePopup:Message:320_04_PowerfulNotifications_AdminOnly:Description"),
utils::GetAbsoluteUrlAppRoot() . "images/illustrations/undraw_new_notifications.svg"
);
}
return $aMessages;
}
}