Serveur preprod f0c0c48223 first push
2016-04-14 16:14:31 +02:00

89 lines
4.2 KiB
Smarty
Raw Blame History

{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 id="trailer_sales">
{if $sale}
<h3 class="page-product-heading"><span>{l s='Teaser' mod='privatesales'}</span></h3>
{capture name=img_sale}
{$link_img}{$sale->id}/trailer/{$sale->id}_{$cookie->id_lang}.jpg
{/capture}
<div class="sale content_scene_cat" id="sale_{$sale->id}" >
<div class="content_scene_cat_bg" style="{if $sale->imagetrailer}background:url({$smarty.capture.img_sale}) 0 bottom no-repeat; background-size:contain;{/if}min-height:217px;">
<div class="cat_desc">
<span class="category-name">{$sale->title}</span>
<div class="rte">
{if $sale->subtitle}
<p><strong>{$sale->subtitle}</strong></p>
{/if}
<p>{$sale->description}</p>
<p>{l s='From' mod='privatesales'} {$sale->date_start|date_format:"%d/%m/%Y %H:%M:%S"} </p>
<p>{l s='To' mod='privatesales'} {$sale->date_end|date_format:"%d/%m/%Y %H:%M:%S"} </p>
</div>
<div class="submit2">
<a target="_blank" class="sale_social" href=#">
<i class="icon-google-plus"></i>
</a>
<a target="_blank" class="sale_social" 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'}">
<i class="icon-facebook"></i>
</a>
<a target="_blank" class="sale_social" href="https://twitter.com/share?text={l s='Sale %s is open' sprintf=$sale->title mod='privatesales_home'}&url={$sale->link}" title="{l s='Share on Twitter' mod='privatesales_home'}">
<i class="icon-twitter"></i>
</a>
{if $cookie->logged && !$alerted}
<button name="alertme" id="sale_{$sale->id}" class="link_sale button btn btn-default button-medium">
<span>
{l s='Alert me!' mod='privatesales'}
<i class="icon-flag right"></i>
</span>
</button>
{/if}
</div>
</div>
{if $sale->percent}
<span class="new-box">
<span class="new-label">-{$sale->percent}%</span>
</span>
{/if}
</div>
</div>
{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 ){
$("[name='alertme']").hide();
$("#trailer_sales").prepend('<div class="alert alert-success"><button data-dismiss="alert" class="close" type="button"><3E></button>'+message+'</div>');
}
}
});
});
});
</script>
{/literal}
{/if}
{/if}
</div>