mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 00:58:48 +02:00
New type of trigger: TriggerOnPortalUpdate, called when the end-user updates a ticket from the portal.
SVN:trunk[1420]
This commit is contained in:
@@ -353,6 +353,12 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay
|
||||
}
|
||||
$oPage->SetCurrentTab('');
|
||||
|
||||
foreach (MetaModel::EnumPlugins('iApplicationUIExtension') as $oExtensionInstance)
|
||||
{
|
||||
$oExtensionInstance->OnDisplayRelations($this, $oPage, $bEditMode);
|
||||
}
|
||||
|
||||
// Display Notifications after the other tabs since this tab disappears in edition
|
||||
if (!$bEditMode)
|
||||
{
|
||||
// Get the actual class of the current object
|
||||
@@ -364,19 +370,16 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay
|
||||
$oTriggerSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT TriggerOnObject AS T WHERE T.target_class IN ('$sClassList')"));
|
||||
if ($oTriggerSet->Count() > 0)
|
||||
{
|
||||
$oPage->SetCurrentTab(Dict::S('UI:NotificationsTab'));
|
||||
|
||||
// Display notifications regarding the object
|
||||
$iId = $this->GetKey();
|
||||
$oBlock = new DisplayBlock(DBObjectSearch::FromOQL("SELECT EventNotificationEmail AS Ev JOIN TriggerOnObject AS T ON Ev.trigger_id = T.id WHERE T.target_class IN ('$sClassList') AND Ev.object_id = $iId"), 'list', false);
|
||||
$oNotifSearch = DBObjectSearch::FromOQL("SELECT EventNotificationEmail AS Ev JOIN TriggerOnObject AS T ON Ev.trigger_id = T.id WHERE T.target_class IN ('$sClassList') AND Ev.object_id = $iId");
|
||||
$oNotifSet = new DBObjectSet($oNotifSearch);
|
||||
$sCount = ($oNotifSet->Count() > 0) ? ' ('.$oNotifSet->Count().')' : '';
|
||||
$oPage->SetCurrentTab(Dict::S('UI:NotificationsTab').$sCount);
|
||||
$oBlock = new DisplayBlock($oNotifSearch, 'list', false);
|
||||
$oBlock->Display($oPage, 'notifications', array('menu' => false));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (MetaModel::EnumPlugins('iApplicationUIExtension') as $oExtensionInstance)
|
||||
{
|
||||
$oExtensionInstance->OnDisplayRelations($this, $oPage, $bEditMode);
|
||||
}
|
||||
}
|
||||
|
||||
function GetBareProperties(WebPage $oPage, $bEditMode = false)
|
||||
|
||||
Reference in New Issue
Block a user