<!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.lblNewsLetterEmailTemplates}</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}/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="newsletter/templateNew/" href="newsletter/templateNew/"  caption="<strong><span class='add'></span>{$language.lblMenuAddNewsletterTemplate}</strong>" class="custom-btnt"}	  
        {include file="NewsLetterRightBlock.tpl"}
      </div>
   </div>
    <!--End: Right Block-->
    <div class="left_wrapper">
      <div class="content_wrapper">
        <h2>{$language.lblNewsLetterEmailTemplates}</h2>
        <!--<div class="info-message">{$language.lblCMSDragDrop}</div>-->
        <div class="clear"></div>
        <div id="common_message" ></div>
		<div class="clear"></div>
		 {form->start name="formNewsLetterTemplateList" action="" method="post" enctype="multipart/form-data"}
		  <div class="search_container">
             <div class="inner single-box">
              <ul class="clearfix">
                <li class="column">
                 <p class="label-field01">{$language.lblTemplateName}</p>
                 <span class="form-field01">{form->textbox class="text-box" tabindex="1" name="nlTemplateName"}</span>
                </li>
                <li class="column">
                 <p class="label-field01">{$language.lblStatus}</p>
                 <span class="form-field01">{form->select caption="->{$language.lblSelect}" tabindex="1" class="select-box" name="nltStatus" options="active->"|cat:$language.lblActive|cat:"~*inactive->"|cat:$language.lblInactive} </span>
                </li>
                <li class="column">                
                 <span class="form-field01">
                   {form->submit name="submitSearch" class="button01"  value=$language.lblSearch tabindex="4"}               
                   {html->anchor href="/newsletter/emailtemplates/" class="action-link" content="{$language.lblListAll}" tabindex="5"}</span>
                </li>
              </ul>                
            </div>
          </div>
		{form->close}
		{include file='ContentLanguageOptions.tpl'}
		<div class="clear"></div>
		{if $resNewletterTempList}	  
        <div class="grid_table00">{form->start name="frmTempList" action="" method="post"}
          <table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentList" >
            <thead>
             <tr class="nodrag nodrop"> 
                <th valign="center" align="left" width="22%">{$language.lblTemplateName}</th>
				<th valign="center" align="left" width="10%">{$language.lblTemplateType}</th>
                <th valign="center" align="left" width="10%">{$language.lblImage}</th>
			    <th valign="center" align="left" width="20%">{$language.lblModifiedDate}</th>
				<th valign="middle" align="left" width="8%">{$language.lblStatus}</th>
				<th valign="middle" align="left" width="4%"></th>
              </tr>
            </thead>
            <tbody>
            {foreach from=$resNewletterTempList item="tempDetails"}
			 {assign var="nlTemplateID" value=$tempDetails.nlTemplateID}
              {if $tempDetails.nltDefault eq 'Yes'}
              {assign var ="checked" value="checked"}
              {assign var ="defaultLang" value=$language.lblYes}
              {else}
              {assign var ="checked" value=""}
			  {assign var ="defaultLang" value=$language.lblNo}
              {/if}
              
              {if $tempDetails.nltStatus eq 'Inactive'}
              {assign var ="disabled" value="disabled"}
			  {assign var ="statusLang" value=$language.lblInactive}
              {else}
              {assign var ="disabled" value=""}
			  {assign var ="statusLang" value=$language.lblActive}
              {/if}			 
             <tr>   
		
                <td valign="middle" align="left">{$tempDetails.nlTemplateName}</td>
                <td valign="middle" align="left">{$tempDetails.templateType|default:''}</td>
                <td valign="middle" align="center"><img src='{$view_public_path}/uploads/newsletter/thumb/{$tempDetails.nlTemplatePreview}' height='50' width='50' id='tempDetails_$id' caption='Smiley face'/></td>
               
                <td valign="middle" align="left">{$tempDetails.updatedDate|date_format:$date_format} {$tempDetails.updatedDate|date_format:$time_format}</td>
				<td align="center" valign="middle"><span class="status_{$tempDetails.nltStatus}">{$statusLang}</span></td>
				<td valign="middle" align="center">
                 {html->anchor href="newsletter/emailtemplatesedit/id/$nlTemplateID/" title="{$language.lblEditNewsLetter}" class="edit02 icon-set"}
				 {html->anchor id="{$nlTemplateID}"	title="Delete"	class="delete02 icon-set" task="delete00"}
               </td>
            </tr>
            {/foreach}
            </tbody>
          </table>
        </div>
			 <div class="clearfix">
             <div class="fixing_right pagination_outer">{paginate->layout key="page" label_record="{$language.lblRecordsFound}" label_pages="{$language.lblPages}"}
             <div class="clear"></div>
             </div>
			 
			 </div> 	  
        {form->close}
        <div class="clear"></div>
        {else}
        <div class="message_info" id="common_message">{$language.msgNoRecords}</div>
        {/if}
       <!--End:From Listing-->
    </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'}
{html->messages_script id="common_message"}
{form->rootpath_script}
{form->basepath_script}
<script type="text/javascript" src="{$view_javascript}/newsletterTempList.js"></script>
<script type="text/javascript">
var lblSelectItem 			= '{$language.lblSelectItem}';
var msgSelectAStatus 		= '{$language.msgSelectAStatus}';
var msgSelectSearchCriteria = "{$language.msgSelectSearchCriteria}";
var	msgConfirmsub="{$language.lblSelectTemplateDelete}";
</script>
<script type="text/javascript">
$(document).ready(function(){
	$('.side_wrapper ul li a[rel=nlEmailTempList]').addClass('selected'); 
});
</script>
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script>
</body>
</html>