Damien LASSERRE 8c6981b0b4 Correction de bug sur le lien de phpchardir
+ résolution du probleme de pagination.
2011-12-07 08:58:50 +00:00

52 lines
2.9 KiB
PHTML

<div id="center">
<?php if ($this->resultats->NumberOfHits == 0): ?>
<p>Aucun résultats</p>
<?php else: ?>
<div class="giant-search">
<p align="center"><b>
<?php echo number_format($this->resultats->NumberOfHits, 0, ',', ' ')?>
réponses avec les critères <a href="<?php echo $this->lienReferer;?>">"<?php echo $this->referer; ?>"</a>.
<?php echo $this->userMaxResult;?> résultats affichés.
Page <?php echo $this->page + 1 .'/'. $this->resultats->NumberOfHits?>.</b>
</p>
<ol start="<?php echo ($this->userMaxResult * $this->page) + 1; ?>">
<?php foreach ($this->resultats->Results->Company as $resultat) :?>
<?php if($this->debug):?>
<?php echo $this->action('identite', 'debug', null, array('resultat' => $resultat, 'soap' => $this->soap));?>
<?php endif;?>
<li>
<?php echo $this->partial('giant/partials/rowSearch.phtml', array('resultat' => $resultat, 'pays', $this->pays));?>
</li>
<?php endforeach;?>
</ol>
<div id="Paginator">
<center>
<table>
<tr>
<?php if ($this->page > 0):?>
<td>
<a href="<?php echo $this->url(array('controller' => 'giant', 'action' => 'search', 'page' => $this->page - 1, 'pays' => $this->pays)) ?>">
<img src="/themes/default/images/boutton_precedent_off.gif" onmouseover="this.src='/themes/default/images/boutton_precedent_on.gif'" onmouseout="this.src='/themes/default/images/boutton_precedent_off.gif'" />
</a>
</td>
<?php endif;?>
<td valign="middle">&nbsp;Page <?php echo $this->page + 1 .'/'. round(($this->resultats->NumberOfHits > $this->userMaxResult)?$this->resultats->NumberOfHits/$this->userMaxResult:1);?>&nbsp;</td>
<?php if ($this->userMaxResult < $this->resultats->NumberOfHits):?>
<td>
<a href="<?php echo $this->url(array('controller' => 'giant', 'action' => 'search', 'page' => $this->page + 1, 'pays' => $this->pays)) ?>">
<img src="/themes/default/images/boutton_suivant_off.gif" onmouseover="this.src='/themes/default/images/boutton_suivant_on.gif'" onmouseout="this.src='/themes/default/images/boutton_suivant_off.gif'" />
</a>
</td>
<?php endif;?>
</tr>
</table>
</center>
</div>
<br />
<p id="contact">
<b>Si aucun résultat ne correspond à votre recherche.
<a href="<?php echo $this->url(array('controller' => 'giant', 'action' => 'contact'))?>">Cliquez-ici.</a></b>
</p>
</div>
<?php endif;?>
</div>