Advertisement
Guest User

Untitled

a guest
Mar 26th, 2020
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.45 KB | None | 0 0
  1. <?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();?>
  2. <?$this->setFrameMode(true);?>
  3. <?use \Bitrix\Main\Localization\Loc;?>
  4. <?if($arParams["DISPLAY_PICTURE"] != "N"){
  5. $picture = ($arResult["FIELDS"]["DETAIL_PICTURE"] ? "DETAIL_PICTURE" : "PREVIEW_PICTURE");
  6. CNext::getFieldImageData($arResult, array($picture));
  7. $arPhoto = $arResult[$picture];
  8. if($arPhoto){
  9. $arImgs[] = array(
  10. 'DETAIL' => $arPhoto,
  11. 'PREVIEW' => CFile::ResizeImageGet($arPhoto["ID"], array('width' => 300, 'height' => 300), BX_RESIZE_IMAGE_PROPORTIONAL_ALT, true),
  12. 'TITLE' => (strlen($arPhoto['DESCRIPTION']) ? $arPhoto['DESCRIPTION'] : (strlen($arPhoto['TITLE']) ? $arPhoto['TITLE'] : $arResult['NAME'])),
  13. 'ALT' => (strlen($arPhoto['DESCRIPTION']) ? $arPhoto['DESCRIPTION'] : (strlen($arPhoto['ALT']) ? $arPhoto['ALT'] : $arResult['NAME'])),
  14. );
  15. }
  16. }
  17. if(isset($arResult['PROPERTIES']['BNR_TOP']) && $arResult['PROPERTIES']['BNR_TOP']['VALUE_XML_ID'] == 'YES' && $arParams["SHOW_TOP_BANNER"] == "Y")
  18. $templateData['SECTION_BNR_CONTENT'] = true;
  19. ?>
  20. <?// shot top banners start?>
  21. <?
  22. $bShowTopBanner = (isset($templateData['SECTION_BNR_CONTENT'] ) && $templateData['SECTION_BNR_CONTENT'] == true);
  23.  
  24.  
  25. if ($bShowTopBanner && $arResult["PROPERTIES"]["FORM_ORDER"]["VALUE"] == "Y") {
  26. $arResult["DISPLAY_PROPERTIES"]["FORM_ORDER"] = $arResult["PROPERTIES"]["FORM_ORDER"];
  27. $arResult["DISPLAY_PROPERTIES"]["FORM_ORDER"]["VALUE_XML_ID"] = "YES";
  28. $arParams['S_ORDER_SERVISE'] = "Заявка на подбор";
  29. }
  30. ?>
  31. <?if($bShowTopBanner):?>
  32. <?$this->SetViewTarget("section_bnr_content");?>
  33. <?CNext::ShowTopDetailBanner($arResult, $arParams);?>
  34. <?$this->EndViewTarget();?>
  35. <?endif;?>
  36. <?// shot top banners end?>
  37. <? if ($arResult['SHOW_CONTENT']) {?>
  38. <?//print_r($arResult['SHOW_CONTENT'])?>
  39. <div class="detail <?=($templateName = $component->{"__parent"}->{"__template"}->{"__name"})?>">
  40. <article>
  41. <?// images?>
  42. <?if($arImgs):?>
  43. <div class="detailimage">
  44. <?if($arImgs):?>
  45. <div class="img-partner">
  46. <img src="<?=$arImgs[0]["DETAIL"]["SRC"]?>" title="<?=$arImgs[0]["TITLE"]?>" alt="<?=$arImgs[0]["ALT"]?>" class="img-responsive" />
  47. </div>
  48. <?endif;?>
  49. </div>
  50. <?endif;?>
  51.  
  52. <div class="post-content">
  53. <?if($arParams["DISPLAY_NAME"] != "N" && strlen($arResult["NAME"])):?>
  54. <h2><?=$arResult["NAME"]?></h2>
  55. <?endif;?>
  56. <div class="content">
  57. <?// text?>
  58. <?if(strlen($arResult["FIELDS"]["PREVIEW_TEXT"].$arResult["FIELDS"]["DETAIL_TEXT"])):?>
  59. <div class="text">
  60. <?if($arResult["DETAIL_TEXT_TYPE"] == "text"):?>
  61. <p><?=$arResult["FIELDS"]["DETAIL_TEXT"];?></p>
  62. <?else:?>
  63. <?=$arResult["FIELDS"]["DETAIL_TEXT"];?>
  64. <?endif;?>
  65. </div>
  66. <?endif;?>
  67.  
  68. <?// display properties?>
  69. <?if($arResult["DISPLAY_PROPERTIES"]):?>
  70. <hr/>
  71. <div class="properties">
  72. <?foreach($arResult["DISPLAY_PROPERTIES"] as $PCODE => $arProperty):?>
  73. <?if ($PCODE === 'FORM_ORDER') continue;?>
  74. <?$bIconBlock = ($PCODE == 'EMAIL' || $PCODE == 'PHONE' || $PCODE == 'SITE');?>
  75. <div class="inner-wrapper">
  76. <div class="property <?=($bIconBlock ? "icon-block" : "");?> <?=strtolower($PCODE);?>">
  77. <?if(!$bIconBlock):?>
  78. <?=$arProperty['NAME']?>:&nbsp;
  79. <?endif;?>
  80. <?if(is_array($arProperty["DISPLAY_VALUE"])):?>
  81. <?$val = implode("&nbsp;/ ", $arProperty["DISPLAY_VALUE"]);?>
  82. <?else:?>
  83. <?$val = $arProperty["DISPLAY_VALUE"];?>
  84. <?endif;?>
  85. <?if($PCODE == "SITE"):?>
  86. <!--noindex-->
  87. <a href="<?=(strpos($arProperty['VALUE'], 'http') === false ? 'http://' : '').$arProperty['VALUE'];?>" rel="nofollow" target="_blank">
  88. <?=$arProperty['VALUE'];?>
  89. </a>
  90. <!--/noindex-->
  91. <?elseif($PCODE == "EMAIL"):?>
  92. <a href="mailto:<?=$val?>"><?=$val?></a>
  93. <?else:?>
  94. <?=$val?>
  95. <?endif;?>
  96. </div>
  97. </div>
  98. <?endforeach;?>
  99. </div>
  100. <?endif;?>
  101. </div>
  102. </div>
  103. </article>
  104. </div>
  105.  
  106. <?if($arResult['GALLERY']):?>
  107. <div class="wraps with-padding galerys-block">
  108. <hr />
  109. <h5><?=$arParams['T_GALLERY'];?></h5>
  110. <div class="small-gallery-block">
  111. <div class="flexslider unstyled front border custom_flex top_right color-controls" data-plugin-options='{"animation": "slide", "directionNav": true, "controlNav" :true, "animationLoop": true, "slideshow": false, "counts": [4, 3, 2, 1]}'>
  112. <ul class="slides items">
  113. <?foreach($arResult['GALLERY'] as $i => $arPhoto):?>
  114. <li class="col-md-3 item">
  115. <div>
  116. <img src="<?=$arPhoto['PREVIEW']['src']?>" class="img-responsive inline" title="<?=$arPhoto['TITLE']?>" alt="<?=$arPhoto['ALT']?>" />
  117. </div>
  118. <a href="<?=$arPhoto['DETAIL']['SRC']?>" class="fancy dark_block_animate" rel="gallery" target="_blank" title="<?=$arPhoto['TITLE']?>"></a>
  119. </li>
  120. <?endforeach;?>
  121. </ul>
  122. </div>
  123. </div>
  124. </div>
  125. <?endif;?>
  126.  
  127. <?// docs files?>
  128. <?if($arResult['DOCUMENTS']):?>
  129. <div class="wraps docs-block">
  130. <hr/>
  131. <h5><?=(strlen($arParams['T_DOCS']) ? $arParams['T_DOCS'] : Loc::getMessage('T_DOCS'))?></h5>
  132. <div class="files_block">
  133. <div class="row">
  134. <?foreach($arResult['DOCUMENTS']['VALUE'] as $arItem):?>
  135. <div class="col-md-3 col-sm-6">
  136. <?$arFile=CNext::GetFileInfo($arItem);?>
  137. <div class="file_type clearfix <?=$arFile["TYPE"];?>">
  138. <i class="icon"></i>
  139. <div class="description">
  140. <a target="_blank" href="<?=$arFile["SRC"];?>" class="dark_link"><?=$arFile["DESCRIPTION"];?></a>
  141. <span class="size">
  142. <?=$arFile["FILE_SIZE_FORMAT"];?>
  143. </span>
  144. </div>
  145. </div>
  146. </div>
  147. <?endforeach;?>
  148. </div>
  149. </div>
  150. </div>
  151. <?endif;?>
  152. <?}?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement