public static function getRelatedModulesFromSession()
 {
     global $currentModule;
     $allRelatedModuleList = isPresentRelatedLists($currentModule);
     $moduleList = array();
     if (is_array($_SESSION['relatedlist'][$currentModule])) {
         foreach ($allRelatedModuleList as $relationId => $label) {
             if (array_key_exists($relationId, $_SESSION['relatedlist'][$currentModule])) {
                 $moduleList[] = $_SESSION['relatedlist'][$currentModule][$relationId];
             }
         }
     }
     return $moduleList;
 }
Esempio n. 2
0
$smarty->assign("MODULE", $currentModule);
$smarty->assign("CONVERTMODE", 'sotoinvoice');
//Get the associated Products and then display above Terms and Conditions
$smarty->assign("ASSOCIATED_PRODUCTS", getDetailAssociatedProducts('SalesOrder', $focus));
$tabid = getTabid("SalesOrder");
$validationData = getDBValidationData($focus->tab_name, $tabid);
$data = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']);
$smarty->assign("TODO_PERMISSION", CheckFieldPermission('parent_id', 'Calendar'));
$smarty->assign("EVENT_PERMISSION", CheckFieldPermission('parent_id', 'Events'));
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$smarty->assign("EDIT_PERMISSION", isPermitted($currentModule, 'EditView', $_REQUEST['record']));
$smarty->assign("IS_REL_LIST", isPresentRelatedLists($currentModule));
if ($singlepane_view == 'true') {
    $related_array = getRelatedLists($currentModule, $focus);
    $smarty->assign("RELATEDLISTS", $related_array);
    require_once 'include/ListView/RelatedListViewSession.php';
    if (!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) {
        RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), vtlib_purify($_REQUEST['selected_header']));
    }
    $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
    $smarty->assign("SELECTEDHEADERS", $open_related_modules);
}
$smarty->assign("SinglePane_View", $singlepane_view);
if (PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule . '_listquery'])) {
    $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id);
    VT_detailViewNavigation($smarty, $recordNavigationInfo, $focus->id);
}
$validationData = getDBValidationData($focus->tab_name, $tabid);
$data2 = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME", $data2['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $data2['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL", $data2['fieldlabel']);
$smarty->assign("MODULE", $currentModule);
if (PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule . '_listquery'])) {
    $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id);
    VT_detailViewNavigation($smarty, $recordNavigationInfo, $focus->id);
}
// Gather the custom link information to display
include_once 'vtlib/Vtiger/Link.php';
$customlink_params = array('MODULE' => 'Calendar', 'RECORD' => $focus->id, 'ACTION' => vtlib_purify($_REQUEST['action']));
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid("Calendar"), array('DETAILVIEWBASIC', 'DETAILVIEW', 'DETAILVIEWWIDGET'), $customlink_params));
// END
$custom_fields_data = getCalendarCustomFields($tabid, 'detail_view', $focus->column_fields);
$smarty->assign("CUSTOM_FIELDS_DATA", $custom_fields_data);
$smarty->assign("IS_REL_LIST", isPresentRelatedLists($rel_tab_type));
if ($singlepane_view == 'true') {
    $related_array = getRelatedLists($tab_type, $focus);
    $smarty->assign("RELATEDLISTS", $related_array);
    require_once 'include/ListView/RelatedListViewSession.php';
    if (!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) {
        RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), vtlib_purify($_REQUEST['selected_header']));
    }
    $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
    $smarty->assign("SELECTEDHEADERS", $open_related_modules);
}
$smarty->assign("SinglePane_View", $singlepane_view);
$smarty->assign("MODE", "DetailView");
$smarty->display("modules/Calendar4You/EventDetailView.tpl");