<?php

    $agency = $this->agency;





    if($agency->getSeerus_key() == '')

        $url = '/' . $this->lang . '/agency/' . $this->agency->getUid() . '/';

    else

        $url = 'http://satisfaction.realadvice.be/' . $this->lang . '/restitution/'  . $agency->getSeerus_key();





?>



<div class="result">

    <a href="<?= $url ?>" class="image" style="background-image: url('<?= $agency->getLogoUrl() ?>')">

        <?php if(!is_null($agency->getSeerus_key()) && $agency->getSeerus_key() != '') {



            $nps = $agency->getNps();



            echo '<div class="rate">' . $this->partial('/public/partial/stars.php', array('quote'=>$agency->getNps())) . '</div>';



        } ?>

    </a>

    <div class="name"><?= $agency->getName() ?></div>

    <div class="description"><?= $agency->getLocalisedShortDescription($this->lang) ?></div>

    <hr/>

    <?php



        if($agency->getWebsite() != '')

            echo '<div class="website icon-home pull-icon"><a href="' . $agency->getWebsite() . '" target="_blank">Site web</a></div>';



        if($agency->getPhone() != '')

            echo '<div class="phone icon-phone pull-icon">' . $agency->getPhone() . '</div>';



        if($agency->getEmail() != '')

            echo '<div class="mail icon-mail pull-icon">'.$agency->getEmail().'</div>';



        if ($agency->getAddress() != ''){

            $city = ( is_null($agency->getCity()) || $agency->getCity() == "") ? $agency->getLocalite() : $agency->getCity();

            echo '<div class="address icon-location pull-icon">'. $agency->getAddress() .'<br>' . $agency->getCp() . ' '  . $city . '</div>';

        }



    ?>



    <a class="detail icon-right-dir" href="<?= $url ?>"><?= $this->t('visiter-agence') ?></a>



</div>