<!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" />
    <title>{$language.lblAdmin} :  {$language.lblCitiesAndProducts} : {$language.lblMenuListProductUnderReview}</title>
    {include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
    <link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
    <link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.css" />
    <link rel="stylesheet" type="text/css" href="{$view_styles}/chosen.css" media="screen"/>
	<link rel="stylesheet" type="text/css" href="{$view_styles}/grid_listing.css" media="screen" />
    {include file='CommonCustomStyles.tpl'}

{form->basepath_script}
{form->rootpath_script}
</head>
<body>
{assign var="editprivilege" value=$editprivilege|default:''} 
<div class="outer_container"> {include file='CommonTop.tpl'} 
  <!--End:Header Container--> 
  <!--***********************************************************************END HEADER CONTAINER******************************************************-->
  <div class="content_container">
      <div class="content_wrapper"> 
      {if $newPrivilege}
		<div class=" fixing_right">
			{html->anchor href="product/new/" class="custom-btnt add" content=" <strong><span class='add'></span>{$language.lblAddProduct}</strong>"}
		</div>       
     {/if}
        <h2>{$language.lblMenuListProductUnderReview}
          </h2>
          <div id="common_message"></div>
		  <div id="common_message_product"></div>  
        <!-- Inner Content Container starts-->
        <div class="inner_content_wrapper">
          <!-- Search container starts --> 
          {form->start name="frmSearchProducts" action="" method="post"}          
          <div class="search_container clearfix">
            <div class="inner">
              <ul class="clearfix">
                <li class="column"><p class="label-field01">{$language.lblProductIDTitle}</p> 
                <span class="form-field01"> {form->textbox name="searchProductName" class="text-box" style="width:95%;"} </span>
                </li>
                <li class="column">				 
                <p class="label-field01">{$language.lblCategory}</p>
                <span class="form-field01"> 
                {form->hidden name="categories" value=$searchProductCategorySel}
                {form->select name="searchProductCategory" class="city_chk" size="5"  multiple="multiple" options=$resCategories} </span>
                </li>
		
				
				
				<li class="column">				 
                <p class="label-field01">{$language.lblBrand}</p>
                <span class="form-field01">
                {form->textbox name="brandKey"  class=" select-box"  multiple="multiple"} </span>
                </li>
				{*<li class="column" style="margin-top:20px;">
                      {form->checkbox name="searchDeal" value="Yes" class="cst-checkbx" checked="{if $searchDeal eq 'Yes'}True{/if}"} 
                      <label for="searchDeal">{$language.lblProdctDeal}</label>
                </li>		*}		
              {*  <li class="column" style="margin-top:20px;">
                      {form->checkbox name="searchBuybox" value="Yes" class="cst-checkbx" checked="{if $searchBuybox eq 'Yes'}True{/if}"} 
                      <label for="searchBuybox">{$language.lblBuyboxProducts}</label>
                </li>*}
                                 
		  
              
                 
				 
			<!-- For Frontend Implementations --> 
				
            
            <li class="column strict_fixing_right ">
              
              {form->hidden name="searchOption" value="basic"}
              {form->submit name="submitProductSearch" id="submit" class="button01"  value=$language.lblSearch}
              
              {html->anchor href="/product/reviewProducts/" class="action-link" content="{$language.lblListAll}"}
            </li>           
          </ul>                    
            </div>
          </div> {form->close}
          <!-- Search container ends --> 
          {if $resProducts|@count>0} 
          <!-- sort by starts -->
        <div class="clearfix">
          
          {*<div class="sort_links fixing_right {if $sortByOption==''}right-pos {/if}">			
              <span class="sort-link"></span>
	     {if $sortByOption=='skey'}
               		{assign var="sortLabel" value=$language.lblProductID}
                {elseif $sortByOption=='stitle'}                	
			{assign var="sortLabel" value=$language.lblProductTitle}
                {elseif $sortByOption=='sbusiness'}
		{assign var="sortLabel" value=$language.lblBusiness}
				{elseif $sortByOption=='sprice'}
					{assign var="sortLabel" value=$language.lblSaleprice}
				{elseif $sortByOption=='sdiscount'}
					{assign var="sortLabel" value=$language.lblDiscount}
				{elseif $sortByOption=='sfeatured'}
					{assign var="sortLabel" value=$language.lblFeatured}
				{elseif $sortByOption=='spopular'}
					{assign var="sortLabel" value=$language.lblPopular}
				{elseif $sortByOption=='sendsoon'}
					{assign var="sortLabel" value=$language.lblEndingSoon}
                {elseif $sortByOption=='screated'}
                	{assign var="sortLabel" value=$language.lblRecency}
                {/if} 
	       {if $sortByOrder=='asc' || $sortByOrder==''}
                  {assign var="sortOrderAsc" value="active"}
              	{assign var="sortOrderDesc" value="inactive"}
              	{else}
              	{assign var="sortOrderAsc" value="inactive"}
              	{assign var="sortOrderDesc" value="active"}
		{/if}
				{if $sortByOption==''}<span class="sortby-list">   
				<strong>
					{$language.lblSortby}
				</strong>
                </span>
			{else}<span class="sortby-list">   
				<strong>
					{$sortLabel} 
				</strong></span>	
				{html->anchor class="asnd {$sortOrderAsc}" href="/product/reviewProducts/{$link}/sortby/{$sortByOption}/orderby/asc/" content="<span class='arw'></span>
				<span class='line'></span>"}
				{html->anchor  class="dsnd {$sortOrderDesc}" href="/product/reviewProducts/{$link}/sortby/{$sortByOption}/orderby/desc/"
				content="<span class='line'></span>
				<span class='arw'></span>"}
			{/if}
              <ul class="sort_links_ul" >
                <li>{html->anchor href="/product/reviewProducts/$link/sortby/stitle/orderby/$sortByOrderProductTitle/" title="{$language.lblProductTitle}" content="{$language.lblProductTitle}"}                 		
                </li>
                
                 <li>{html->anchor href="/product/reviewProducts/{$link}/sortby/sprice/orderby/$sortByOrderByPrice/" title="{$language.lblSaleprice}" content="{$language.lblSaleprice}" class=$csaleprice|default:''}
                  </li>
                 
                  <li>{html->anchor href="/product/reviewProducts/{$link}/sortby/sfeatured/orderby/$sortByOrderByFeatured/" title="{$language.lblFeatured}" content="{$language.lblFeatured}" class=$cfeatured|default:''}
                 </li>
                <li>{html->anchor href="/product/reviewProducts/{$link}/sortby/spopular/orderby/$sortByOrderByPopular/" title="{$language.lblPopular}" content="{$language.lblPopular}" class=$cpopular|default:''}
               </li>
                <li>{html->anchor href="/product/reviewProducts/{$link}/sortby/screated/orderby/$sortByOrderDate/" title="{$language.lblRecency}" content="{$language.lblRecency}" class=$cnewlyadded|default:''}
               </li>
               
              </ul>
            </div>*} 
            {if $view_common_languages|@count>1}
          <div class="fixing_right">{include file='ContentLanguageOptions.tpl'}</div>
          {/if}
            </div>        
      <!-- sort by ends -->	  
      <!--Start: Product List-->    
            {form->start name="formProduct" action="" method="post" enctype="multipart/form-data"} 				
			<div class="grid_table00 pd-list"> 
				<table width="100%" border="0" cellspacing="0" cellpadding="0"   >
					<thead>
						<tr>
						
						<th align="left" valign="middle"  width="30%" colspan="2">
						{if $editPrivilege || $deletePrivilege}
						<span class="chkd-item">
						{form->checkbox class="ListStatusLinkCheckbox v-aline fixing_left" tabindex="1"}</span>{/if} {$language.lblVehicleDesc}</th>
                                                 <th align="left" valign="middle" width="20%">{$language.lblVariantCode}</th> 
                                                <th align="left" valign="middle" width="20%">{$language.lblBannerCategory}</th> 
                                                <th align="left" valign="middle" width="10%">{$language.lblBrand}</th> 
                                                <th align="left" valign="middle" width="10%">{$language.lblModelYear}</th> 
                                                <th align="left" valign="middle" width="20%">{$language.lblListPrice}</th>                                                
						<th align="left" valign="middle" width="5%" colspan="2"><div style="width:45px;"></div></th>
						</tr>
					</thead>
					<tbody>
						{foreach from=$resProducts item="resProductList" key="key"}								
							{assign var="productID" value=$resProductList.productID}
							{assign var="defaultOptionID" value=$resProductList["options"][0]["productOptionID"]|default:''}
							{assign var="defaultOption" value=$resProductList["options"][0]|default:''}
							{if $resProductList.multiOptionsAvailable eq "No"}
								{if $optionIDsString|default:'' != ''}
									{assign var="optionIDsString" value=$optionIDsString|cat:"_"|cat:$defaultOptionID}
								{else}
									{assign var="optionIDsString" value=$defaultOptionID}
								{/if}
							{/if}
							<tr>
							<td align="left" valign="middle" colspan="2" >
							{if $editPrivilege || $deletePrivilege}
							<span class="chkd-item">{form->checkbox class="ListAll v-aline fixing_left" tabindex="1" name="check_$productID" name="checkProductIDs[]" value=$productID}</span>{/if}
							
							<img src="{$view_public_path}/uploads/catalog/vehicles/thumb/{$resProductList.productImage}?random={$rand}" class="fixing_left pd-img" />
							{if $showPrivilege}
								{html->anchor history="yes" href="/product/show/id/{$resProductList.productID}/" class="normal_link" content="{$resProductList.productTitle|truncate:80}"}
							{else}
								{$resProductList.productTitle|truncate:80}
							{/if}
							{if $resProductList.bodyStyle}<br /><br /><span class="deal-txt fixing_left">{$resProductList.bodyStyle}</span>{/if}								
							<br /><br />
							{if $resProductList.productStatus=='Inactive'}<span class="inactive-txt fixing_right">{$resProductList.productStatus}</span>{/if}
							<span class="pd-time">
							{$resProductList.productCreatedDate|date_format:$date_format} {$resProductList.productCreatedDate|date_format:$time_format}
							</span>
							{if $resProductList.isProductDeal eq Yes}
								{if $resProductList.productLife == 'over'}
								<span class="status_Expired">{$language.lblExpired}</span>
								{/if}
							{/if}
							</td>
                                                        <td align="left" valign="top">{$resProductList['variantCode']}</td>
                                                        <td align="left" valign="top">{$resProductList['catName']}</td>
                                                        <td align="left" valign="top">{$resProductList['brandName']}</td>
                                                        <td align="center" valign="top">{$resProductList['modelYear']}</td>
                                                        <td align="left" valign="top">{$resProductList['productOptionRegularPrice']|default:''|price}</td>
							<td align="left" valign="top" colspan="2" nowrap>
							{assign var="href" value= "/product/edit/id/"|cat:$resProductList.productID|cat:"/"}  {if $editPrivilege}		
								{html->anchor href="{$href}" title="{$language.lblEdit}"  class="product-preview icon-set edit03"}
							{/if}
							{if $deletePrivilege}
								{html->anchor title="{$language.lblDelete}" productid="{$resProductList.productID}" class="deleteproduct icon-set delete05"}
							{/if}
							{if $resProductList.combination|@count>0}
                                                            {html->anchor class="viewOptions add01 icon-set" title="View Option" content="" rel=$productID}
                                                        {/if}
							</td>
                            
							</tr>
						
						{/foreach}
						{form->hidden name="optionIDsString" value=$optionIDsString|default:''}
						{form->hidden name="combinationIDsString" value=$combinationIDsString|default:''}
					</tbody>             
				</table>
            </div>
		  
          <!--end: Product List--> 
          <!--Start: Pagination-->
          <div class="fixing_right pagination_outer"> {paginate->layout  key="page" label_record="{$language.lblRecorsFound}" label_pages="{$language.lblPages}"} 
            <!--end: Pagination-->
            <div class="clear"></div>
          </div>         
          <!--end: Pagination--> 
        {if $editPrivilege || $deletePrivilege}
		   {assign var="statusoptions" value="->{$language.lblDonotchange}"}
		 {if $editPrivilege}
			{assign var="statusoptions" value="{$statusoptions}~*Active->{$language.lblActivate}~*Inactive->{$language.lblInactivate}"}
		{/if}
		 {if $deletePrivilege}  
			{assign var="statusoptions" value="{$statusoptions}~*Deleted->{$language.lblDelete}"}
		{/if}		
		 
           <div class="action_box">
              {form->select class="select-box width-auto" tabindex="1" name="changeStatus"  options=$statusoptions}
             {form->button name="submitProduct" tabindex="1" class="update_btn_table button04" value="{$language.lblUpdate}"}
			 
			{*{form->button name="submitPLAs" tabindex="1" class="update_btn_table button04" value="{$language.lblFeedProduct}"}*}
			
			</div>		
	  {/if}	              

              <div class="clear"></div>	
			</div> 
            {form->close} 		  
          {else}
          <div  class="message_info"> {$language.msgNoRecords}</div>
          {/if} 
          </div>
    </div>
    
    <!--End: left Block-->
    <div class="clear"></div>
  </div>
  <!--End:Content Container--> 
  {include file='CommonBottom.tpl'} </div>
<!--End:Outer Container--> 
{include file='CommonJavaScriptBottom.tpl'} 
<script  type="text/javascript">
var lblCheckall = "{$language.lblCheckall}";
var lblUncheckall = "{$language.lblUncheckall}";
var lblSelectBusiness = "{$language.lblSelectBusiness}";
var lblSelectCitys = "{$language.lblSelectCitys}";
var lblselected 	= "{$language.lblselected}";
var msgConfirmDeletepdt 	= "{$language.msgConfirmDeletepdt}";
var lblBasicSearch="{$language.lblBasicSearch}";
var lblAdvanceSearch="{$language.lblAdvancedSearch}";
</script>
<script type="text/javascript" src="{$view_javascript}/jquery.multiselect.widget.js"></script> 
<script type="text/javascript" src="{$view_javascript}/productList.page.js"></script> 
<script type="text/javascript" src="{$view_javascript}/productListFeed.page.js"></script> 
<script type="text/javascript" src="{$common_js}/date.js"></script> 
<script type="text/javascript" src="{$view_javascript}/daterangepicker.jQuery.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery.colorbox.js"></script> 
<script src="{$view_javascript}/chosen.pluggin.js" type="text/javascript"></script>
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
<script type="text/javascript">
 var msgSelectSearchCriteria = "{$language.msgSelectSearchCriteria}";
     $('#searchProductDate').daterangepicker({ arrows: false });
     $(document).ready(function(){

		$( "#brandKey" ).autocomplete({ source: {$listBrands|json_encode} });

          if($('#searchOption').val()=='basic')
           {
              $("#searchLink").text(lblAdvanceSearch);
            $('#searchOption').val('basic');
              $("#searchLink").attr('rel','advance');            
            $(".advanceSearch").hide();
           } 
           else
           {
           
             $("#searchLink").text(lblBasicSearch);
            $('#searchOption').val('advance');
              $("#searchLink").attr('rel','basic');
             $(".advanceSearch").show();
           } 
        });
				

</script> 
{if $validated|default:'' == 'No'}
	<script type="text/javascript">
		$(document).ready(function(){
			$( ".viewOptions" ).trigger( "click" );
        });
	</script> 
{/if}
<!--//*********sales rep***********//--> 
<script type="text/javascript" src="{$view_javascript}/chosen.pluggin.js"></script>
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script language="javascript" type="text/javascript">
$(".salesRep").chosen()
$(".sortby-list").click(function(){ 
 if($(this).siblings(".sort_links_ul").is(':visible'))
 {
 $(this).removeClass("active");
 $(".sort_links_ul").hide();
 }
 else{
 $(this).siblings(".sort_links_ul").slideDown("fast");
 $(this).addClass("active"); 
 } 
$('body').click(function (e) {       
  if ($(".sort_links ").has(e.target).length === 0) {
     $(".sort_links_ul").hide();
	 $(".sortby-list").removeClass("active");
        }
    });
 
});
var msgSelectItem ="{$language.msgSelectItem}";
var lblSelectAction ="{$language.lblSelectAction}";
var msgConfirmDelete ="{$language.msgConfirmDelete}";
</script>
{form->validate_script form	= "formProduct"}
{html->messages_script id="common_message"}
{html->messages_script section="Product" id="common_message_product"}
</body>
</html>
