...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/livefeed.php
- Класс: \CCrmLiveFeedComponent
- Вызов: CCrmLiveFeedComponent::showField
public function showField($arField, $arUF = array()) { $strResult = ""; switch($arField["FORMAT"]) { case "LEAD_PROGRESS": if (!empty($arField["VALUE"])) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= $infos[$arField["VALUE"]]["NAME"]; $strResult .= ""; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "PERSON_NAME": if (is_array($arField["VALUE"])) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= CUser::FormatName(CSite::GetNameFormat(), $arField["VALUE"]); $strResult .= ""; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "PERSON_ID": if ((int)($arField["VALUE"] ?? 0) > 0) { $dbUser = CUser::GetByID(intval($arField["VALUE"])); if ($arUser = $dbUser->GetNext()) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; if ($arUser["PERSONAL_PHOTO"] > 0) { $arFileTmp = CFile::ResizeImageGet( $arUser["PERSONAL_PHOTO"], array('width' => 100, 'height' => 100), BX_RESIZE_IMAGE_EXACT, false ); } $strUser = ""; $strUser .= ''; if ( isset($arFileTmp, $arFileTmp['src']) && is_array($arFileTmp) ) { if (($this->params["PATH_TO_USER"] ?? null) !== '') { $href = str_replace(["#user_id#", "#USER_ID#"], (int)$arField["VALUE"], ($this->params["PATH_TO_USER"] ?? null)); $strUser .= ''. "". ''; } else { $strUser .= ''; } } $strUser .= ''; if (($this->params["PATH_TO_USER"] ?? null) !== '') { $href = str_replace(["#user_id#", "#USER_ID#"], intval($arField["VALUE"]), ($this->params["PATH_TO_USER"] ?? null)); $strUser .= ''. CUser::FormatName(CSite::GetNameFormat(), $arUser, true, false). ''; } else { $strUser .= ''.CUser::FormatName(CSite::GetNameFormat(), $arUser, true, false).''; } if ($arUser["WORK_POSITION"] <> '') { $strUser .= ''.$arUser["WORK_POSITION"].''; } $strUser .= ''; $strResult .= ''.$strUser.''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } } break; case "COMPANY_ID": if (intval($arField["VALUE"]) > 0) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= CCrmViewHelper::PrepareEntityBaloonHtml( array( 'ENTITY_TYPE_ID' => CCrmOwnerType::Company, 'ENTITY_ID' => $arField["VALUE"], 'PREFIX' => "", 'CLASS_NAME' => '', 'CHECK_PERMISSIONS' => 'N' ) ); $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "COMPANY_TYPE": $infos = CCrmStatus::GetStatusListEx('COMPANY_TYPE'); if ( !empty($arField["VALUE"]) && array_key_exists($arField["VALUE"], $infos) ) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= $infos[$arField["VALUE"]]; $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "CONTACT_ID": if (intval($arField["VALUE"]) > 0) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "DEAL_PROGRESS": if (!empty($arField["VALUE"])) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ' '; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "INVOICE_PROGRESS": if (!empty($arField["VALUE"])) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ' "; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "LEAD_STATUS": $infos = CCrmStatus::GetStatus('STATUS'); if ( !empty($arField["VALUE"]) && array_key_exists($arField["VALUE"], $infos) ) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= ''; $dbRes = CCrmContact::GetListEx(array(), array('=ID' => $arField["VALUE"], 'CHECK_PERMISSIONS' => 'N', '@CATEGORY_ID' => 0,), false, false, array('PHOTO')); if ( ($arRes = $dbRes->Fetch()) && (intval($arRes["PHOTO"]) > 0) ) { $arFileTmp = CFile::ResizeImageGet( $arRes["PHOTO"], array('width' => 100, 'height' => 100), BX_RESIZE_IMAGE_EXACT, false ); if( is_array($arFileTmp) && isset($arFileTmp["src"]) ) { $strResult .= ''; } } $strResult .= ''; $strResult .= CCrmViewHelper::PrepareEntityBaloonHtml( array( 'ENTITY_TYPE_ID' => CCrmOwnerType::Contact, 'ENTITY_ID' => $arField["VALUE"], 'PREFIX' => "", 'CLASS_NAME' => '', 'CHECK_PERMISSIONS' => 'N' ) ); $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "COMBI_CLIENT": if ( is_array($arField["VALUE"]) && ( (array_key_exists("CONTACT_ID", $arField["VALUE"]) && intval($arField["VALUE"]["CONTACT_ID"]) > 0) || (array_key_exists("CONTACT_NAME", $arField["VALUE"]) && $arField["VALUE"]["CONTACT_NAME"] <> '') || (array_key_exists("CONTACT_LAST_NAME", $arField["VALUE"]) && $arField["VALUE"]["CONTACT_LAST_NAME"] <> '') || (array_key_exists("COMPANY_ID", $arField["VALUE"]) && intval($arField["VALUE"]["COMPANY_ID"]) > 0) ) ) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; if ( ( array_key_exists("CONTACT_ID", $arField["VALUE"]) && intval($arField["VALUE"]["CONTACT_ID"]) > 0 ) || ( array_key_exists("CONTACT_NAME", $arField["VALUE"]) && $arField["VALUE"]["CONTACT_NAME"] <> '' ) || ( array_key_exists("CONTACT_LAST_NAME", $arField["VALUE"]) && $arField["VALUE"]["CONTACT_LAST_NAME"] <> '' ) ) { if ( array_key_exists("CONTACT_ID", $arField["VALUE"]) && intval($arField["VALUE"]["CONTACT_ID"]) > 0 ) { $strResult .= ''; $strResult .= ''; $dbRes = CCrmContact::GetListEx(array(), array('=ID' => $arField["VALUE"]["CONTACT_ID"], 'CHECK_PERMISSIONS' => 'N', '@CATEGORY_ID' => 0,), false, false, array('PHOTO', 'COMPANY_ID')); if ($arRes = $dbRes->Fetch()) { $contactCompanyID = $arRes['COMPANY_ID']; if (intval($arRes["PHOTO"]) > 0) { $arFileTmp = CFile::ResizeImageGet( $arRes["PHOTO"], array('width' => 100, 'height' => 100), BX_RESIZE_IMAGE_EXACT, false ); if( is_array($arFileTmp) && isset($arFileTmp["src"]) ) { $strResult .= ''; } } } $strResult .= ''; $strResult .= ''; $strResult .= ''; $strResult .= CCrmViewHelper::PrepareEntityBaloonHtml( array( 'ENTITY_TYPE_ID' => CCrmOwnerType::Contact, 'ENTITY_ID' => $arField["VALUE"]["CONTACT_ID"], 'PREFIX' => '', 'CLASS_NAME' => '', 'CHECK_PERMISSIONS' => 'N' ) ); } else { $strResult .= ''; $strResult .= ''; if (intval($arField['VALUE']['PHOTO_ID']) > 0) { $arFileTmp = CFile::ResizeImageGet( $arField['VALUE']['PHOTO_ID'], array('width' => 100, 'height' => 100), BX_RESIZE_IMAGE_EXACT, false ); if( is_array($arFileTmp) && isset($arFileTmp["src"]) ) { $strResult .= ''; } } $strResult .= ''; $strResult .= ''; $strResult .= ''; if ( array_key_exists("ENTITY_ID", $arField["VALUE"]) && intval($arField["VALUE"]["ENTITY_ID"]) > 0 ) { $url = CCrmOwnerType::GetEntityShowPath(CCrmOwnerType::Contact, $arField["VALUE"]["ENTITY_ID"], true); } $clientName = CCrmContact::PrepareFormattedName( array( 'HONORIFIC' => isset($arField['VALUE']['HONORIFIC']) ? $arField['VALUE']['HONORIFIC'] : '', 'NAME' => isset($arField['VALUE']['CONTACT_NAME']) ? $arField['VALUE']['CONTACT_NAME'] : '', 'LAST_NAME' => isset($arField['VALUE']['CONTACT_LAST_NAME']) ? $arField['VALUE']['CONTACT_LAST_NAME'] : '', 'SECOND_NAME' => isset($arField['VALUE']['CONTACT_SECOND_NAME']) ? $arField['VALUE']['CONTACT_SECOND_NAME'] : '' ) ); $strResult .= ($url <> '' ? ''.$clientName.'' : $clientName); } $strResult .= ''; $strResult .= CCrmViewHelper::PrepareEntityBaloonHtml( array( 'ENTITY_TYPE_ID' => CCrmOwnerType::Company, 'ENTITY_ID' => ( array_key_exists("COMPANY_ID", $arField["VALUE"]) && intval($arField["VALUE"]["COMPANY_ID"]) > 0 ? $arField["VALUE"]["COMPANY_ID"] : (int)($contactCompanyID ?? 0) ), 'PREFIX' => '', 'CLASS_NAME' => '', 'CHECK_PERMISSIONS' => 'N' ) ); $strResult .= ''; $strResult .= ''; // crm-feed-client-right $strResult .= ''; } else { $strResult .= CCrmViewHelper::PrepareEntityBaloonHtml( array( 'ENTITY_TYPE_ID' => CCrmOwnerType::Company, 'ENTITY_ID' => $arField["VALUE"]["COMPANY_ID"], 'PREFIX' => "", 'CLASS_NAME' => '', 'CHECK_PERMISSIONS' => 'N' ) ); } $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "COMBI_COMPANY": if ( isset($arField["VALUE"]) && is_array($arField["VALUE"]) && (array_key_exists("TITLE", $arField["VALUE"]) && $arField["VALUE"]["TITLE"] <> '') ) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $url = CCrmOwnerType::GetEntityShowPath(CCrmOwnerType::Company, $arField["VALUE"]["ENTITY_ID"]); if ((int)($arField['VALUE']['LOGO_ID'] ?? 0) > 0) { $arFileTmp = CFile::ResizeImageGet( $arField['VALUE']['LOGO_ID'], array('width' => 100, 'height' => 100), BX_RESIZE_IMAGE_EXACT, false ); } if ( isset($arFileTmp) && is_array($arFileTmp) && isset($arFileTmp['src']) ) { $strResult .= ''; $strResult .= ''; $strResult .= ''. "". ''; $strResult .= ''; $strResult .= ''.$arField["VALUE"]["TITLE"].''; $strResult .= ''; } else { $strResult .= ''.$arField["VALUE"]["TITLE"].''; } $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "COMBI_CLIENT_NAME": if ( is_array($arField["VALUE"]) && ( (array_key_exists("CONTACT_NAME", $arField["VALUE"]) && $arField["VALUE"]["CONTACT_NAME"] <> '') || (array_key_exists("CONTACT_LAST_NAME", $arField["VALUE"]) && $arField["VALUE"]["CONTACT_LAST_NAME"] <> '') || (array_key_exists("COMPANY_TITLE", $arField["VALUE"]) && $arField["VALUE"]["COMPANY_TITLE"] <> '') ) ) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; if ( ( array_key_exists("CONTACT_NAME", $arField["VALUE"]) && $arField["VALUE"]["CONTACT_NAME"] <> '' ) || ( array_key_exists("CONTACT_LAST_NAME", $arField["VALUE"]) && $arField["VALUE"]["CONTACT_LAST_NAME"] <> '' ) ) { $strResult .= ''; $strResult .= ''; $strResult .= ''; $strResult .= ''; $strResult .= CCrmContact::PrepareFormattedName( array( "HONORIFIC" => $arField["VALUE"]["HONORIFIC"], "NAME" => $arField["VALUE"]["CONTACT_NAME"], "LAST_NAME" => $arField["VALUE"]["CONTACT_LAST_NAME"], "SECOND_NAME" => $arField["VALUE"]["CONTACT_SECOND_NAME"], ) ); $strResult .= ''.($arField["VALUE"]["COMPANY_TITLE"] <> '' ? $arField["VALUE"]["COMPANY_TITLE"] : "").''; $strResult .= ''; $strResult .= ''; } else { $strResult .= $arField["VALUE"]["COMPANY_TITLE"]; } $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "DEAL_ID": if (intval($arField["VALUE"]) > 0) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= CCrmViewHelper::PrepareEntityBaloonHtml( array( 'ENTITY_TYPE_ID' => CCrmOwnerType::Deal, 'ENTITY_ID' => $arField["VALUE"], 'PREFIX' => "", 'CLASS_NAME' => '', 'CHECK_PERMISSIONS' => 'N' ) ); $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "COMMUNICATIONS": if ( is_array($arField["VALUE"]) && count($arField["VALUE"]) > 0 ) { $arCommunication = $arField["VALUE"][0]; $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; if (in_array($arCommunication["ENTITY_TYPE_ID"], array(CCrmOwnerType::Company, CCrmOwnerType::Contact, CCrmOwnerType::Lead))) { $strResult .= ''; if ($arCommunication["ENTITY_TYPE_ID"] == CCrmOwnerType::Contact) { $dbRes = CCrmContact::GetListEx(array(), array('=ID' => $arCommunication["ENTITY_ID"], 'CHECK_PERMISSIONS' => 'N', '@CATEGORY_ID' => 0,), false, false, array('PHOTO')); if ( ($arRes = $dbRes->Fetch()) && (intval($arRes["PHOTO"]) > 0) ) { $arFileTmp = CFile::ResizeImageGet( $arRes["PHOTO"], array('width' => 100, 'height' => 100), BX_RESIZE_IMAGE_EXACT, false ); if( is_array($arFileTmp) && isset($arFileTmp["src"]) ) { $strResult .= ''; } } } elseif ($arCommunication["ENTITY_TYPE_ID"] == CCrmOwnerType::Company) { $dbRes = CCrmCompany::GetListEx(array(), array('=ID' => $arCommunication["ENTITY_ID"], 'CHECK_PERMISSIONS' => 'N'), false, false, array('LOGO')); if ( ($arRes = $dbRes->Fetch()) && (intval($arRes["LOGO"]) > 0) ) { $arFileTmp = CFile::ResizeImageGet( $arRes["LOGO"], array('width' => 100, 'height' => 100), BX_RESIZE_IMAGE_EXACT, false ); if( is_array($arFileTmp) && isset($arFileTmp["src"]) ) { $strResult .= ''; } } } $strResult .= ''; } $arBaloonFields = array( 'ENTITY_TYPE_ID' => $arCommunication["ENTITY_TYPE_ID"], 'ENTITY_ID' => $arCommunication["ENTITY_ID"], 'PREFIX' => "", 'CLASS_NAME' => 'crm-feed-client-name', 'CHECK_PERMISSIONS' => 'N' ); if ( $arCommunication["ENTITY_TYPE_ID"] == CCrmOwnerType::Lead && is_array($arCommunication["ENTITY_SETTINGS"]) ) { $arBaloonFields["TITLE"] = (isset($arCommunication["ENTITY_SETTINGS"]["LEAD_TITLE"]) ? htmlspecialcharsback($arCommunication["ENTITY_SETTINGS"]["LEAD_TITLE"]) : ""); $arBaloonFields["NAME"] = (isset($arCommunication["ENTITY_SETTINGS"]["NAME"]) ? htmlspecialcharsback($arCommunication["ENTITY_SETTINGS"]["NAME"]) : ""); $arBaloonFields["LAST_NAME"] = (isset($arCommunication["ENTITY_SETTINGS"]["LAST_NAME"]) ? htmlspecialcharsback($arCommunication["ENTITY_SETTINGS"]["LAST_NAME"]) : ""); $arBaloonFields["SECOND_NAME"] = (isset($arCommunication["ENTITY_SETTINGS"]["SECOND_NAME"]) ? htmlspecialcharsback($arCommunication["ENTITY_SETTINGS"]["SECOND_NAME"]) : ""); } $strResult .= ''; $strResult .= ''; $moreCnt = count($arField["VALUE"]) - 1; if ($moreCnt > 0) { $strResult .= "#clients_more_link#"; } $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "AVATAR_ID": if (intval($arField["VALUE"]) > 0) { $arFileTmp = CFile::ResizeImageGet( $arField["VALUE"], array('width' => $this->params["AVATAR_SIZE"], 'height' => $this->params["AVATAR_SIZE"]), BX_RESIZE_IMAGE_EXACT, false ); $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= ''; $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "SUM": if (intval($arField["VALUE"]["VALUE"]) > 0) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= ''.CCrmCurrency::MoneyToString($arField["VALUE"]["VALUE"], $arField["VALUE"]["CURRENCY"]).''; $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "PHONE": case "EMAIL": if (!empty($arField["VALUE"])) { $infos = CCrmFieldMulti::GetEntityTypes(); $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= CCrmViewHelper::PrepareFirstMultiFieldHtml( $arField["FORMAT"], $arField["VALUE"], $infos[$arField["FORMAT"]] ); if( count($arField["VALUE"]) > 1 || (!empty($arField["VALUE"]["WORK"]) && count($arField["VALUE"]["WORK"]) > 1) || (!empty($arField["VALUE"]["MOBILE"]) && count($arField["VALUE"]["MOBILE"]) > 1) || (!empty($arField["VALUE"]["FAX"]) && count($arField["VALUE"]["FAX"]) > 1) || (!empty($arField["VALUE"]["PAGER"]) && count($arField["VALUE"]["PAGER"]) > 1) || (!empty($arField["VALUE"]["OTHER"]) && count($arField["VALUE"]["OTHER"]) > 1) ) { $anchorID = mb_strtolower($arField["FORMAT"]); $strResult .= ''; } $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; if ( $arField["FORMAT"] === "PHONE" && defined("BX_COMP_MANAGED_CACHE") ) { $GLOBALS["CACHE_MANAGER"]->RegisterTag("CRM_CALLTO_SETTINGS"); } } break; case "TEXT_FORMATTED": case "TEXT_FORMATTED_BOLD": if ($arField["VALUE"] != CCrmLiveFeed::UntitledMessageStub) { $text_formatted = self::ParseText(htmlspecialcharsback($arField["VALUE"]), $arUF, $this->params); if ($text_formatted <> '') { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_colspan2#"; if ($arField["FORMAT"] === "TEXT_FORMATTED_BOLD") { $strResult .= "".$text_formatted.""; } else { $strResult .= $text_formatted; } $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } } break; case "COMBI_TITLE": if ( is_array($arField["VALUE"]) && array_key_exists("TITLE", $arField["VALUE"]) && $arField["VALUE"]["TITLE"] <> '' ) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; if (array_key_exists("URL", $arField["VALUE"]) && $arField["VALUE"]["URL"] <> '') { $strResult .= ''.$arField["VALUE"]["TITLE"].''; } elseif (array_key_exists("ONCLICK", $arField["VALUE"]) && $arField["VALUE"]["ONCLICK"] <> '') { $strResult .= ''.$arField["VALUE"]["TITLE"].''; } else { $strResult .= $arField["VALUE"]["TITLE"]; } $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "COMBI_TITLE_ID": if ( is_array($arField["VALUE"]) && array_key_exists("TITLE", $arField["VALUE"]) && $arField["VALUE"]["TITLE"] <> '' && array_key_exists("ID", $arField["VALUE"]) && $arField["VALUE"]["ID"] <> '' ) { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; if (array_key_exists("URL", $arField["VALUE"]) && $arField["VALUE"]["URL"] <> '') { $strResult .= ''.GetMessage("C_CRM_LF_COMBI_TITLE_ID_VALUE", array("#ID#" => $arField["VALUE"]["ID"], "#TITLE#" => $arField["VALUE"]["TITLE"])).''; } else { $strResult .= GetMessage("C_CRM_LF_COMBI_TITLE_ID_VALUE", array("#ID#" => $arField["VALUE"]["ID"], "#TITLE#" => $arField["VALUE"]["TITLE"])); } $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "TEXT_ADD": if ($arField["VALUE"] <> '') { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= ''.$arField["VALUE"].''; $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } break; case "TEXT": default: if ($arField["VALUE"] <> '') { $strResult .= "#row_begin#"; $strResult .= "#cell_begin_left#"; $strResult .= $arField["TITLE"].":"; $strResult .= "#cell_end#"; $strResult .= "#cell_begin_right#"; $strResult .= ''; $strResult .= $arField["VALUE"]; $strResult .= ''; $strResult .= "#cell_end#"; $strResult .= "#row_end#"; } } return $strResult; }'.CCrmViewHelper::PrepareEntityBaloonHtml($arBaloonFields).''; switch ($arCommunication["TYPE"]) { case 'EMAIL': $strResult .= ''; break; case 'PHONE': if (CCrmSipHelper::isEnabled()) { ob_start(); ?> $strResult .= ob_get_clean(); } $strResult .= ''.CCrmViewHelper::PrepareMultiFieldHtml( 'PHONE', array( 'VALUE' => $arCommunication["VALUE"], 'VALUE_TYPE_ID' => 'WORK' ), array( 'ENABLE_SIP' => true, 'SIP_PARAMS' => array( 'ENTITY_TYPE' => 'CRM_'.CCrmOwnerType::ResolveName($arCommunication["ENTITY_TYPE_ID"]), 'ENTITY_ID' => $arCommunication["ENTITY_ID"], 'SRC_ACTIVITY_ID' => $this->activity && isset($this->activity['ID']) ? $this->activity["ID"] : 0 ) ) ).''; if(defined("BX_COMP_MANAGED_CACHE")) { $GLOBALS["CACHE_MANAGER"]->RegisterTag("CRM_CALLTO_SETTINGS"); } break; } if (is_array($arCommunication["ENTITY_SETTINGS"]) && isset($arCommunication["ENTITY_SETTINGS"]["COMPANY_TITLE"])) { if (isset($arCommunication["ENTITY_SETTINGS"]["COMPANY_ID"])) { $strResult .= ''.$arCommunication["ENTITY_SETTINGS"]["COMPANY_TITLE"].''; } else { $strResult .= ''.$arCommunication["ENTITY_SETTINGS"]["COMPANY_TITLE"].''; } } else { $strResult .= ''; } $strResult .= ''; // crm-feed-client-right $strResult .= '
Понравилась статья? Хочется дополнительно мотивировать к написанию новых материалов или поддержать проект? Сделать это можно прямо сейчас.