N°2847 Replace Notifications page header by an Alert block

This commit is contained in:
Stephen Abello
2020-12-02 11:02:07 +01:00
parent 59f9cd3694
commit f28fc15a8d
16 changed files with 23 additions and 30 deletions

View File

@@ -17,6 +17,9 @@
* You should have received a copy of the GNU Affero General Public License
*/
use Combodo\iTop\Application\UI\Component\Alert\AlertFactory;
use Combodo\iTop\Application\UI\Layout\PageContent\PageContentFactory;
require_once('../approot.inc.php');
require_once(APPROOT.'/application/application.inc.php');
@@ -28,24 +31,14 @@ ApplicationMenu::CheckMenuIdEnabled("NotificationsMenu");
// Main program
//
$oP = new iTopWebPage(Dict::S('Menu:NotificationsMenu+'));
$oP->add('<div class="page_header" style="padding:0.5em;">');
$oP->add('<h1>'.dict::S('UI:NotificationsMenu:Title').'</h1>');
$oP->add('</div>');
$oP->SetBreadCrumbEntry('ui-tool-notifications', Dict::S('Menu:NotificationsMenu'), Dict::S('Menu:NotificationsMenu+'), '', 'fas fa-bell', iTopWebPage::ENUM_BREADCRUMB_ENTRY_ICON_TYPE_CSS_CLASSES);
$oP->StartCollapsibleSection(Dict::S('UI:NotificationsMenu:Help'), true, 'notifications-home');
$oP->add('<div style="padding: 1em; font-size:10pt;background:#E8F3CF;margin-top: 0.25em;">');
$oP->add('<img src="../images/bell.png" style="margin-top: -60px; margin-right: 10px; float: right;">');
$oP->add(Dict::S('UI:NotificationsMenu:HelpContent'));
$oP->add('</div>');
$oP->add('');
$oP->add('');
$oP->EndCollapsibleSection();
$oP->add('<p>&nbsp;</p>');
$oPageContentLayout = PageContentFactory::MakeStandardEmpty();
$oP->SetContentLayout($oPageContentLayout);
$sAlertTitle = Dict::S('UI:NotificationsMenu:Title');
$sAlertContent = Dict::S('UI:NotificationsMenu:HelpContent');
$oPageContentLayout->AddMainBlock(AlertFactory::MakeForInformation($sAlertTitle, $sAlertContent));
$oP->AddTabContainer('Tabs_0');
$oP->SetCurrentTabContainer('Tabs_0');