Subversion Repositories SmartDukaan

Rev

Rev 20427 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
#include ( "templates/commoncssfiles.vm" )
#include ( "templates/commonjsfiles.vm" )
</head>

<body>
#include("templates/header.vm")

<div class="seachContent_mainContainer">

#set($ssr = $action.getSsr())
#set($facets = $ssr.getFacets())
#set( $totalItems = $action.getTotalResults() )
#set( $beginIndex = $action.getBeginIndex() )
#set( $endIndex  = $action.getBeginIndex() + 23 )

#if( $totalItems <= $endIndex )
#set( $endIndex = $totalItems )
#end
#set($totalPages = $action.getTotalPages())
#set($currentPage  = $action.getCurrentPage())
#set($crumbs = $action.getCrumbs())

<!--Filter Starts Here-->
<div class="filterContainer">
<h4 class="filterMaintitle">FILTERS</h4>
#foreach($facet in $facets)
        #if(!($facet.getDisplayText()=="Availability"))
                <ul class="filterList_ul" style="max-height: 400px; overflow-y:auto;">
                        <li class="filterList_secondTitle"><strong>$facet.getDisplayText()</strong></li>
                        #set($selected = $crumbs.get($facet.getDisplayText()))
                        #set($items = [])
                        #foreach($sel in $selected)
                                #set($result = $items.add($sel.get(0)))
                        #end
                        #foreach($filterOption in $facet.getFilterOptions())
                                <a href="" class="filterList_secondTitle_liColor">
                                        <li><input #if($filterOption.getSelected()) checked="checked" #end value="&fq=$action.getEncodedCompontent("$filterOption.getKey():$filterOption.getValue()")" type="checkbox" class="filterList_checkBox" />$filterOption.getValue()</li>
                                </a>
                        #end
                </ul>
        #end
#end

</div>
<!--Filter Ends Here-->

<!--Search Results Starts Here-->
<div class="searchResults_container">

<div class="searchResults_titleCtainer">
#if($crumbs && $crumbs.size()!=0)
<h3 style="margin-left:20px;padding:0px;margin-bottom:10px;">Current filters:</h3>
<div id="currentFilters">
#foreach ( $crumb in $crumbs.keySet() )
        #if ($crumb == "Category")
        #else
                <div id="filterTalkTime">
                #if ($crumb.length()!=0)
                <span class="sectionHeader">$crumb:</span>
            #end
            #foreach ($crumblist in $crumbs.get($crumb))
                <span class="filterContent">
                        <span class="filterOption">$crumblist.get(0)</span>
                        <span class="filterClose"><a href="javascript:void(0)" value="$crumblist.get(1)" class="mk_filter_close">[X]</a></span>
                        </span>
                #end
                </div>
        #end
#end
</div>
#end
              
<h4 class="searchResults_title">Showing results for $ssr.getLabel()</h4>
<p style="text-align:center; margin:0; padding-bottom:20px; font-size:12px;">
        <a href="">Home</a>&nbsp;&gt;&nbsp; 
        <a href="#">$ssr.getLabel()</a></p>
</div>

#foreach($product in $ssr.getResults())
<a href="/$product.getUrl()"><div class="searchResults_productContainer">
<ul class="searchResults_productul">
<li class="searchResults_liImage"><img src="$product.getDefaultImageUrl()" /></li>
<li><h4 class="searchResults_liproductName">$product.getTitle()</h4></li>
<li><p title="$product.getDescription()" class="searchResults_lisubName ellipsis">$product.getDescription()</p></li>
</ul>
</div></a>
#end

<div class="searchResults_titleCtainer">
<h4 class="searchResults_title">Page $currentPage of $totalPages</h4>
<div class="productListBottom">
                  <div class="pagination1">
                                                              <ul class="pagination" style="padding-left:0px;">
                                                                                #if($currentPage == 1)
                        <li class="pager-previous">
                          <span class="current prev">Prev</span>
                        </li>
                                                                                #else
                                                                                        #set($prev = $currentPage-1)
                        <li class="pager-previous">
                          <a href="${url}&page=${prev}" class="current prev">Prev</a>
                        </li>
                                                                                #end


                                                                                #set( $begin = 1 )
                                                                                #set( $end = 1 )
                                                                                #if($totalPages <= 5)
                                                                                        #set( $begin = 1 )
                                                                                        #set( $end = $totalPages )
                                                                                #else
                                                                                        #if($currentPage <= 3)
                                                                                                #set( $begin = 1 )
                                                                                                #set( $end = 5 )
                                                                                        #else
                                                                                                #set( $begin = $currentPage - 2 )
                                                                                        #set( $end = $currentPage + 2 )
                                                                                                #if( $end > $totalPages)
                                                                                                        #set( $end = $totalPages)
                                                                                                        #set( $begin = $end - 4 )
                                                                                                #end
                                                                                        #end
                                                                                #end
                                                                                #set( $pages = [$begin..$end] )

                                                                                #foreach( $pageId in $pages )
                                                                                #if($currentPage == $pageId)
                        <li class="pager-item">
                          <span class="current">$pageId</span>
                        </li>
                                                                                #else
                        <li class="pager-item">
                          <a href="${url}&page=${pageId}">$pageId</a>
                        </li>
                                                                                #end
                                                                                #end

                                                                                #if($currentPage == $totalPages)
                        <li class="pager-next">
                          <span class="current next">Next</span>
                        </li>
                                                                                #else
                                                                                        #set($next = $currentPage+1)
                        <li class="pager-next">
                          <a href="${url}&page=${next}" class="current next">Next</a>
                        </li>
                                                                                #end
                      </ul>

                                  </div>
                  <div class="clearBoth"></div>
                </div>
                <!-- /productListBottom -->

</div>

                

</div>
<!--Search Results Ends Here-->




</div>

#include("templates/footer.vm")
</body>
</html>