-
-
Save PeleVla/957c1dc7cd677aec9187be14794672d4 to your computer and use it in GitHub Desktop.
template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); | |
$this->setFrameMode(true); | |
?> | |
<?foreach($arResult["ITEMS"] as $arItem):?> | |
<? | |
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT")); | |
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM'))); | |
?> | |
<? | |
$arPhotoSmall = CFile::ResizeImageGet( | |
$arItem["PREVIEW_PICTURE"], | |
array( | |
'width'=>242, | |
'height'=>161 | |
), | |
BX_RESIZE_IMAGE_PROPORTIONAL, | |
Array() | |
); | |
?> | |
<?if($arItem["PROPERTIES"]["HIDE_ON_MAIN"]["VALUE"]=="Да") continue;?> | |
<div class="news-card" id="<?=$this->GetEditAreaId($arItem['ID']);?>"> | |
<div class="row"> | |
<div class="img-block-news col-xs"> | |
<?if(is_array($arPhotoSmall)):?> | |
<?if($arParams["DISPLAY_PICTURE"]!="N" && is_array($arItem["PREVIEW_PICTURE"])):?> | |
<?if(!$arParams["HIDE_LINK_WHEN_NO_DETAIL"] || ($arItem["DETAIL_TEXT"] && $arResult["USER_HAVE_ACCESS"])):?> | |
<a href="<?=$arItem["DETAIL_PAGE_URL"]?>"><img | |
src="<?=$arPhotoSmall["src"]?>" | |
alt="<?=$arItem["PREVIEW_PICTURE"]["ALT"]?>" | |
title="<?=$arItem["PREVIEW_PICTURE"]["TITLE"]?>" | |
/></a> | |
<?else:?> | |
<img | |
src="<?=$arPhotoSmall["src"]?>" | |
alt="<?=$arItem["PREVIEW_PICTURE"]["ALT"]?>" | |
title="<?=$arItem["PREVIEW_PICTURE"]["TITLE"]?>" | |
/> | |
<?endif;?> | |
<?endif?> | |
<?else:?> | |
<img | |
src="/upload/news.jpg" | |
width="242px" | |
height="161px" | |
/> | |
<?endif?> | |
</div> | |
<div class="text-block-news col-xs"> | |
<?if($arParams["DISPLAY_DATE"]!="N" && $arItem["DISPLAY_ACTIVE_FROM"]):?> | |
<div class="data-news"><?echo $arItem["DISPLAY_ACTIVE_FROM"]?></div> | |
<?endif?> | |
<div class="header-text-block-news"> | |
<?if($arParams["DISPLAY_NAME"]!="N" && $arItem["NAME"]):?> | |
<?if(!$arParams["HIDE_LINK_WHEN_NO_DETAIL"] || ($arItem["DETAIL_TEXT"] && $arResult["USER_HAVE_ACCESS"])):?> | |
<a href="<?echo $arItem["DETAIL_PAGE_URL"]?>"><b><?echo $arItem["NAME"]?></b></a><br /> | |
<?else:?> | |
<b><?echo $arItem["NAME"]?></b><br /> | |
<?endif;?> | |
<?endif;?> | |
</div> | |
<div class="text-text-block-news"> | |
<?if($arParams["DISPLAY_PREVIEW_TEXT"]!="N" && $arItem["PREVIEW_TEXT"]):?> | |
<?echo $arItem["PREVIEW_TEXT"];?> | |
<?endif;?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<?endforeach;?> | |
<?$bxajaxid = CAjax::GetComponentID($component->__name, $component->__template->__name);?> | |
<?if($arResult["NAV_RESULT"]->nEndPage > 1 && $arResult["NAV_RESULT"]->NavPageNomer<$arResult["NAV_RESULT"]->nEndPage):?> | |
<div id="btn_<?=$bxajaxid?>" class="more-info-news"> | |
<a data-ajax-id="<?=$bxajaxid?>" data-show-more="<?=$arResult["NAV_RESULT"]->NavNum?>" data-next-page="<?=($arResult["NAV_RESULT"]->NavPageNomer + 1)?>" data-max-page="<?=$arResult["NAV_RESULT"]->nEndPage?>" href="javascript:void(0)"> <img src="<?=SITE_TEMPLATE_PATH?>/img/arrow.png" alt=""> еще новости</a> | |
</div> | |
<?endif?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment