<? 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);
if ($arResult["ITEMS"]):?>

    <section class="actions">
        <?php if ($arParams['BLOCK_TITLE']): ?>
            <h2 class="title-block underline"><?php echo $arParams['BLOCK_TITLE'] ?></h2>
        <?php endif ?>

        <ul class="actions__list">
            <? 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')));
                $file = CFile::ResizeImageGet($arItem["PREVIEW_PICTURE"], array('width' => 220, 'height' => 300), BX_RESIZE_IMAGE_PROPORTIONAL, true);
                ?>
                <li class="actions__item"
                    id="<?= $this->GetEditAreaId($arItem['ID']); ?>">
                    <p class="actions__title"><?php echo $arItem['NAME']?></p>
                    <p class="actions__image"><img
                                class="preview_picture"
                                border="0"
                                src="<?= $file['src'] ?>"
                                width="<?= $arItem["PREVIEW_PICTURE"]["WIDTH"] ?>"
                                height="<?= $arItem["PREVIEW_PICTURE"]["HEIGHT"] ?>"
                                alt="<?= $arItem["PREVIEW_PICTURE"]["ALT"] ?>"
                                title="<?= $arItem["PREVIEW_PICTURE"]["TITLE"] ?>"
                        /></p>
                    <?php if($arItem['PREVIEW_TEXT']):?>
                        <div class="actions__text"><?php echo $arItem['PREVIEW_TEXT']?></div>
                    <?php endif?>
                    <p class="actions__button" data-event="jqm" data-param-id="33" data-name="action" data-action="<?php echo $arItem['NAME']?>">
                        <a class="btn btn-default btn-xl">Заказать услугу</a>
                    </p>
                </li>
            <? endforeach; ?>
        </ul>
    </section>

<?php endif;