Current Path : /home/bitrix/ext_www/klimatlend.ua/inc/ |
Current File : /home/bitrix/ext_www/klimatlend.ua/inc/microfisha.php |
<? global $USER; $microfishaCode = "MICROFISHA"; $microfishaIblock = 42; $fisha = array(); foreach ($arResult["PROPERTIES"][$microfishaCode]["VALUE"] as $itemId){ $arSelect = Array("ID", 'IBLOCK_ID', "PROPERTY_*"); $arFilter = array('IBLOCK_ID' =>$microfishaIblock, "ID"=>$itemId, "ACTIVE"=> 'Y'); $res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>50), $arSelect); while($ob = $res->GetNextElement()){ $arFields = $ob->GetFields(); $arProps = $ob->GetProperties(); $fisha [$arFields['ID']] = array( "ID" => $arFields['ID'], "NAME" => $arProps['NAME']["VALUE"], "FILE" => CFile::GetPath($arProps['FILE']["VALUE"]) ); } } //pre1($fisha); ?> <style> .Specs-section-column-title { margin-bottom: 25px; } .DownloadList { margin: 0; padding: 0; list-style: none; } .DownloadList-item { margin-bottom: 10px; background-color: rgba(154, 69, 150, 0.03); } .DownloadList-item-link { display: -ms-flexbox; display: flex; -ms-flex-align: stretch; align-items: stretch; position: relative; min-height: 50px; color: #4f4e53; text-decoration: none; } .DownloadList-item-icon { display: -ms-flexbox; display: flex; -ms-flex-pack: center; justify-content: center; -ms-flex-align: center; align-items: center; width: 50px; background-color: #852f7d; color: #fff; } .DownloadList-item-icon { width: 65px; } .DownloadList-item-icon .SvgIcon { width: 47%; height: auto; } svg:not(:root) { overflow: hidden; } .SvgIcon { display: inline-block; vertical-align: text-bottom; width: 1.3em; height: 1.3em; fill: currentColor; } .DownloadList-item-meta { -ms-flex: 1; flex: 1; padding: 10px; line-height: 1; font-family: Light, Noto Sans, Arial, sans-serif; transition: all .3s; -webkit-backface-visibility: hidden; backface-visibility: hidden; word-break: break-all; } .DownloadList-item-meta { padding: 15px 25px; word-break: normal; } .DownloadList-item-meta-title { display: block; font-family: Regular, Noto Sans, Arial, sans-serif; font-size: 15px; } .DownloadList-item-meta-info { margin-top: 2px; font-size: 13px; } </style> <?if(count($fisha) >= 1):?> <div class="row"> <h5 class="Specs-section-column-title" style="margin-left: 30px;font-weight: 800">Документи по товару:</h5> <ul class="DownloadList"> <?foreach ($fisha as $item):?> <div class="col-sx-4 col-md-4 col-lg-3"> <li class="DownloadList-item"> <a id="SpecsDownloadLink-0" href="<?=$item["FILE"]?>" target="_blank" class="DownloadList-item-link"> <span class="DownloadList-item-icon"> <svg viewBox="0 0 160 160" class="SvgIcon SvgIcon--document"><path d="M104.284 5H19.063v150h121.875V41.682L104.284 5zm27.277 140.564H28.419V14.373H99.71v31.923h31.851v99.268z"></path></svg></span> <span class="DownloadList-item-meta"><span class="DownloadList-item-meta-title"><?=$item["NAME"]?></span> <span class="DownloadList-item-meta-info">PDF</span></span></a></li> </div> <?endforeach;?> </ul> </div> <?endif;?>