privilegedemarque/themes/site/modules/privatesales/privatesales-trailer.tpl
Serveur preprod f0c0c48223 first push
2016-04-14 16:14:31 +02:00

121 lines
5.8 KiB
Smarty
Executable File

{capture name=path}
{if $sale}
<a href="{$link->getModuleLink('privatesales', 'home')|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Private sales' mod='privatesales'}">{l s='Private sales' mod='privatesales'}</a>
<span class="navigation-pipe">></span>
{l s='Teaser' mod='privatesales'} {$sale->title}
{/if}
{/capture}
<div class="salesTop">
{hook h="displaySalesTop"}
</div>
<div id="trailer_sales" class="current_sales">
{if $sale}
<h3 class="sale-title-type col-xs-12"><span>
{if strtotime($sale->date_end) > time()}
{l s='vente à venir' mod='privatesales'}
{else}
{l s='La vente est terminée' mod='privatesales'}
{/if}
</span></h3>
{capture name=img_sale}{$base_dir}{$link_img}{$sale->id}/trailer/{$sale->id}_{$cookie->id_lang}.jpg{/capture}
<div class="sale" id="sale_{$sale->id}" >
<div class="sale_container clearfix">
<div class="sale_img col-xs-12 col-sm-6 col-md-6 col-lg-6 " {if $sale->imagetrailer} style="background: url('{$smarty.capture.img_sale}') no-repeat left center / cover"{/if} >
<div class="sale_logo">
{capture name=img_logo}{$base_dir}{$link_img}{$sale->id}/logo/{$sale->id}_{$cookie->id_lang}.jpg{/capture}
{if $sale->imagelogo}<img src="{$smarty.capture.img_logo}" />{/if}
{if $sale->percent}<br/>
<div class="sale_percent">
<span>
{l s='Up to' mod='privatesales'} -{$sale->percent}%
</span>
</div>
{/if}
</div>
</div>
<div class="sale_desc col-xs-12 col-sm-6 col-md-6 col-lg-6">
{if strtotime($sale->date_end) > time()}
<div class="sale_social snotmobile">
<a target="_blank" class="fb" href="http://www.facebook.com/sharer.php?u={$sale->link}&t={$sale->title|rawurlencode}%20{l s='on' mod='privatesales'}%20{$shop_name|rawurlencode}" title="{l s='Share on Facebook' mod='privatesales'}">
</a>
<a target="_blank" class="twt" href="https://twitter.com/share?text={l s='Sale %s is open' sprintf=$sale->title mod='privatesales'}&url={$sale->link}" title="{l s='Share on Twitter' mod='privatesales'}">
</a>
{hook h='displaySaleLink' id_sale={$sale->id} type='trailer'}
</div>
<div>
<p class="sale-date">{l s='From' mod='privatesales'} {$sale->date_start|date_format:"%A %d/%m à %Hh%M"}</p>
</div>
{/if}
<span class="sale-name">{$sale->title}</span>
<div>
{if $sale->subtitle}
<p class="sale-subtitle">{$sale->subtitle}</p>
{/if}
<p class="snotmobile">{$sale->description}</p>
</div>
{if strtotime($sale->date_end) > time()}
<div class="button-container clearfix">
{if $cookie->logged && !$alerted}
<p class="snotmobile left col-xs-7">{l s='N\'oubliez pas cette prochaine vente & recevez un mail de rappel !'}</p>
<button name="alertme" id="sale_{$sale->id}" class="button-grey right">
<span>
{l s='Alert me!' mod='privatesales'}
<i class="icon-flag right"></i>
</span>
</button>
{/if}
</div>
{/if}
</div>
</div>
</div>
<a class="button-grey" href="{$base_dir}">
<span class="alert-text">
{l s='Accueil' mod='privatesales'}
</span>
</a>
{if $cookie->logged}
{assign var=params value=['id_sale' => $sale->id]}
<script>
var url = "{$link->getModuleLink('privatesales', 'trailer', $params )}";
var id_privatesales = {$sale->id};
var message = "{l s='You request has been save' mod='privatesales' js=1}";
</script>
{literal}
<script>
$(document).ready(function(){
$("[name='alertme']").click(function(event){
$.ajax({
type: "POST",
url: url,
dataType: 'json',
data : {
action : "submitNewsletter",
ajax: 1,
id_privatesales: id_privatesales,
},
success: function(response){
if ( !response.hasError ){
$(".button-container").hide();
$('html, body').animate({scrollTop:0}, 'slow');
$("#trailer_sales").prepend('<div class="alert alert-success">'+message+'</div>');
}
}
});
});
});
</script>
{/literal}
{/if}
{/if}
</div>