<?php

    $results = $this->results;

    $count = $this->count;

    $currentPage = $this->page;

    $location = $this->loc;

    $name = $this->name;

?>



<div class="results-wrapper">



    <div class="container">

        <h3>

            <?php

                if($count == 0 || $this->editmode) echo $this->input('no-result');

                if($count == 1 || $this->editmode) echo $count . ' ' . $this->input('one-result');

                if($count > 1  || $this->editmode) echo $count . ' ' . $this->input('results-found');

            ?>

        </h3>



        <hr/>

        <div class="results-list">



        <?php

/*

            $i = $start;

            while($i < $start + 12 && $i < $count){

                echo $this->partial('/public/partial/result.php', array('agency'=>$results[$i]));

                $i++;

            }

*/

            foreach($results as $result){

                echo $this->partial('/public/partial/result.php', array('agency'=>$result, 'lang'=>$this->lang));

            }

        ?>



        </div>

    </div>

</div>



<?php if ($count > 12) {  ?>

<div class="pager">

    <?= $this->partial('/public/partial/paginator.php', array('name'=>$name,

                                                              'currentPage'=>$currentPage,

                                                              'loc'=>$location,

                                                              'lastPage'=>ceil($count/12)) ) ?>

</div>

<?php } ?>



<div class="pub-wrapper container">

    <!-- <div class="pub"></div><div class="pub"></div><div class="pub"></div><div class="pub"></div> -->

    <!--<a target="_blank" href="http://www.pre-visite.be/<?/*= $this->lang */?>"><img src="/pub/previsite.gif" alt=""></a>-->

</div>

