<!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.lblDataFeed}
	</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="googlepla/new/" class="custom-btnt add" content=" <strong><span class='add'></span>{$language.lblAddDataFeeds}</strong>"}
		</div>       
     {/if}
        <h2>{$language.lblDataFeed}
          </h2>
          <div id="common_message"></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.lblDataFeedTitle}</p> 
                <span class="form-field01"> {form->textbox name="dataFeedName" class="text-box" style="width:95%;"} </span>
                </li>	
				
				<li class="column">				 
                <p class="label-field01">{$language.lblFeedCountry}</p>
                <span class="form-field01">
                {form->textbox name="feedCountry"  class=" select-box"  multiple="multiple"} </span>
                </li>
                    
          </ul>                    
            </div>
          </div> {form->close}
          <!-- Search container ends --> 
          {if $dataResult|@count>0} 
          
      <!--Start: Feed 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="20%">{$language.lblDataFeedTitle}   </th>        
						<th align="left" valign="middle" width="10%">{$language.lblFeedType}</th>
						<th align="left" valign="middle" width="10%">{$language.lblTargetCountry}</th>
						<th align="left" valign="middle" width="10%">{$language.lblCreated}</th>
						<th align="left" valign="middle" width="14%">{$language.lblUpdated}</th>
						<th align="left" valign="middle" width="10%">{$language.lblDataFeedItem}</th>
						<th align="left" valign="middle" width="10%">{$language.lblDataFeedStatus}</th>
						<th align="left" valign="middle" width="10%">{$language.lblDataFeedErrors}</th>
						<th align="left" valign="middle" width="6%"></th>
						</tr>
					</thead>
					<tbody>
						{foreach $dataResult->getResources() as $key=> $datafeed}								
							{assign var="feedID" value=$datafeed->getId()}
							
							<tr class="rowClass{$key}">
							
                            <td align="left" valign="top"  width="20%" class="titleClass">
							{$datafeed->getName()} </td>        
							<td align="left" valign="top">
							{$datafeed->getContentType()}
							</td>
                            
							<td align="left" valign="top" class="countryClass">
							{$datafeed->getTargetCountry()}
							</td>
							
							<td align="left" valign="top" class="createClass">
							{$feedDB[$key]['feedCreatedDate']}
							</td>
							
							<td align="left" valign="top" class="updateClass">
							{$feedDB[$key]['feedUpdateDate']}
							</td>
							
							<td align="left" valign="top">
							{$language.lblDataItemT}: 
							{if $dataStatus[$key]['itemsTotal']!=''}
							{$dataStatus[$key]['itemsTotal']}							
							{else} 0 {/if}
							&nbsp;&nbsp;
							{$language.lblDataItemV}: 
							{if $dataStatus[$key]['itemsValid']!=''}
							{html->anchor href="/googlepla/activeProducts/id/"|cat:$feedID|cat:"/" title="{$dataStatus[$key]['itemsValid']}" content="{$dataStatus[$key]['itemsValid']}"  class=""}
							
							{else} 0 {/if}
							</td>
							
							<td align="left" valign="top">
							{$dataStatus[$key]['processingStatus']}
							</td>
							
							<td align="left" valign="top">
							
							<span style="display:none;">{$language.lblDataFeedErrors}</span>
							{if $dataStatus[$key]['errors']|@count>0 || $dataStatus[$key]['warnings']|@count>0}
								{html->anchor history="yes"  href="googlepla/errorList/id/{$feedID}/" title="{$language.lblDataFeedErrors}" feedid="{$feedID}" class="errfeed feed-err-icon"}
							{else}
								{$language.lblNil}
							{/if}
							</td>
							
							<td align="left" valign="top">
							{assign var="href" value= "/googlepla/edit/id/"|cat:$feedID|cat:"/"}  {if $editPrivilege}		
								{html->anchor href="{$href}" title="{$language.lblEdit}"  class="product-preview icon-set edit03"}
							{/if}
							{if $deletePrivilege}
								{html->anchor title="{$language.lblDelete}" feedid="{$feedID}" class="deletefeed icon-set delete05"}
							{/if}
							
							</td>
                            
							</tr>

						{/foreach}
					</tbody>             
				</table>
            </div>  
          <!--end: Product List--> 
              <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 lblselected 	= "{$language.lblselected}";
var msgConfirmDeletefd 	= "{$language.lblFeedDeleteConfirm}";
var lblBasicSearch="{$language.lblBasicSearch}";
</script>
<script type="text/javascript" src="{$view_javascript}/feedList.page.js"></script>  
<script type="text/javascript">
 var msgSelectSearchCriteria = "{$language.msgSelectSearchCriteria}";
</script> 
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script type="text/javascript"  src="{$view_javascript}/jquery.colorbox.js"></script> 
<script language="javascript" type="text/javascript">
var msgSelectItem ="{$language.msgSelectItem}";
var lblSelectAction ="{$language.lblSelectAction}";
var msgConfirmDelete ="{$language.msgConfirmDelete}";
</script>
{html->messages_script id="common_message"}
</body>
</html>
