{*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2014 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

{if $multishop_warning}
<div class="alert alert-info">	
	{l s='Changes will be applied to more than one shop' mod='multicarousels'}
</div>
{/if}

<div class="bootstrap panel multicarousels clearfix">
	<div class="form-group clearfix">
		<label class="control-label" for="load_owl">
			<span class="label-tooltip" data-toggle="tooltip" title="{l s='If you already use owl carousel script on your site, you may turn this option OFF in order to avoid multiple loading or possible conflicts' mod='multicarousels'}">
				{l s='Load owl.carousel.js?' mod='multicarousels'}
			</span> <input type="checkbox" name="load_owl" id="load_owl" {if $load_owl}checked="checked"{/if}>
		</label>
	</div>
	<ul id="mc_tabs" class="nav nav-tabs" data-tabs="tabs" role="tablist">
	{foreach $hooks item=hk}				
		<li class="{if $hk == 'displayHome'}active{/if}">
			<a href="#{$hk|escape:'html'}" data-toggle="tab" class="tab">{$hk|escape:'html'}</a>
		</li>
	{/foreach}
	</ul>
	<div class="tab-content">
	{foreach $hooks item=hk}
		<div id="{$hk|escape:'html'}" class="tab-pane hook_content {if $hk == 'displayHome'}active{/if}">
			{if $hk|substr:0:13 == 'multiCarousel'}
			<div class="alert alert-info">
				{l s='In order to display this hook, insert the following code to any tpl' mod='multicarousels'}: <strong>{literal}{hook h='{/literal}{$hk|escape:'html'}{literal}'}{/literal}</strong>
			</div>
			{/if}						
			<div class="carousel_list">				
				{if isset($carousels.$hk)}
					{foreach $carousels.$hk item=carousel}
						{include file="./carousel-form.tpl"							
							carousel=$carousel
							type_names=$type_names
							full=0
						}
					{/foreach}
				{/if}
			</div>
			<button type="button" class="addCarousel btn btn-default">
				<i class="icon icon-plus"></i> {l s='Add new carousel' mod='multicarousels'}			
			</button>			
		</div>
	{/foreach}
	</div>
</div>