mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°2847 First iteration for newsroom menu:
* Kept old js widget but refactored/tweak'd it with some of our new conventions * Added a newsroom menu component extending popupmenu * Working as in 2.7 Still todo : * Add variables for scss file * Use wiget variables for most of js widget * Correctly place the popup (absolute with <> containers ? poppers.js ? ) * Intialize toggler red bubble when new messages are in * Replace hardcoded text in usermenu with correct dict entry updated with the nb of new message * Only allow to open the popup when ajax calls are done
This commit is contained in:
@@ -21,7 +21,9 @@ namespace Combodo\iTop\Application\UI\Layout\NavigationMenu;
|
||||
|
||||
|
||||
use ApplicationContext;
|
||||
use Combodo\iTop\Application\UI\Component\PopoverMenu\NewsroomMenu\NewsroomMenuFactory;
|
||||
use Combodo\iTop\Application\UI\Component\PopoverMenu\PopoverMenuFactory;
|
||||
use MetaModel;
|
||||
|
||||
/**
|
||||
* Class NavigationMenuFactory
|
||||
@@ -44,10 +46,18 @@ class NavigationMenuFactory
|
||||
*/
|
||||
public static function MakeStandard()
|
||||
{
|
||||
|
||||
$oNewsroomMenu = null;
|
||||
if (MetaModel::GetConfig()->Get('newsroom_enabled'))
|
||||
{
|
||||
$oNewsroomMenu = NewsroomMenuFactory::MakeNewsroomMenuForNavigationMenu();
|
||||
}
|
||||
|
||||
return new NavigationMenu(
|
||||
NavigationMenu::BLOCK_CODE,
|
||||
new ApplicationContext(),
|
||||
PopoverMenuFactory::MakeUserMenuForNavigationMenu()
|
||||
PopoverMenuFactory::MakeUserMenuForNavigationMenu(),
|
||||
$oNewsroomMenu
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user