154 lines
6.8 KiB
Smarty
Executable File
154 lines
6.8 KiB
Smarty
Executable File
{capture name=path}{l s='La presse en parle'}{/capture}
|
|
{include file="$tpl_dir./breadcrumb.tpl"}
|
|
<div class="borderGreen">
|
|
<h1>[{l s='La presse en parle'}]</h1>
|
|
|
|
{if $pressProducts|@count>0}
|
|
<form action="#" method="post">
|
|
<div class="filtreProduits">
|
|
<label for="pressProducts">{l s='Filtrer par produit'}</label>
|
|
<div class="select" style="float:right">
|
|
<select onchange="document.location.href=this.value" class="selectBox select308">
|
|
<option value="{$link->getPageLink('presse.php',true)}"> --- </option>
|
|
{assign var=catName value=""}
|
|
{assign var=compteur value=0}
|
|
{foreach from=$pressProducts item=produit}
|
|
{if $produit.category_lang==$cart->id_lang}
|
|
{if $compteur==0}
|
|
{assign var=compteur value=1}
|
|
<optgroup label="{$produit.category_name}">
|
|
{assign var=catName value=$produit.category_name}
|
|
{else}
|
|
{if $catName!=$produit.category_name}
|
|
</optgroup>
|
|
<optgroup label="{$produit.category_name}">
|
|
{assign var=catName value=$produit.category_name}
|
|
{/if}
|
|
{/if}
|
|
<option value="{$link->getPageLink('presse.php',true)}?id_product={$produit.id_product}&page={$page}"{if $produit.id_product==$idProduct} selected="selected"{/if}>{$produit.name}</option>
|
|
{/if}
|
|
{/foreach}
|
|
</optgroup>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{/if}
|
|
{if $nbPage>0}
|
|
<div class="pagination">
|
|
<ul>
|
|
<li>{l s='Page'}</li>
|
|
{if $page==""}
|
|
{assign var=page value=1}
|
|
{/if}
|
|
{if $page==1}
|
|
<li class="current"><span>1</span></li>
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=2">2</a></li>
|
|
{/if}
|
|
{if $page==2}
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=1">1</a></li>
|
|
<li class="current"><span>2</span></li>
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=3">3</a></li>
|
|
{/if}
|
|
{if $page==3}
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=1">1</a></li>
|
|
<li>...</li>
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=3">3</a></li>
|
|
<li class="current"><span>4</span></li>
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=5">5</a></li>
|
|
{/if}
|
|
{if $page>=4}
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=1">1</a></li>
|
|
<li>...</li>
|
|
{/if}
|
|
{section name=pagination start=3 loop=$page+2 step=1}
|
|
{if $page>=4 && $smarty.section.pagination.index>$page-2 && $smarty.section.pagination.index<$page+2 && $nbPage>=$smarty.section.pagination.index}
|
|
{if $page == $smarty.section.pagination.index}
|
|
<li class="current"> {if $smarty.section.pagination.index>1}{/if}<span>{$page|escape:'htmlall':'UTF-8'}</span></li>
|
|
{else}
|
|
<li>{if $smarty.section.pagination.index>1}{/if}<a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page={$smarty.section.pagination.index}">{$smarty.section.pagination.index|escape:'htmlall':'UTF-8'}</a></li>
|
|
{/if}
|
|
{/if}
|
|
{/section}
|
|
|
|
|
|
{if $nbPage>=$page+3}
|
|
<li class="truncate">...</li>
|
|
<li><a href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page={$nbPage|intval}">{$nbPage|intval}</a></li>
|
|
{/if}
|
|
{if $nbPage==$page+2}
|
|
<li><a href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page={$nbPage|intval}">{$nbPage|intval}</a></li>
|
|
{/if}
|
|
</ul>
|
|
</div>
|
|
{/if}
|
|
<div class="clear items">
|
|
<ul>
|
|
{foreach from=$press item=presse key=compteur}
|
|
<li class="{if $compteur % 2}alternate_item{else}item{/if}">
|
|
<div class="floatLeft"><img src="{$base_dir}modules/devspepresse/images/{$presse.image}" alt="{$presse.legend}" class="image" width="143"/></div>
|
|
<div class="floatRight">
|
|
<h2>" {$presse.title} "</h2>
|
|
<div class="texte">
|
|
{$presse.description}
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
<div class="clear"></div>
|
|
</div>
|
|
|
|
{if $nbPage>0}
|
|
<div class="pagination">
|
|
<ul>
|
|
<li>{l s='Page'}</li>
|
|
{if $page==""}
|
|
{assign var=page value=1}
|
|
{/if}
|
|
{if $page==1}
|
|
<li class="current"><span>1</span></li>
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=2">2</a></li>
|
|
{/if}
|
|
{if $page==2}
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=1">1</a></li>
|
|
<li class="current"><span>2</span></li>
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=3">3</a></li>
|
|
{/if}
|
|
{if $page==3}
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=1">1</a></li>
|
|
<li>...</li>
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=3">3</a></li>
|
|
<li class="current"><span>4</span></li>
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=5">5</a></li>
|
|
{/if}
|
|
{if $page>=4}
|
|
<li><a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page=1">1</a></li>
|
|
<li>...</li>
|
|
{/if}
|
|
{section name=pagination start=3 loop=$page+2 step=1}
|
|
{if $page>=4 && $smarty.section.pagination.index>$page-2 && $smarty.section.pagination.index<$page+2 && $nbPage>=$smarty.section.pagination.index}
|
|
{if $page == $smarty.section.pagination.index}
|
|
<li class="current"> {if $smarty.section.pagination.index>1}{/if}<span>{$page|escape:'htmlall':'UTF-8'}</span></li>
|
|
{else}
|
|
<li>{if $smarty.section.pagination.index>1}{/if}<a {$no_follow_text} href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page={$smarty.section.pagination.index}">{$smarty.section.pagination.index|escape:'htmlall':'UTF-8'}</a></li>
|
|
{/if}
|
|
{/if}
|
|
{/section}
|
|
|
|
|
|
{if $nbPage>=$page+3}
|
|
<li class="truncate">...</li>
|
|
<li><a href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page={$nbPage|intval}">{$nbPage|intval}</a></li>
|
|
{/if}
|
|
{if $nbPage==$page+2}
|
|
<li><a href="{$link->getPageLink('presse.php',true)}?{if $idProduct>0}id_product={$idProduct}&{/if}page={$nbPage|intval}">{$nbPage|intval}</a></li>
|
|
{/if}
|
|
</ul>
|
|
<div class="clear"></div>
|
|
</div>
|
|
{/if}
|
|
<div class="clear"></div>
|
|
</div>
|
|
|