mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°7565 - Polishing Newsroom - Add subtitle and user icon
This commit is contained in:
@@ -35,6 +35,7 @@ use SecurityException;
|
||||
use URLPopupMenuItem;
|
||||
use UserRights;
|
||||
use utils;
|
||||
use appUserPreferences;
|
||||
|
||||
|
||||
/**
|
||||
@@ -61,6 +62,13 @@ class iTopNewsroomController extends Controller
|
||||
// Add title block
|
||||
// Make bulk actions block
|
||||
$oBulkActionsBlock = PanelUIBlockFactory::MakeForInformation(Dict::S('UI:Newsroom:iTopNotification:ViewAllPage:Title'));
|
||||
$oBulkActionsBlock->AddSubTitleBlock(new Html(Dict::S('UI:Newsroom:iTopNotification:ViewAllPage:SubTitle')));
|
||||
$sPictureUrl = UserRights::GetUserPictureAbsUrl();
|
||||
if (empty($sPictureUrl)) {
|
||||
$sPictureUrl = utils::GetAbsoluteUrlAppRoot().'images/user-pictures/'.appUserPreferences::GetPref('user_picture_placeholder', 'user-profile-default-256px.png');
|
||||
}
|
||||
$oBulkActionsBlock->SetIcon($sPictureUrl,Panel::ENUM_ICON_COVER_METHOD_CONTAIN, true);
|
||||
|
||||
$oNotificationsCenterButton = ButtonUIBlockFactory::MakeIconLink(
|
||||
'fas fa-cogs',
|
||||
Dict::S('UI:NotificationsCenter:Panel:Title'),
|
||||
|
||||
@@ -19,6 +19,8 @@ use Dict;
|
||||
use Exception;
|
||||
use MetaModel;
|
||||
use utils;
|
||||
use UserRights;
|
||||
use appUserPreferences;
|
||||
|
||||
|
||||
/**
|
||||
@@ -58,7 +60,14 @@ class NotificationsCenterController extends Controller
|
||||
// Create a panel that will contain the table
|
||||
$oNotificationsPanel = new Panel(Dict::S('UI:NotificationsCenter:Panel:Title'), array(), 'grey', 'ibo-notifications-center');
|
||||
$oNotificationsPanel->AddCSSClass('ibo-datatable-panel');
|
||||
$oSubtitleBlock = new UIContentBlock(null, ['ibo-notifications-center--sub-title']);
|
||||
|
||||
$oNotificationsPanel->AddSubTitleBlock(new Html(Dict::S('UI:NotificationsCenter:Panel:SubTitle')));
|
||||
$sPictureUrl = UserRights::GetUserPictureAbsUrl();
|
||||
if (empty($sPictureUrl)) {
|
||||
$sPictureUrl = utils::GetAbsoluteUrlAppRoot().'images/user-pictures/'.appUserPreferences::GetPref('user_picture_placeholder', 'user-profile-default-256px.png');
|
||||
}
|
||||
$oNotificationsPanel->SetIcon($sPictureUrl,Panel::ENUM_ICON_COVER_METHOD_CONTAIN, true);
|
||||
|
||||
$oNotificationsCenterTableColumns = [
|
||||
'trigger' => array('label' => MetaModel::GetName('Trigger')),
|
||||
'trigger_class' => array('label' => MetaModel::GetAttributeDef('Trigger', 'finalclass')->GetLabel()),
|
||||
|
||||
Reference in New Issue
Block a user