<?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);
?>
<div class="search_form">
	<form id="revocation_form" method="GET" action="/revocation/">
		<input type="hidden" id="revocation_sort" name="sort"/>
		<input type="hidden" id="revocation_order" name="order"/>
		<div class="form_field single">
			<input id="revocation_search_form_field" type="search" name="search" placeholder="Поиск по номеру доверенности" value="<?= $arResult['SEARCH']; ?>" />
			<button id="revocation_search_form_clear_button" class="clear" style="display:<?= !empty($arResult['SEARCH']) ? "block" : "none"; ?>;"></button>
		</div>
		<button id="revocation_search_form_search_button" class="button primary" >Поиск</button>
	</form>
</div>
<div class="contract_table">
	<div class="table_row table_header">
		<div class="table_cell revocation_table_header caret <?= $arResult['SORT'] === "to" && $arResult['ORDER'] === "asc" ? "reverse" : ""; ?>" data-type="to">Дата отмены доверенности</div>
		<div class="table_cell revocation_table_header caret <?= $arResult['SORT'] === "number" && $arResult['ORDER'] === "asc" ? "reverse" : ""; ?>" data-type="number">Номер доверенности</div>
		<div class="table_cell revocation_table_header caret <?= $arResult['SORT'] === "from" && $arResult['ORDER'] === "asc" ? "reverse" : ""; ?>" data-type="from">Дата доверенности</div>
		<div class="table_cell revocation_table_header caret <?= $arResult['SORT'] === "name" && $arResult['ORDER'] === "asc" ? "reverse" : ""; ?>" data-type="name">Кому выдана</div>
	</div>
	<? foreach($arResult['ITEMS'] AS $revocation): ?>
		<div class="table_row">
			<div class="table_cell" data-title="Дата отмены доверенности"><?= $revocation['ACTIVE_TO']; ?></div>
			<div class="table_cell" data-title="Номер доверенности"><?= $revocation['NAME']; ?></div>
			<div class="table_cell" data-title="Дата доверенности"><?= $revocation['ACTIVE_FROM']; ?></div>
			<div class="table_cell" data-title="Кому выдана"><?= $revocation['CODE']; ?></div>
		</div>
	<? endforeach; ?>
	<?= $arResult['NAV_STRING']; ?>
</div>