<?php
$view->extend('MarketZodacoBundle::base.html.php');

$view['slots']->set('title', $view['translator']->trans("Categories") . " " . $view['translator']->trans($cat->getShortTitle())." | ".$view['translator']->trans("Zodaco Market"));
?>
<div class="col-sm-12 col-lg-12 main" id="bggg" style="color: #FFF;height: 200px; background: #A93C3C;">
    <div class="container" style="margin-top: -10px;color: #FFF;background-image: url(<?php echo $view->escape('/uploads/categories/'); ?><?php echo $cat->getLargeIcon(); ?>); background-size: 500px 200px; background-repeat: no-repeat; background-position: right center; background-origin: content-box;position: relative;z-index: 1;">
        <div class="catcat" style="color: #FFF;margin-top:0px;width:100%;padding-top:0px;height:200px;">
            <h1 style="padding-top: 45px; color: #FFF;"><?php echo $view['translator']->trans($cat->getShortTitle()); ?></h1>
            <p><?php
            echo $view['translator']->trans($cat->getLongTitle()); ?></p>
        </div>
    </div>
</div>
<div class="col-sm-12 col-lg-12 main" id="mainContents">
    <div class="container">
        <div class="row">
            <div class="col-lg-9 no-padding">
                <?php
                if ($list) {
                    foreach ($list as $value1) {
                        $url = $view['router']->generate('view_products', array('id' => $value1->getId(), 'title' => Market\ZodacoBundle\System::_reString($view['translator']->trans($value1->getTitle()))), true);
                        ?>
                        <div class="col-lg-4">
                            <div class="panel panel-default itemBorder">
                                <div class="panel-body itemList">
                                    <div class="preview">
                                        <a href="<?php echo $url; ?>"><img class="tool" title="<?php echo $view['translator']->trans($value1->getShortDetails()); ?>" src="<?php echo $view->escape('/uploads/items/'); ?><?php echo $value1->getPreview(); ?>" ></a>
                                    </div>
                                    <div class="thumbnail1">
                                        <a href="<?php echo $url; ?>"><img class="tool" title="<?php echo $view['translator']->trans($value1->getTitle()); ?>" src="<?php echo $view->escape('/uploads/items/'); ?><?php echo $value1->getIcon(); ?>" ></a>
                                    </div>
                                    <div class="details">
                                        <a href="<?php echo $url; ?>"><?php echo $view['translator']->trans($value1->getTitle()); ?></a>
                                    </div>
                                    <div class="short_details">
                                        <?php echo $view['translator']->trans($value1->getShortDetails()); ?>
                                    </div>
                                    <div class="sub_category">
                                        <a href="<?php echo $view['router']->generate('view_categories', array('id' => $value1->getCategories()->getId(), 'title' => Market\ZodacoBundle\System::_reString($view['translator']->trans($value1->getCategories()->getShortTitle()))), true); ?>"><img src="<?php echo $view->escape('/uploads/categories/'); ?><?php echo $value1->getCategories()->getSmallIcon(); ?>" class="tool" title="<?php echo $view['translator']->trans($value1->getCategories()->getTitle()) . " : " . $view['translator']->trans($value1->getCategories()->getShortTitle()); ?>"></a>
                                        <p><?php echo $view['translator']->trans("$"); ?><?php echo number_format($value1->getPrice(), 2); ?></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php
                    }
                } else {
                    ?>
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <center><?php echo $view['translator']->trans("No Data"); ?></center>
                        </div>
                    </div>
                <?php }
                ?>
                <?php
                if ($page["NextPage"] > 1):
                    $urlNext = $view['router']->generate('view_categories', array('id' => $cat->getId(), 'title' => Market\ZodacoBundle\System::_reString($view['translator']->trans($cat->getShortTitle()))), true);
                    ?>
                    <div class="pull-right pagination" style="width: 100%; display: block;">
                        <ul class="pagination">
                            <?php if ($page["PreviousPage"] != $page["Page"]): ?>
                                <li class="page-pre"><a href="<?php echo $urlNext . '?p=' . $page["PreviousPage"]; ?>">&lt;</a></li>
                            <?php endif; ?>
                            <li class="page-number"><a href="javascript:void(0)"><?php echo $page["Page"] ?></a></li>
                            <?php if ($page["LastPage"] > $page["Page"]): ?>
                                <li class="page-next"><a href="<?php echo $urlNext . '?p=' . $page["NextPage"]; ?>">&gt;</a></li>
                            <?php endif; ?>
                        </ul>
                    </div>
                <?php endif; ?>
            </div>
            <div class="col-lg-3 no-padding">
                <div class="col-lg-12">
                    <?php
                    echo $view['actions']->render(
                            $view['router']->generate('leftCategories', array(), true)
                    );
                    ?>
                </div>
            </div>
        </div><!--/.row-->
    </div>
</div>