mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-18 16:18:47 +02:00
* 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>
68 lines
2.3 KiB
PHP
68 lines
2.3 KiB
PHP
<?php
|
|
/*
|
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
|
* @license http://opensource.org/licenses/AGPL-3.0
|
|
*/
|
|
|
|
namespace Combodo\iTop\Application\WelcomePopup\Provider;
|
|
|
|
use Dict;
|
|
use AbstractWelcomePopupExtension;
|
|
use UserRights;
|
|
use utils;
|
|
use Combodo\iTop\Application\WelcomePopup\MessageFactory;
|
|
|
|
/**
|
|
* Implementation of the "default" Welcome Popup message
|
|
* @since 3.2.0
|
|
*/
|
|
class DefaultProvider extends AbstractWelcomePopupExtension
|
|
{
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function GetMessages(): array
|
|
{
|
|
// 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;
|
|
}
|
|
}
|