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

74 lines
3.0 KiB
Smarty
Executable File

{if $privatesale && $category->id AND $category->active}
<script type="text/javascript">
<!--{literal}
var endstring = "{/literal}{$privatesale->date_end}{literal}";
var enddate = endstring.split(' ')[0].split('-');
var endtime = endstring.split(' ')[1].split(':');
var endofsale = new Date(enddate[0], enddate[1]-1, enddate[2], endtime[0], endtime[1], endtime[2]);
$('#countdown').countdown({serverSync:function(){var d = new Date({/literal}{$smarty.now|date_format:'%Y, '}{$smarty.now|date_format:'%-m'} - 1{$smarty.now|date_format:', %-d, %-H, %-M, %-S'}{literal}); return d;}, until: endofsale, layout: '{d<}{dn} {dl} {d>} {hn} {hl} {mn} {ml}'});
$(document).ready(function(){
$('.back-top.smobile a.back_sale').height($('.description-text-cat').height());
// $('a.back_').height($('.imagelogo').height()+10+2); // padding 5 + border 1
});
-->{/literal}
</script>
<div id="block_category_privatesales" class="block">
<div class="pull-left back-top snotmobile">
<a href="{$link->getModuleLink('privatesales', 'home')|escape:'htmlall':'UTF-8'}{if $privatesale->id_privatesales!=298}#sale_{$privatesale->id_privatesales}{/if}" class="back_sale" title="{l s='Back'}">
<span>
<i class="icon-reply">&nbsp;</i>
</span>
{l s='Retour'}
</a>
</div>
<h1 class="snotmobile">{$privatesale->subtitle}</h1>
<div class="spe_cat snotmobile"></div>
<p class="sale-date">
{if strtotime($privatesale->date_end) > time()}
<span>{l s='To' mod='privatesales'} {$privatesale->date_end|date_format:"%A %d/%m à %Hh%M"}</span><span></span>
{else}
<span>{l s='La vente est terminée' mod='privatesales'}</span><span></span>
{/if}
</p>
<div class="clearfix description-cat ">
<div class="col-xs-12 col-sm-4 description-text-cat">
<div class="pull-left back-top smobile">
<a href="{$link->getModuleLink('privatesales', 'home')|escape:'htmlall':'UTF-8'}#sale_{$privatesale->id_privatesales}" class="back_sale" title="{l s='Back'}">
<span>
<i class="icon-reply">&nbsp;</i>
</span>
{l s='Retour'}
</a>
</div>
{capture name=img_sale}
{$link_img}{$privatesale->id}/logo/{$privatesale->id}_{$cookie->id_lang}.jpg
{/capture}
<div class="imagelogo">
{if $privatesale->imagelogo}
<img src="{$smarty.capture.img_sale}"/>
{/if}
</div>
<div class="snotmobile">
{if $category->description}
{$category->description}
{/if}
{if $privatesale->concours && strtotime($privatesale->date_start) >= {mktime(strftime('%H') - $privatesale->concours_delay)}}
<div class="picto-concours-cat"></div>
{/if}
</div>
</div>
<div class="snotmobile col-sm-8 img-cat">
{if $privatesale->picto_category}
<div class="picto-category"></div>
{/if}
<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}" />
</div>
</div>
</div>
{/if}