%PDF- %PDF-
Direktori : /home/bitrix/www/bitrix/components/bitrix/news.detail/templates/flat/ |
Current File : /home/bitrix/www/bitrix/components/bitrix/news.detail/templates/flat/template.php |
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); /** @var array $arParams */ /** @var array $arResult */ /** @global CMain $APPLICATION */ /** @global CUser $USER */ /** @global CDatabase $DB */ /** @var CBitrixComponentTemplate $this */ /** @var string $templateName */ /** @var string $templateFile */ /** @var string $templateFolder */ /** @var string $componentPath */ /** @var CBitrixComponent $component */ $this->setFrameMode(true); $this->addExternalCss("/bitrix/css/main/bootstrap.css"); $this->addExternalCss("/bitrix/css/main/font-awesome.css"); $this->addExternalCss($this->GetFolder().'/themes/'.$arParams['TEMPLATE_THEME'].'/style.css'); CUtil::InitJSCore(array('fx')); ?> <div class="bx-newsdetail"> <div class="bx-newsdetail-block" id="<?echo $this->GetEditAreaId($arResult['ID'])?>"> <?if($arParams["DISPLAY_PICTURE"]!="N"):?> <?if ($arResult["VIDEO"]):?> <div class="bx-newsdetail-youtube embed-responsive embed-responsive-16by9" style="display: block;"> <iframe src="<?echo $arResult["VIDEO"]?>" frameborder="0" allowfullscreen=""></iframe> </div> <?elseif ($arResult["SOUND_CLOUD"]):?> <div class="bx-newsdetail-audio"> <iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?echo urlencode($arResult["SOUND_CLOUD"])?>&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false"></iframe> </div> <?elseif ($arResult["SLIDER"] && count($arResult["SLIDER"]) > 1):?> <div class="bx-newsdetail-slider"> <div class="bx-newsdetail-slider-container" style="width: <?echo count($arResult["SLIDER"])*100?>%;left: 0%;"> <?foreach ($arResult["SLIDER"] as $file):?> <div style="width: <?echo 100/count($arResult["SLIDER"])?>%;" class="bx-newsdetail-slider-slide"> <img src="<?=$file["SRC"]?>" alt="<?=$file["DESCRIPTION"]?>"> </div> <?endforeach?> <div style="clear: both;"></div> </div> <div class="bx-newsdetail-slider-arrow-container-left"><div class="bx-newsdetail-slider-arrow"><i class="fa fa-angle-left" ></i></div></div> <div class="bx-newsdetail-slider-arrow-container-right"><div class="bx-newsdetail-slider-arrow"><i class="fa fa-angle-right"></i></div></div> <ul class="bx-newsdetail-slider-control"> <?foreach ($arResult["SLIDER"] as $i => $file):?> <li rel="<?=($i+1)?>" <?if (!$i) echo 'class="current"'?>><span></span></li> <?endforeach?> </ul> </div> <?elseif ($arResult["SLIDER"]):?> <div class="bx-newsdetail-img"> <img src="<?=$arResult["SLIDER"][0]["SRC"]?>" width="<?=$arResult["SLIDER"][0]["WIDTH"]?>" height="<?=$arResult["SLIDER"][0]["HEIGHT"]?>" alt="<?=$arResult["SLIDER"][0]["ALT"]?>" title="<?=$arResult["SLIDER"][0]["TITLE"]?>" /> </div> <?elseif (is_array($arResult["DETAIL_PICTURE"])):?> <div class="bx-newsdetail-img"> <img src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["DETAIL_PICTURE"]["ALT"]?>" title="<?=$arResult["DETAIL_PICTURE"]["TITLE"]?>" /> </div> <?endif;?> <?endif?> <?if($arParams["DISPLAY_NAME"]!="N" && $arResult["NAME"]):?> <h3 class="bx-newsdetail-title"><?=$arResult["NAME"]?></h3> <?endif;?> <div class="bx-newsdetail-content"> <?if($arResult["NAV_RESULT"]):?> <?if($arParams["DISPLAY_TOP_PAGER"]):?><?=$arResult["NAV_STRING"]?><br /><?endif;?> <?echo $arResult["NAV_TEXT"];?> <?if($arParams["DISPLAY_BOTTOM_PAGER"]):?><br /><?=$arResult["NAV_STRING"]?><?endif;?> <?elseif(strlen($arResult["DETAIL_TEXT"])>0):?> <?echo $arResult["DETAIL_TEXT"];?> <?else:?> <?echo $arResult["PREVIEW_TEXT"];?> <?endif?> </div> <?foreach($arResult["FIELDS"] as $code=>$value):?> <?if($code == "SHOW_COUNTER"):?> <div class="bx-newsdetail-view"><i class="fa fa-eye"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>: <?=intval($value);?> </div> <?elseif($code == "SHOW_COUNTER_START" && $value):?> <? $value = CIBlockFormatProperties::DateFormat($arParams["ACTIVE_DATE_FORMAT"], MakeTimeStamp($value, CSite::GetDateFormat())); ?> <div class="bx-newsdetail-date"><i class="fa fa-calendar-o"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>: <?=$value;?> </div> <?elseif($code == "TAGS" && $value):?> <div class="bx-newsdetail-tags"><i class="fa fa-tag"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>: <?=$value;?> </div> <?elseif($code == "CREATED_USER_NAME"):?> <div class="bx-newsdetail-author"><i class="fa fa-user"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>: <?=$value;?> </div> <?elseif ($value != ""):?> <div class="bx-newsdetail-other"><i class="fa"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>: <?=$value;?> </div> <?endif;?> <?endforeach;?> <?foreach($arResult["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?> <? if(is_array($arProperty["DISPLAY_VALUE"])) $value = implode(" / ", $arProperty["DISPLAY_VALUE"]); else $value = $arProperty["DISPLAY_VALUE"]; ?> <?if($arProperty["CODE"] == "FORUM_MESSAGE_CNT"):?> <div class="bx-newsdetail-comments"><i class="fa fa-comments"></i> <?=$arProperty["NAME"]?>: <?=$value;?> </div> <?elseif ($value != ""):?> <div class="bx-newsdetail-other"><i class="fa"></i> <?=$arProperty["NAME"]?>: <?=$value;?> </div> <?endif;?> <?endforeach;?> <?if($arParams["DISPLAY_DATE"]!="N" && $arResult["DISPLAY_ACTIVE_FROM"]):?> <div class="bx-newsdetail-date"><i class="fa fa-calendar-o"></i> <?echo $arResult["DISPLAY_ACTIVE_FROM"]?></div> <?endif?> <?if($arParams["USE_RATING"]=="Y"):?> <div class="bx-newsdetail-separator">|</div> <div class="bx-newsdetail-rating"> <?$APPLICATION->IncludeComponent( "bitrix:iblock.vote", "flat", Array( "IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], "IBLOCK_ID" => $arParams["IBLOCK_ID"], "ELEMENT_ID" => $arResult["ID"], "MAX_VOTE" => $arParams["MAX_VOTE"], "VOTE_NAMES" => $arParams["VOTE_NAMES"], "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"], "DISPLAY_AS_RATING" => $arParams["DISPLAY_AS_RATING"], "SHOW_RATING" => "Y", ), $component );?> </div> <?endif?> <div class="row"> <div class="col-xs-5"> </div> <? if ($arParams["USE_SHARE"] == "Y") { ?> <div class="col-xs-7 text-right"> <noindex> <? $APPLICATION->IncludeComponent("bitrix:main.share", $arParams["SHARE_TEMPLATE"], array( "HANDLERS" => $arParams["SHARE_HANDLERS"], "PAGE_URL" => $arResult["~DETAIL_PAGE_URL"], "PAGE_TITLE" => $arResult["~NAME"], "SHORTEN_URL_LOGIN" => $arParams["SHARE_SHORTEN_URL_LOGIN"], "SHORTEN_URL_KEY" => $arParams["SHARE_SHORTEN_URL_KEY"], "HIDE" => $arParams["SHARE_HIDE"], ), $component, array("HIDE_ICONS" => "Y") ); ?> </noindex> </div> <? } ?> </div> </div> </div> <script type="text/javascript"> BX.ready(function() { var slider = new JCNewsSlider('<?=CUtil::JSEscape($this->GetEditAreaId($arResult['ID']));?>', { imagesContainerClassName: 'bx-newsdetail-slider-container', leftArrowClassName: 'bx-newsdetail-slider-arrow-container-left', rightArrowClassName: 'bx-newsdetail-slider-arrow-container-right', controlContainerClassName: 'bx-newsdetail-slider-control' }); }); </script>