<!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.lblSettings} : {$language.lblPaymentDiscounts} : {$language.lblShippingMethods}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/grid_listing.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/right-menu.css" />
{include file='CommonCustomStyles.tpl'}
</head>
<body>
<div class="outer_container">
  {include file='CommonTop.tpl'}
  <!--End:Header Container-->
  <!--***********************************************************************END HEADER CONTAINER******************************************************-->
  <div class="content_container2 clearfix">
  <div class="right-sidebar">
    <div class="side_wrapper"> {html->anchor priv_href="shippingmethod/assignoption/" href="shippingmethod/assignoption/" caption="<strong><span class='add'></span>Assign Shipping Service</strong>" class="custom-btnt addnew" title="Assign Shipping Service"}
     {include file='ShippingRightLinks.tpl'}
    </div>
  </div>
     
<!--End: Right Block-->
     <div class="left_wrapper ">
      <div class="content_wrapper">
	  {if $showShippingMethodPrivilege}
	  	<div class="search_tab fixing_right">
          <ul>
            <li>{html->anchor  class="search_tab_a" href="shippingmethod/" caption="{$language.lblShippingMethods}"} </li>
			<li>{html->anchor  class="search_tab_a active" href="shippingmethod/options/" caption="{$language.lblShippingServices}"} </li>
          </ul>
        </div>
		{/if}
          <h2>Shipping Services</h2>
          <div id="common_message" ></div>
		  {if $resShippingMethods}
            <div class="grid_table00"> 
            {form->start name="formShippingMethod" action="" method="post"}
            <table width="100%" border="0" cellspacing="0" cellpadding="0" {if $editPrivilege}id="tableElm" class="dragdrop-table-border"{/if}>
            <thead>
              <tr class="nodrag nodrop">                
                <th width="50%" align="left" valign="middle">Service Name</th>
                <th width="10%" align="left" valign="middle">Weight Range</th>
		<th width="10%" align="left" valign="middle">Estimation</th>
		{if $editPrivilege || $deletePrivilege}
                    <th width="70" align="left" valign="middle"></th>
                {/if}
                <th width="95" align="left" valign="middle">Assign to Products</th>
				
              </tr>
            </thead>
            <tbody  border="0" cellspacing="0" cellpadding="0" >             
              {foreach from=$resShippingMethods item="resSM" key="key1"}              
              	{assign var="smgID" value=$resSM.settingsGroupID}
              	{assign var="shippingMethod" value=$resSM.settingsGroupXmlLabel}
              <tr id="{$smgID}" class="listClass_{$smgID} {if $key1%2!=0}shade01{/if}"  {if $editPrivilege}style="cursor:move;"{/if}>
                <td align="left"  valign="middle"><strong>{$resSM.shippingMethodMain}</strong> - {$shippingMethod|wordwrap:60:"<br />\n":true}</td>
                <td align="left" valign="middle">{if $resSM.serviceWeightLimit}{$resSM.serviceWeightLimit}g{else}Nil{/if}</td>
              	<td align="left" valign="middle">{if $resSM.isRealTimeCalculation eq 'Yes'} Realtime {else} Manual {/if}</td>
				{if $editPrivilege || $deletePrivilege} 
                <td align="center"  valign="top">
				{if $editPrivilege}	
                  {if $resSM.settingsGroupStatus eq 'Active'}
                  	{assign var="newstatus" value="Inactive"}
                  	{assign var="changeStatus" value="status-active"}
                  {else}
                  	{assign var="newstatus" value="Active"}
                  	{assign var="changeStatus" value="status-inactive"}
                  {/if}
		  {if $resSM.isDefault eq 'Yes'}
                  	{assign var="dstatus" value="No"}
                  	{assign var="default" value="default-active"}
                  {else}
                  	{assign var="dstatus" value="Yes"}
                  	{assign var="default" value="default-inactive"}
                  {/if}
                        {html->anchor rel="{$dstatus}" id="{$smgID}"   class="{$default} defaultChange icon-set" task='dfault-change' title="Assign To New Products"}
                        {html->anchor rel="{$newstatus}" id="{$smgID}" title="{$resSM.smgStatus|default:''}" content="{$resSM.smgStatus|default:''}" class="{$changeStatus} changeStatus icon-set" task='status-change' title="Update Status"}
                        {html->anchor history="yes"  href="shippingmethod/editoption/id/$smgID/sm/{$resSM.settingsGroupParent}/tid/{$resSM.settingsServiceTypeID}/" class="edit02 addnew icon-set" title="Edit Service Settings"} 
                    {/if}
                    {if $deletePrivilege}
                    {html->anchor title="Unassign" serviceid="{$smgID}" class="hide-txt delete02 icon-set" content="" task='unassign'}
                    {/if}
                    
                                   
                </td>
                 {/if}
                <td align="center"  valign="top"> 
                    {if $resSM.settingsGroupStatus eq 'Active'}
                        {html->anchor href="shippingmethod/assignshipping/id/$smgID/sm/{$resSM.settingsGroupParent}/tid/{$resSM.settingsServiceTypeID}/" class="button-link01 fixing_center" title="Update" caption="Update"}                                     
                    {/if}
                </td>
              </tr>
              {/foreach}     
             </tbody>
            </table>
            </div>  <!--Start: Pagination-->
          <div class="fixing_right pagination_outer"> 
            <!--end: Pagination--> 
            <div class="clear"></div>
            {form->close}
            {else}
            <div id="common_message"  class="message_info"> {$language.msgNoRecords} </div>
            {/if} 
            
          <!--End:Table Listing-->
      
      </div>
      <!--End:Border 2-->
    </div>
    <!--End: left Block-->
   
  </div>
  <!--End:Content Container-->
   
</div>
 {include file='CommonBottom.tpl'}
 </div>
<!--End:Outer Container-->
{include file='CommonJavaScriptBottom.tpl'}
{form->rootpath_script}
{form->basepath_script}
<script type="text/javascript" src="{$view_javascript}/jquery.tablednd.js"></script>
<script type="text/javascript" src="{$view_javascript}/shippingMethodsList.page.js"></script>
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script>
<script type="text/javascript"  src="{$view_javascript}/jquery.colorbox.js"></script>
<script type="text/javascript" >
var lblSelectAction	= '{$language.lblSelectAction}';
var lblSelectItem	= '{$language.lblSelectItem}';

var confirmation	= "Do you want to Unassign this Service ?";

$(document).ready(function(e) {
	$('.side_wrapper ul li a[rel=shippingservices]').addClass('selected'); 
	setSideMenu();
});
{literal}
$(".addnew").colorbox({
	iframe:true, innerWidth:"60%", innerHeight:500, onClosed:function(){parent.location.reload();}
});
{/literal}
</script>
{html->messages_script id="common_message"}
</body>
</html>