<?php
$view->extend('MarketZodacoBundle::base.html.php');
$view['slots']->set('title', $view['translator']->trans("Search") . " " . $s." | ".$view['translator']->trans("Zodaco Market"));
?>
<div class="col-sm-12 col-lg-12 main" style="color: #FFF;height: 200px; background: #A93C3C;">
    <div class="container" style="color: #FFF;">
        <div class="catcat" style="color: #FFF;margin-top:0px;width:100%;padding-top:0px;height:200px;">
            <center><h1 style="padding-top: 45px; color: #FFF;"><?php echo $view['translator']->trans("Search") . " '" . $s . "'"; ?></h1></center>
        </div>
    </div>
</div>
<div class="col-sm-12 col-lg-12 main" id="mainContents">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 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-3">
                            <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('search', array(), 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 . '?s=' . $s . '&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 . '?s=' . $s . '&p=' . $page["NextPage"]; ?>">&gt;</a></li>
                                <?php endif; ?>
                        </ul>
                    </div>
                <?php endif; ?>
            </div>
        </div><!--/.row-->
    </div>
</div>