{* 
* @Module Name: Leo Feature
* @Website: leotheme.com.com - prestashop template provider
* @author Leotheme <leotheme@gmail.com>
* @copyright Leotheme
* @description: Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
*}
{extends file=$layout}

{block name='content'}
	<div id="mywishlist">
		<h2 class="page-heading">{l s='New wishlist' d='Shop.Theme.Global'}</h2>
		<div class="new-wishlist">
			<div class="form-group">
				<label for="wishlist_name">{l s='Name' d='Shop.Theme.Global'}</label>
				<input type="text" class="form-control" id="wishlist_name" placeholder="{l s='Enter name of new wishlist' d='Shop.Theme.Global'}">
			</div>
			<div class="form-group has-success">
				<div class="form-control-feedback"></div>			 
			</div>
			<div class="form-group has-danger">		 
			  <div class="form-control-feedback"></div>		 
			</div>
			<button type="submit" class="btn btn-primary leo-save-wishlist-bt">
				<span class="leo-save-wishlist-loading cssload-speeding-wheel"></span>
				<span class="leo-save-wishlist-bt-text">
					{l s='Save' d='Shop.Theme.Global'}
				</span>
			</button>
		</div>
		
			<div class="list-wishlist table-responsive">
				<table class="table table-striped">
				  <thead>
					<tr>
					  <th>{l s='Name' d='Shop.Theme.Global'}</th>
					  <th>{l s='Quantity' d='Shop.Theme.Global'}</th>
					  <th>{l s='Viewed' d='Shop.Theme.Global'}</th>
					   <th class="wishlist-datecreate-head date">{l s='Created' d='Shop.Theme.Global'}</th>
					  <th>{l s='Direct Link' d='Shop.Theme.Global'}</th>
					  <th>{l s='Default' d='Shop.Theme.Global'}</th>
					  <th>{l s='Delete' d='Shop.Theme.Global'}</th>
					</tr>
				  </thead>
				  <tbody>
					{if $wishlists}
						{foreach from=$wishlists item=wishlists_item name=for_wishlists}
							<tr>					 
								<td class="name-wislist"><a href="#" class="view-wishlist-product" data-name-wishlist="{$wishlists_item.name}" data-id-wishlist="{$wishlists_item.id_wishlist}"><i class="material-icons">&#xE8EF;</i>{$wishlists_item.name}</a><div class="leo-view-wishlist-product-loading leo-view-wishlist-product-loading-{$wishlists_item.id_wishlist} cssload-speeding-wheel"></div></td>
								<td class="wishlist-numberproduct wishlist-numberproduct-{$wishlists_item.id_wishlist}">{$wishlists_item.number_product|intval}</td>
								<td>{$wishlists_item.counter|intval}</td>
								<td class="wishlist-datecreate date">{$wishlists_item.date_add}</td>							
								<td><a class="view-wishlist" data-token="{$wishlists_item.token}" target="_blank" href="{$view_wishlist_url}{if $leo_is_rewrite_active}?{else}&{/if}token={$wishlists_item.token}" title="{l s='View' d='Shop.Theme.Global'}">{l s='View' d='Shop.Theme.Global'}</a></td>
								<td>
									
								<label class="form-check-label">
									<input class="default-wishlist form-check-input" data-id-wishlist="{$wishlists_item.id_wishlist}" type="checkbox" {if $wishlists_item.default == 1}checked="checked"{/if}>
								</label>
								
								</td>
								<td><a class="delete-wishlist" data-id-wishlist="{$wishlists_item.id_wishlist}" href="#" title="{l s='Delete' d='Shop.Theme.Global'}"><i class="material-icons">&#xE872;</i></a></td>
							</tr>
						{/foreach}
					{/if}
				  </tbody>
				</table>
			</div>
		<div class="send-wishlist">
			<a class="leo-send-wishlist-button btn btn-info" href="#" title="{l s='Send this wishlist' d='Shop.Theme.Global'}">
				<i class="fa fa-send"></i>
				{l s='Send this wishlist' d='Shop.Theme.Global'}
			</a>
		</div>
		<section id="products">
			<div class="leo-wishlist-product products row">
			
			</div>
		</section>
		<ul class="footer_link list-inline">
			<li class="list-inline-item"><a href="{$link->getPageLink('my-account', true)|escape:'html'}"><i class="fa fa-angle-left"></i> {l s='Back to Your Account' d='Shop.Theme.Global'}</a></li>
			<li class="list-inline-item"><a href="{$urls.base_url}"><i class="fa fa-home"></i> {l s='Home' d='Shop.Theme.Global'}</a></li>
		</ul>
	</div>
{/block}