<!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.lblBusiness} : {$language.lblDeliveryZones} </title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/listing.css" />

{form->rootpath_script}
{form->basepath_script} 
</head>
<body class="{$languageDirection}">
<!-- Outer container starts-->
<div class="outer" id="main">
{include file='CommonHeader.tpl'}
  <!-- Content Container starts-->
  <div class="content-wrapper">
    <!-- left wrapper starts-->
    <div class="left_wrapper">
    <div class="container-fluid">
       
        <div id="common_message"></div>
        
        <div class="inner_content_wrapper">       
         <!-- Search container starts -->
            <div class="container-section status-01">
                    <div class="right-sidebar">
    <div class="side_wrapper">
    <div>
   
   
     {html->anchor href="/deliveryzone/new/" class="btn btn-sm btn-primary margin-right" content="<strong><span class='add'></span>{$language.lblAddNewDeliveryZone}</strong>"}

    </div>
   <div>
   
    </div>
    </div>
    </div>
                 <h3 class="border-bottom">{$language.lblDeliveryZones} </h3>
         {form->start name="formDeliveryzoneListSearch" action="" method="post" enctype="multipart/form-data"}          
      <div class="search_container content-block">
            <div class="inner wide-box">
          <div class="row">
               <div class="form-group col-xs-12 col-sm-3">
                 <label>{$language.lblZoneMode}</label>
                 <span class="form-field01">{form->select name="deliveryZoneMode"  options="->{$language.lblAny}~*Global->{$language.lblGlobal}~*Merchant->{$language.lblBusiness}" class="form-control"}</span>
              </div>
              <div class="form-group col-xs-12 col-sm-3">
                  <label>{$language.lblDeliveryZoneName}</label>
                    <span class="form-field01">{form->textbox name="deliveryZoneName" class="form-control"} </span>
              </div>          
            <div class="form-group col-xs-12 col-sm-3">
                <label>{$language.lblCountry}</label>
                    <span class="form-field01">
                    {form->select onchange="listStates(this.value,'');" name="countryID" caption="->{$language.lblSelect}"  options=$resCountry class="form-control"}
                    </span>
              </div>
               <div class="form-group col-xs-12 col-sm-3">
                   <label>{$language.lblState}</label>
                    <span class="form-field01">
                    {form->select name="stateID" options="->{$language.lblSelect}" class="form-control"}<span id="loadProcessImage"></span>
                     {form->hidden name="statehidValue" value=$stateID}
                    </span>
              </div>
                    <div class="form-group col-xs-12 col-sm-3">
                        <label>{$language.lblZipCode}</label>
                    <span class="form-field01">{form->textbox name="zipcode" class="form-control"} </span>
                  </div>
              <div class=" col-xs-12 col-sm-3">
                  <label>&nbsp;</label>
                 <span class="form-field01">{form->submit name="submitSearch" class="btn btn-sm btn-primary" form="formDeliveryzoneListSearch" tabindex="1" value="{$language.lblSearch}"}                   
                  {html->anchor href="/deliveryzone/index/" caption=$language.lblResetFields class="action-link"}</span>
                  </div>
            </div>           
            </div>
          </div> 
        </div>
                  {form->close}
      <!-- Search container ends -->     
  
    <div class="clear"></div>
        {form->start name="formDeliveryzoneList" method="post"}
        {if $rsDeliveryzone}
           <div class="container-section"> 
        <div class="grid_table00 product-list order-list">
          <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
            <tr>
              <th align="left" valign="middle"  class="checkbox_column" width="30"> <div class="chekingdiv">
                  <ul>
                    <li> {form->checkbox id="ListStatusLinkCheckbox" name="deliveryzoneStatusAll"  options="" class="fixing_left"} 
                <label for="ListStatusLinkCheckbox"></label>
                     
                    </li>
                  </ul>
                </div></th>
             
              <th width="32%" align="left" valign="middle" >{$language.lblDeliveryZones}</th>
			  <th width="10%" align="left" valign="middle" >{$language.lblZoneType}</th>
                          <th width="10%" align="left" valign="middle" >{$language.lblZoneMode}</th>
              <th  align="left" valign="middle">{$language.lblDescription} </th>
              <th width="80" align="left" valign="middle" ><div style="width:80px">&nbsp;</div></th>
            </tr>
            {foreach from=$rsDeliveryzone item="rsDeliveryzoneList" key="key1"}
            {assign var="curr_deliveryzoneID" value=$rsDeliveryzoneList.deliveryZoneID}
            <tr {if $rsDeliveryzoneList@iteration is even by 1} class="shade01" {/if}> 
               
              <td align="left" valign="top" class="checkbox_column">
                       {if $rsDeliveryzoneList.deliveryZoneMode neq "Global" && $rsDeliveryzoneList.merchantID==$merchantID}
                          <span id="class_checkbox"> 
                              {form->checkbox name="deliveryzoneBulkStatus[]" id="deliveryzoneBulkStatus_{$key1}" class="deliveryzoneBulkStatus"  options="" value=$rsDeliveryzoneList.deliveryZoneID} 
                              <label for="deliveryzoneBulkStatus_{$key1}"></label>
                       </span>
                       {else}X
                       {/if}
                  </td>
              <td align="left" valign="top"><span  class="view_{$rsDeliveryzoneList.deliveryZoneID}">
                      {html->anchor href="deliveryzone/show/id/{$rsDeliveryzoneList.deliveryZoneID}/" history="yes" class="normal_link" content="{$rsDeliveryzoneList.deliveryZoneName|wordwrap:25:"<br />
                ":true}"}</span></td>
            <td align="left" valign="top">
				<span  class="view_{$rsDeliveryzoneList.deliveryZoneID}">
			{if $rsDeliveryzoneList.deliveryZoneType == 'National'}
				{$language.lblNational}
			{elseif $rsDeliveryzoneList.deliveryZoneType == 'Region'}
				{$language.lblRegion}
			{elseif $rsDeliveryzoneList.deliveryZoneType == 'Location'}
				{$language.lblLocation}
			{/if}
				</span>
			</td>
           <td align="left" valign="top">
			<span  class="view_{$rsDeliveryzoneList.deliveryZoneID}">
			   {if $rsDeliveryzoneList.deliveryZoneMode eq "Global"}
					{$language.lblGlobal}
			   {elseif $rsDeliveryzoneList.deliveryZoneMode eq "Merchant"}
					{$language.lblMerchant}
					
			   {/if}
		    </span>
		   </td>
                                
              <td align="left" valign="top"><span  class="view_{$rsDeliveryzoneList.deliveryZoneID}">{$rsDeliveryzoneList.deliveryZoneDescription|wordwrap:70:"<br />
                ":true}</span></td>
              <td align="left" valign="top" width="120"> 
                {assign var="editPrivilege" value="status-locked rmv-mrg-lf icon-set"}
                 {if $rsDeliveryzoneList.taxClassCount|default:'' gt 0}
                {html->anchor alert="{$language.lblDeliveryAlert}" priv_href="deliveryzone/edit/" alt="{$language.lblDeliveryAlt}" class="status-{$rsDeliveryzoneList.deliveryZoneStatus|strtolower}"}
                {else} 
                {if  $rsDeliveryzoneList.deliveryZoneStatus eq "Active"}
                {assign var="newstatus" value="{$language.Inactive}"}
                {assign var="changeStatus" value="icon-tick status-active hide-txt"}
                {else}
                {assign var="newstatus" value="{$language.lblActive}"}
                {assign var="changeStatus" value="icon-tick status-inactive hide-txt"}     
                {/if}{/if}
              {if $rsDeliveryzoneList.deliveryZoneMode neq "Global" && $rsDeliveryzoneList.merchantID==$merchantID}
                    {assign var="editPrivilege" value="edit02"} 
                    {html->anchor priv_href="deliveryzone/edit/" href="deliveryzone/edit/id/$curr_deliveryzoneID/" history="yes" caption="" class="{$editPrivilege}  icon-edit-fill" alt="{$language.lblEdit}"}&nbsp;
                    {else}
                        <span class="icon-edit-fill icon-set-space"></span>
                 {/if}
            {if $rsDeliveryzoneList.deliveryZoneMode neq "Global" && $rsDeliveryzoneList.merchantID==$merchantID}
                 {html->anchor priv_href="deliveryzone/edit/" id="{$curr_deliveryzoneID}" rel="{$newstatus}" title="{$language.{$rsDeliveryzoneList.deliveryZoneStatus}}" content="" class="{$changeStatus} icon-tick" task='status-change'}
               {else}               
                   <span class="{$changeStatus}" style="cursor:text !important;" ></span>
            {/if}                
                
               {if $rsDeliveryzoneList.deliveryZoneMode neq "Global" && $rsDeliveryzoneList.merchantID==$merchantID}
                {if $rsDeliveryzoneList.taxClassCount|default:'' gt 0}
                {html->anchor alert="{$language.lblDeliveryDeleteStatus}"  priv_href="deliveryzone/destroy/" alt="{$language.lblGoeDeleteAlt}" class="delete-inactive icon-close2" id="deliveryImage_{$rsDeliveryzoneList.deliveryZoneID}"}{form->hidden  name="delid[]" value=$rsDeliveryzoneList.deliveryZoneID}
                {else}{html->anchor confirm="{$language.lblDeliveryDeleteAlert}"  priv_href="deliveryzone/destroy/" href="deliveryzone/destroy/id/$curr_deliveryzoneID/" alt="{$language.lblDelete}" class="delete02 icon-close2" id="deliveryImage_{$rsDeliveryzoneList.deliveryZoneID}"}{/if} 
                {else} 
                    <span class="icon-close2 delete02-inactive" ></span>
                {/if}
               
            </td>
            </tr>
            {/foreach}
            {form->hidden id="checkHidden" name="checkHidden" value=$rsDeliveryzone|@count}
          </table>
        </div>
        </div>
        {assign var="statusoptions" value="->{$language.lblDonotchange}~*Active->{$language.lblActivate}~*Inactive->{$language.lblInactivate}~*Deleted->{$language.lblDelete}"}
      
        <div class="action_box input-group"> {form->select name="deliveryZoneStatus" class="form-control" options=$statusoptions value=""}
          {form->submit name="submitBulkStatus" id="submitBulkStatus" class="btn btn-sm btn-primary"  value="{$language.lblUpdate}"} </div>
       
        <div class="fixing_right pagination_outer pull-right" > {paginate->layout results_per_page="{$language.lblResultsperpage}"  label_pages="{$language.lblPages}" label_record="{$language.lblRecorsFound}"  key="page"} </div>
        <div class="clear"></div>
        {else}
        <div class="message_info" id="common_message"> {$language.msgNoDeliveryZonesforlisting}</div>
        {/if}
        {form->close}
        <!--End:From Listing-->
      </div>
</div>
    </div>
    <!-- left wrapper ends-->
    <!-- right side bar starts-->

    <!-- right side bar ends-->
    <div class="clear"></div>
  </div>
  <!-- Content Container ends--> 
  <!-- Footer starts-->
  {include file='CommonFooter.tpl'}
  <!-- Footer ends--> 
</div>
<script type="text/javascript" src="{$view_javascript}/deliveryzone.page.js"></script>
<script type="text/javascript">
var lblSelectAction	= '{$language.lblSelectAction}';
var lblSelectItem = '{$language.lblSelectItem}';
var lblDeliveryDeleteAlert = "{$language.lblDeliveryDeleteAlert}";

</script>
{html->messages_script id="common_message"}
</body>
</html>
