<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?if($arParams["DISPLAY_TOP_PAGER"]):?>
  <?=$arResult["NAV_STRING"]?>
<?endif;?>
<ul class="media-list">
  <?foreach($arResult["ITEMS"] as $arItem):?>
    <li class="media managment-custom">
	<?if($arParams["DISPLAY_NAME"]!="N" && $arItem["NAME"]):?>
      <?if(!$arParams["HIDE_LINK_WHEN_NO_DETAIL"] || ($arItem["DETAIL_TEXT"] && $arResult["USER_HAVE_ACCESS"])):?>
        <h2><a href="<?echo $arItem["DETAIL_PAGE_URL"]?>"><?if(strlen($arItem["DISPLAY_PROPERTIES"]["POST"]["DISPLAY_VALUE"]) > 0):?><i><?echo $arItem["DISPLAY_PROPERTIES"]["POST"]["DISPLAY_VALUE"];?></i><br /> <?endif;?><?echo $arItem["NAME"]?></a></h2>
      <?else:?>
        <h2><?if(strlen($arItem["DISPLAY_PROPERTIES"]["POST"]["DISPLAY_VALUE"]) > 0):?><i><?echo $arItem["DISPLAY_PROPERTIES"]["POST"]["DISPLAY_VALUE"];?></i><br /> <?endif;?><?echo $arItem["NAME"]?></h2>
      <?endif;?>
    <?endif;?>
	
	<?if($arParams["DISPLAY_DATE"]!="N" && $arItem["DISPLAY_ACTIVE_FROM"]):?>
        <p><span class="news-date-time"><?echo $arItem["DISPLAY_ACTIVE_FROM"]?></span><p>
    <?endif?>
    <div class="media-body">
    <?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 class="pull-left" href="<?=$arItem["DETAIL_PAGE_URL"]?>">
          <img class="media-object preview_picture" border="0" src="<?=$arItem["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arItem["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arItem["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arItem["PREVIEW_PICTURE"]["ALT"]?>" title="<?=$arItem["NAME"]?>" />
        </a>
      <?else:?>
        <span class="pull-left"><img lass="media-object preview_picture" border="0" src="<?=$arItem["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arItem["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arItem["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arItem["PREVIEW_PICTURE"]["ALT"]?>" title="<?=$arItem["NAME"]?>" /></span>
      <?endif;?>
    <?endif?>
    <?if($arParams["DISPLAY_PREVIEW_TEXT"]!="N" && $arItem["PREVIEW_TEXT"]):?>
      <p><?echo $arItem["PREVIEW_TEXT"];?></p>
    <?endif;?>
    <?foreach($arItem["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
      <?if($pid!="POST"):?>
            
            <p>
              <small>
              <?=$arProperty["NAME"]?>:&nbsp;
              <?if(is_array($arProperty["DISPLAY_VALUE"])):?>
                <?=implode("&nbsp;/&nbsp;", $arProperty["DISPLAY_VALUE"]);?>
              <?else:?>
                <?=$arProperty["DISPLAY_VALUE"];?>
              <?endif?>
              </small>
            </p>
            
            <?endif;?>
            <?endforeach;?>

          <?foreach($arItem["FIELDS"] as $code=>$value):
            if($code!="SHOW_COUNTER" || ($code=="SHOW_COUNTER" && showCounter()) ):?>
              <p>
                <small>
                  <?=GetMessage("IBLOCK_FIELD_".$code)?>:&nbsp;<?=$value;?>
                </small>
              </p>
          <?endif;
          endforeach;?>
	  </div>
	</li>
  <?endforeach;?> 
</ul>
<?if($arParams["DISPLAY_BOTTOM_PAGER"]):?>
  <?=$arResult["NAV_STRING"]?>
<?endif;?>