<?if(!defined("B_PROLOG_INCLUDED";) || B_PROLOG_INCLUDED!==true)die();?>
<?if ($arResult["ID"];):?>
<h1 class="l-rest__title"><?=$arParams["INDEX_TITLE"];?></h1>
<h1 class="l-rest__title"><?=$arResult["UF_LIST_TITLE"]?$arResult["UF_LIST_TITLE"]:$arResult["NAME"];?></h1>
<?endif;?>
<?if (is_array($arParams["AVAILABLE_SORT_FIELD"];) && count($arParams["AVAILABLE_SORT_FIELD"];) > 0):?>
<div class="b-sort">
<span class="b-sort__label"><?=GetMessage("SORT_LABEL";);?>:</span>
<div class="b-sort__wrapper"><!--
<?foreach($arParams["AVAILABLE_SORT_FIELD"] as $sort):?>
<?if ($sort != $arParams["ELEMENT_SORT_FIELD"];):?>
--><a href="<?=$APPLICATION->GetCurPageParam("sort=".$sort, array("sort";));?>" class="b-sort__item t-link--internal"><?=GetMessage("SORT_".$sort);?></a><!--
<?else:?>
--><span class="b-sort__item active"><?=GetMessage("SORT_".$sort);?></span><!--
<?endif;?>
<?endforeach;?>
--></div>
</div>
<?endif;?>
<div class="b-rest-list">
<?foreach($arResult["ITEMS"] as $cell=>$arElement):
$this->AddEditAction($arElement['ID'], $arElement['EDIT_LINK'], CIBlock::GetArrayByID($arParams["IBLOCK_ID"], "ELEMENT_EDIT";));
$this->AddDeleteAction($arElement['ID'], $arElement['DELETE_LINK'], CIBlock::GetArrayByID($arParams["IBLOCK_ID"], "ELEMENT_DELETE";), array("CONFIRM" => GetMessage('CT_BCS_ELEMENT_DELETE_CONFIRM')));
?>
<div class="b-rest-list__item" id="<?=$this->GetEditAreaId($arElement['ID'];);?>">
<?if(is_array($arElement["PREVIEW_PICTURE"];)):?>
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>" class="b-rest-list__item__img__place">
<img class="b-rest-list__item__img" src="<?=$arElement["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arElement["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arElement["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arElement["NAME"]?>" title="<?=$arElement["NAME"]?>" />
</a>
<?else:?>
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>" class="b-rest-list__item__img__place empty"></a>
<?endif;?>
<div class="b-rest-list__item__content">
<h2 class="b-rest-list__item__title"><a href="<?=$arElement["DETAIL_PAGE_URL"]?>" class="b-rest-list__item__title__link"><?=$arElement["NAME"]?></a></h2>
<div class="b-rest-list__item__props">
<?foreach($arElement["DISPLAY_PROPERTIES"] as $pid=>$arProperty):
if ($arProperty["CODE"] == "MAP";) continue;
?>
<div class="b-rest-list__item__prop">
<span class="b-rest-list__item__prop__label"><?=$arProperty["NAME"]?>:</span>
<div class="b-rest-list__item__prop__value">
<?if(is_array($arProperty["DISPLAY_VALUE"];))
echo implode(" / ", $arProperty["DISPLAY_VALUE"];);
else
echo $arProperty["DISPLAY_VALUE"];?>
<?if ($arProperty["CODE"] == "ADDRESS";):
$map = $arElement["PROPERTIES"]["MAP"];
if ($map["VALUE"];):?>
<button data-map="<?=$map["VALUE"];?>" class="b-rest-list__item__prop__value__more t-link-area">
<i class="t-icon type_map"></i>
<span class="t-link--internal"><?=GetMessage("SHOW_MAP";);?></span>
</button>
<?endif;
endif;?>
</div>
</div>
<?endforeach?>
</div>
<div class="b-rest-list__item__text">
<?=$arElement["PREVIEW_TEXT"];?>
</div>
</div>
</div>
<?endforeach; // foreach($arResult["ITEMS"] as $arElement):?>
<?if($arParams["DISPLAY_BOTTOM_PAGER"] && $arResult["NAV_STRING"];):?>
<div class="b-rest-list__pages">
<?=$arResult["NAV_STRING"]?>
</div>
<?endif;?>
</div>