%PDF- %PDF-
Direktori : /home/bitrix/www/bitrix/components/bitrix/iblock.element.add.list/templates/.default/ |
Current File : /home/bitrix/www/bitrix/components/bitrix/iblock.element.add.list/templates/.default/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(false); $colspan = 2; if ($arResult["CAN_EDIT"] == "Y") $colspan++; if ($arResult["CAN_DELETE"] == "Y") $colspan++; ?> <?if (strlen($arResult["MESSAGE"]) > 0):?> <?ShowNote($arResult["MESSAGE"])?> <?endif?> <table class="data-table"> <?if($arResult["NO_USER"] == "N"):?> <thead> <tr> <td<?=$colspan > 1 ? " colspan=\"".$colspan."\"" : ""?>><?=GetMessage("IBLOCK_ADD_LIST_TITLE")?></td> </tr> </thead> <tbody> <?if (count($arResult["ELEMENTS"]) > 0):?> <?foreach ($arResult["ELEMENTS"] as $arElement):?> <tr> <td><!--a href="detail.php?CODE=<?=$arElement["ID"]?>"--><?=$arElement["NAME"]?><!--/a--></td> <td><small><?=is_array($arResult["WF_STATUS"]) ? $arResult["WF_STATUS"][$arElement["WF_STATUS_ID"]] : $arResult["ACTIVE_STATUS"][$arElement["ACTIVE"]]?></small></td> <?if ($arResult["CAN_EDIT"] == "Y"):?> <td><?if ($arElement["CAN_EDIT"] == "Y"):?><a href="<?=$arParams["EDIT_URL"]?>?edit=Y&CODE=<?=$arElement["ID"]?>"><?=GetMessage("IBLOCK_ADD_LIST_EDIT")?><?else:?> <?endif?></a></td> <?endif?> <?if ($arResult["CAN_DELETE"] == "Y"):?> <td><?if ($arElement["CAN_DELETE"] == "Y"):?><a href="?delete=Y&CODE=<?=$arElement["ID"]?>&<?=bitrix_sessid_get()?>" onClick="return confirm('<?echo CUtil::JSEscape(str_replace("#ELEMENT_NAME#", $arElement["NAME"], GetMessage("IBLOCK_ADD_LIST_DELETE_CONFIRM")))?>')"><?=GetMessage("IBLOCK_ADD_LIST_DELETE")?></a><?else:?> <?endif?></td> <?endif?> </tr> <?endforeach?> <?else:?> <tr> <td<?=$colspan > 1 ? " colspan=\"".$colspan."\"" : ""?>><?=GetMessage("IBLOCK_ADD_LIST_EMPTY")?></td> </tr> <?endif?> </tbody> <?endif?> <tfoot> <tr> <td<?=$colspan > 1 ? " colspan=\"".$colspan."\"" : ""?>><?if ($arParams["MAX_USER_ENTRIES"] > 0 && $arResult["ELEMENTS_COUNT"] < $arParams["MAX_USER_ENTRIES"]):?><a href="<?=$arParams["EDIT_URL"]?>?edit=Y"><?=GetMessage("IBLOCK_ADD_LINK_TITLE")?></a><?else:?><?=GetMessage("IBLOCK_LIST_CANT_ADD_MORE")?><?endif?></td> </tr> </tfoot> </table> <?if (strlen($arResult["NAV_STRING"]) > 0):?><?=$arResult["NAV_STRING"]?><?endif?>