<!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.lblMerchantMessages}</title>
{include file='CommonStyles.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/messages.css" />
<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" />
{include file='CommonJavaScript.tpl'}
</head>
<body>
<!-- Outer container starts-->
<div class="outer_container" >
{include file='CommonTop.tpl'} 
<!-- Content Container starts-->
<div class="head-strip-outer">
<div class="head-strip clearfix">
  <h2 class="fixing_left">{$language.lblMerchantMessages}</h2>
  {if $sort=='DESC'}{assign var="sortorder" value="ASC"}{else}{assign var="sortorder" value="DESC"}{/if}
  {html->anchor class="sortby fixing_left {$sortorder|strtolower}" href=$link|cat :"sort/$sortorder/" content="{$language.lblDate} <span class='arw'></span>"}
  
  {form->start name="formMessagesSearch" action="" method="post" enctype="multipart/form-data"}
  <div class="search-form fixing_right">
    <ul class="clearfix">
      <li class="column"> {form->textbox  id="busSrchName" class="text-box" placeholder="{$language.lblBusinessName}"   name="busSrchName"  value=$hiddenBusSeachName|default:''} </li>
      <li class="column"> {form->textbox id="fromDate" readonly="readonly" placeholder="{$language.lblDate}"   name="fromDate" class="date-field"} </li>
      <li class="column"> {form->select name="msgSrchtype" caption="->{$language.lblMessageType}" options="brand->{$language.lblBrand}~*feature->{$language.lblFeature}~*varient->{$language.lblVarient}~*sub category->{$language.lblSubCategory}" class="select-box"} </li>
      <li class="column"> {form->submit id="submitSearch" name="submitSearch"  class="button01 curve-3"  value="{$language.lblGo}"}
        {html->anchor href="messages/index/" class="action-link" content=$language.lblListAll} </li>
    </ul>
  </div>
  {form->close}
  
   </div>
   <div class="head-strip-border"></div>
</div>
<div class="content_container2 clearfix">

<div id="common_message" ></div>
{if empty($resMessages)}  <div class="msg-container pos-relative clearfix norecode " >

	<div class="message_info" >{$language.msgNoRecords}</div>
    </div>
{else}
 <div class="msg-container pos-relative clearfix">
<span class="line"></span>
<div class="msg-sec-left fixing_left msg-scrol pos-relative">
{form->hidden value=$resMessages.0.messageID id="AjaxMsgID" name="AjaxMsgID"}
                                 {form->hidden value=$resMessages.0.originID id="AjaxOrgnID" name="AjaxOrgnID"}
<ul class="clearfix">
{foreach from=$resMessages item="message" key="key1"}
<li class="pos-relative list-main" id="Ajax_{$key1}">{assign var="replyID" value=$message.messageID}{if $message.status=='New'   && $message.sentBy=='Merchant'}<span class="new-icon">&nbsp;</span>{/if} 
	{html->anchor class="link-all" onclick="showMessageDetails({$replyID},{$message.originID},'Ajax_{$key1}')" 
    content="<span class='line2'></span>
  <p>{$message.createdDate|date_format:$date_format} {$message.createdDate|date_format:$time_format}</p>
  <p><span>{$message.type|ucfirst} :- {$message.subject}</span></p>
  <strong>{$message.businessName}</strong>"} </li>
{/foreach}
</ul>
</div>
<!--End:From Listing--> 
<!--Start:Ajax Listing-->
<div class="msg-sec-right fixing_right msg-scrol-ajax pos-relative"  id="AjaxMessageDetails">

</div>
</div>{/if}

<!-- Content Container ends--> 
<!-- Footer starts--> 
{include file='CommonBottom.tpl'} 
<!-- Footer ends-->
</div>
<!-- Outer container ends--> 
{include file='CommonJavaScriptBottom.tpl'} 
</div>
{form->basepath_script}
{html->messages_script id="common_message"} 
<script type="text/javascript" src="{$common_js}/validate.plugin.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="{$common_js}/jquery.perfect-scrollbar.js"></script>
<script type="text/javascript">
    var msgSelectItem = "{$language.msgSelectItem}";
{literal}
	 $('#fromDate').daterangepicker({arrows: false});
 {/literal}
	   $(".msg-scrol").perfectScrollbar();
	   $(".msg-scrol-ajax").perfectScrollbar();
</script> 
<script type="text/javascript"  src="{$view_javascript}/message.page.js"></script>
</body>
</html>
