mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°6147 - Filter list : tooltip and new action
This commit is contained in:
@@ -1781,6 +1781,14 @@ class MenuBlock extends DisplayBlock
|
||||
$this->AddNewObjectMenuAction($aRegularActions, $sClass, $sDefaultValuesAsUrlParams);
|
||||
}
|
||||
|
||||
// Filter this list (provided by extra params has it need filter param)
|
||||
if (array_key_exists('filter_this_list_url', $aExtraParams)) {
|
||||
$aToolkitActions[] = [
|
||||
'label' => Dict::S('UI:Menu:FilterList'),
|
||||
'url' => $aExtraParams['filter_this_list_url'],
|
||||
];
|
||||
}
|
||||
|
||||
// Any style actions
|
||||
// - Bulk actions on objects set
|
||||
if ($iSetCount > 1) {
|
||||
|
||||
@@ -1465,14 +1465,16 @@ When associated with a trigger, each action is given an "order" number, specifyi
|
||||
'Month-10-Short' => 'Oct',
|
||||
'Month-11-Short' => 'Nov',
|
||||
'Month-12-Short' => 'Dec',
|
||||
'Calendar-FirstDayOfWeek' => 0,// 0 = Sunday, 1 = Monday, etc...
|
||||
'Calendar-FirstDayOfWeek' => 0,
|
||||
// 0 = Sunday, 1 = Monday, etc...
|
||||
|
||||
'UI:Menu:ShortcutList' => 'Create a Shortcut...',
|
||||
'UI:Menu:FilterList' => 'Filter list...',
|
||||
'UI:Menu:FilterList' => 'Display list with search criteria',
|
||||
'UI:ShortcutRenameDlg:Title' => 'Rename the shortcut',
|
||||
'UI:ShortcutListDlg:Title' => 'Create a shortcut for the list',
|
||||
'UI:ShortcutDelete:Confirm' => 'Please confirm that wou wish to delete the shortcut(s).',
|
||||
'Menu:MyShortcuts' => 'My Shortcuts',// Duplicated into itop-welcome-itil (will be removed from here...)
|
||||
'Menu:MyShortcuts' => 'My Shortcuts',
|
||||
// Duplicated into itop-welcome-itil (will be removed from here...)
|
||||
'Class:Shortcut' => 'Shortcut',
|
||||
'Class:Shortcut+' => '',
|
||||
'Class:Shortcut/Attribute:name' => 'Name',
|
||||
|
||||
@@ -1399,14 +1399,16 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
|
||||
'Month-10-Short' => 'Oct',
|
||||
'Month-11-Short' => 'Nov',
|
||||
'Month-12-Short' => 'Déc',
|
||||
'Calendar-FirstDayOfWeek' => '1',// 0 = Sunday, 1 = Monday, etc...
|
||||
'Calendar-FirstDayOfWeek' => '1',
|
||||
// 0 = Sunday, 1 = Monday, etc...
|
||||
|
||||
'UI:Menu:ShortcutList' => 'Créer un Raccourci...',
|
||||
'UI:Menu:FilterList' => 'Filtrer la liste...',
|
||||
'UI:Menu:FilterList' => 'Afficher la liste et ses critères de recherche',
|
||||
'UI:ShortcutRenameDlg:Title' => 'Renommer le raccourci',
|
||||
'UI:ShortcutListDlg:Title' => 'Créer un raccourci pour la liste',
|
||||
'UI:ShortcutDelete:Confirm' => 'Veuillez confirmer la suppression du ou des raccourci(s)',
|
||||
'Menu:MyShortcuts' => 'Mes raccourcis',// Duplicated into itop-welcome-itil (will be removed from here...)
|
||||
'Menu:MyShortcuts' => 'Mes raccourcis',
|
||||
// Duplicated into itop-welcome-itil (will be removed from here...)
|
||||
'Class:Shortcut' => 'Raccourci',
|
||||
'Class:Shortcut+' => '',
|
||||
'Class:Shortcut/Attribute:name' => 'Nom',
|
||||
|
||||
@@ -123,6 +123,12 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
protected static function RenderDataTable(DataTable $oDataTable, string $sStyle, WebPage $oPage, string $sListId, DBObjectSet $oSet, array $aExtraParams)
|
||||
{
|
||||
// Filter this list action
|
||||
$sFilterListUrl = utils::GetDataTableSearchUrl($oSet->GetFilter(), $aExtraParams);
|
||||
if (utils::IsNotNullOrEmptyString($sFilterListUrl)) {
|
||||
$aExtraParams['filter_this_list_url'] = $sFilterListUrl;
|
||||
}
|
||||
|
||||
if (!isset($aExtraParams['menu']) || $aExtraParams['menu']) {
|
||||
$oMenuBlock = new MenuBlock($oSet->GetFilter(), $sStyle);
|
||||
$aExtraParams['refresh_action'] = $oDataTable->GetJSRefresh();
|
||||
@@ -177,7 +183,7 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
} else {
|
||||
$sSubTitle = Dict::Format('UI:Pagination:HeaderNoSelection', $sCountHtml);
|
||||
}
|
||||
$sFilterListUrl = utils::GetDataTableSearchUrl($oSet->GetFilter(), $aExtraParams);
|
||||
|
||||
if (utils::IsNotNullOrEmptyString($sFilterListUrl)) {
|
||||
$sSubTitle = '<a href="'.$sFilterListUrl.'" title="'.Dict::S('UI:Menu:FilterList').'">'.$sSubTitle.'</a>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user