<?php use_helper('I18N', 'Date') ?>
<?php if (!$sf_request->isXmlHttpRequest()): ?>
<?php include_partial('cat/assets') ?>

<span class="lui__h1"><?php echo __('Каталог', array(), 'messages') ?></span><sup
    class="lui__list_count">&nbsp;<?php echo ($sf_request->getParameter('q') ? 'найдено:&nbsp;' : '');?><?php echo isset($pager) ? $pager->getNbResults() : ''; ?>&nbsp;</sup>

<?php include_partial('cat/flashes') ?>
    <script type="text/javascript">
        var offerQuantityType = {
            change: function (select) {
                var offerAllType = $('.offer_all_lang_quantity_type');
                if(select.value == ''){
                    offerAllType.show();
                }else{
                    offerAllType.hide();
                }
                $('.offer_quantity_type_select').val(select.value);
                offerAllType.val(select.value);
            },
            init: function () {
                if($('.offer_quantity_type_select').eq(0).val() != ''){
                    $('.offer_all_lang_quantity_type').hide();
                }
            }
        };
    </script>
    <style type="text/css">
        .a_overflow_hidden {
            overflow: hidden !important;
        }
        #a_layout_work__ct {
            height: 100%;
            border-top: 1px solid rgba(0, 0, 0, 0.15);
        }
        #a_layout_work__ct .a_form{
            padding: 10px;
        }
        .error_list {
            position: relative !important;
            color: #FF0000;
            margin: 0;
            padding: 0;
            font-size: 11px;
        }
        .a_form__supplier_id,
        .a_form__supplier_price{
            display: inline-block;
        }
        .a_form__supplier_id{
            margin-right: 5px;
        }
        .a_form__cats_list{
            display: none;
        }
        .lui_tab_links__item__current{
            background: transparent;
            border-bottom-color: #f7f7f7;
            border-top-color: #22292B !important;
        }
        .lui_tab_links__item{
            border-top-color: #f7f7f7;
        }
        .a_form_product .a_form__certificate,
        .a_form_product .a_form__is_main,
        .a_form_product .a_form__tags_list,
        .a_form_product .a_form__product_props{
            display: none;
        }
        .a_form_product_is_detail .a_form__certificate,
        .a_form_product_is_detail .a_form__tags_list,
        .a_form_product_is_detail .a_form__is_main,
        .a_form_product_is_detail .a_form__product_props{
            display: block;
        }
    </style>
<span class="br15"></span>

    <?php endif; ?>

    <?php if (isset($pager)): ?>

    <div id="a_layout_work__ct">
    <?php
    include_partial('struct', array('results' => array('cat' => $pager->getResults()), 'props' => true));
    ?>
    </div>

    <script type="text/javascript">
        var pathPrefix = sf_prefix + '/' + '<?php echo $this->getModuleName()?>/';
        $(document).ready(function () {
           aStruct.init();
        });
    </script>

    <?php endif; ?>

    <?php if (!$sf_request->isXmlHttpRequest()): ?>

<?php endif; ?>
<?php if (isset($replace_content) && $replace_content !== false): ?>
    <?php echo htmlspecialchars_decode($replace_content); ?>
<?php endif; ?>