N°1386 - Advanced Search: Navigation in list - Browse this list - back from run_query

This commit is contained in:
acognet
2023-05-25 16:07:15 +02:00
parent 9ebcbf2459
commit b852e72088
15 changed files with 132 additions and 44 deletions

View File

@@ -439,6 +439,7 @@ try
$sBackUrl = utils::ReadPostedParam('back_url', '', false, 'raw');
$sFilter = utils::ReadPostedParam('filter', null, false, 'raw');
$sList = utils::ReadPostedParam('list_navigation', null, false, 'string');
$sPostedFieldsForBackUrl = utils::ReadPostedParam('back_posted_fields', "", false, 'raw');
$aList = [];
if ($sList != null) {
$aList = json_decode($sList);
@@ -446,7 +447,7 @@ try
$sClassLabel = MetaModel::GetName($sClass);
$oP->set_title(Dict::Format('UI:DetailsPageTitle', $oObj->GetRawName(), $sClassLabel)); // Set title will take care of the encoding
$oP->SetContentLayout(PageContentFactory::MakeForObjectDetails($oObj, $oP->IsPrintableVersion() ? cmdbAbstractObject::ENUM_DISPLAY_MODE_PRINT : cmdbAbstractObject::ENUM_DISPLAY_MODE_VIEW, $sFilter, $aList, $sBackUrl));
$oP->SetContentLayout(PageContentFactory::MakeForObjectDetails($oObj, $oP->IsPrintableVersion() ? cmdbAbstractObject::ENUM_DISPLAY_MODE_PRINT : cmdbAbstractObject::ENUM_DISPLAY_MODE_VIEW, $sFilter, $aList, $sBackUrl, $sPostedFieldsForBackUrl));
$oObj->DisplayDetails($oP);
}
}

View File

@@ -216,10 +216,12 @@ JS
if ($oFilter) {
//--- Query filter
$oPanelResult= PanelUIBlockFactory::MakeWithBrandingSecondaryColor(Dict::S('UI:RunQuery:QueryResults'));
$oPanelResult = PanelUIBlockFactory::MakeWithBrandingSecondaryColor(Dict::S('UI:RunQuery:QueryResults'));
$oP->AddSubBlock($oPanelResult);
$oResultBlock = new DisplayBlock($oFilter, 'list', false);
$oPanelResult->AddSubBlock($oResultBlock->GetDisplay($oP, 'runquery'));
//Added in order to go back to search from navigation in the basket
$oP->AddSubBlock(DataTableUIBlockFactory::MakeParamForBasket(['encoding' => $sEncoding, 'expression' => $sExpression]));
// Breadcrumb
//$iCount = $oResultBlock->GetDisplayedCount();