Commit a84e22b6 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Alteration mineur et ajout du toString pour batiment nécessaire ???

parent 66891e2c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -57,11 +57,11 @@ return [

    'router' => [
        'routes' => [
            'octopus' => [
            'unicaen-octopus' => [
                'type' => Literal::class,
                'may_terminate' => true,
                'options' => [
                    'route'    => '/octopus',
                    'route'    => '/unicaen-octopus',
                    'defaults' => [
                        'controller' => OctopusController::class,
                        'action'     => 'index',
+8 −0
Original line number Diff line number Diff line
@@ -98,5 +98,13 @@ class ImmobilierBatiment {
        return $this->site;
    }

    public function __toString()
    {
        $texte  = $this->getLibelle();
        $texte .= " ";
        //$texte .= "<span class='badge'> ". $this->getSite()->getLibelle() ." </span>";
       return $texte;
    }


}
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ class ImmobilierService {
        $qb = $this->getEntityManager()->getRepository(ImmobilierLocal::class)->createQueryBuilder('local')
            ->andWhere('local.libelle LIKE :search')
            ->setParameter('search', '%'.$term.'%')
            ->orderBy('type.libelle')
            ->orderBy('local.libelle')
        ;

        $result = $qb->getQuery()->getResult();
@@ -110,7 +110,7 @@ class ImmobilierService {
        $qb = $this->getEntityManager()->getRepository(ImmobilierNiveau::class)->createQueryBuilder('local')
            ->andWhere('local.libelle LIKE :search')
            ->setParameter('search', '%'.$term.'%')
            ->orderBy('type.libelle')
            ->orderBy('local.libelle')
        ;

        $result = $qb->getQuery()->getResult();
@@ -163,7 +163,7 @@ class ImmobilierService {
        $qb = $this->getEntityManager()->getRepository(ImmobilierBatiment::class)->createQueryBuilder('local')
            ->andWhere('local.libelle LIKE :search')
            ->setParameter('search', '%'.$term.'%')
            ->orderBy('type.libelle')
            ->orderBy('local.libelle')
        ;

        $result = $qb->getQuery()->getResult();
@@ -214,7 +214,7 @@ class ImmobilierService {
        $qb = $this->getEntityManager()->getRepository(ImmobilierSite::class)->createQueryBuilder('local')
            ->andWhere('local.libelle LIKE :search')
            ->setParameter('search', '%'.$term.'%')
            ->orderBy('type.libelle')
            ->orderBy('local.libelle')
        ;

        $result = $qb->getQuery()->getResult();
+21 −4
Original line number Diff line number Diff line
@@ -13,6 +13,9 @@
 *
 * @var \Octopus\Entity\Db\Pays[] $pays
 */

use UnicaenApp\Form\Element\SearchAndSelect;

?>

<h1>
@@ -50,6 +53,7 @@
                <td> <?php echo $individu->getDateNaissance(); ?> </td>
                <td> <?php echo $individu->getVilleNaissance(); ?> </td>
                <td> <?php echo $individu->getCPaysNaissance(); ?> </td>
<!--                <td> --><?php //echo $individu->getCPaysNaissance()->getLibelleLong(); ?><!-- </td>-->
            </tr>

            <?php $position += 1; ?>
@@ -217,6 +221,19 @@
        </span>
    </h3>

    <form method='post' class="form-inline " style="margin-bottom:10px;">
        <?php
        $sas = new SearchAndSelect('utilisateur');
        $sas->setAttribute('placeholder','Recherchez un utilisateur');
        $sas->setAttribute('class', 'individu-finder');
        //    $sas->setAutocompleteSource($this->url('utilisateur-preecog/rechercher-utilisateur', [], [], true));
        $sas->setAutocompleteSource($this->url('poste/rechercher-batiment', [], [], true));
        echo $this->formControlGroup($sas, 'formSearchAndSelect');
        ?>
        <input type="submit" class="" value="Sélectionner l'utilisateur"/>
    </form>


    <table class="table table-condensed">
        <thead>
        <tr>
@@ -290,22 +307,22 @@
    <table class="table table-condensed">
        <thead>
        <tr>
            <th> Libelle court </th>
            <th> Code </th>
            <th> Libellé </th>
            <th> ISO 2 </th>
            <th> ISO 3 </th>
            <th> ISO Numerique </th>
            <th> Dates </th>
        </tr>
        </thead>
        <tbody>
        <?php $position = 0; ?>
        <?php foreach ($pays as $entry) : ?>
            <tr>
                <td> <?php echo $entry->getLibelleCourt(); ?> </td>
                <td> <?php echo $entry->getCodePays(); ?> </td>
                <td> <?php echo $entry->getLibelleLong(); ?> </td>
                <td> <?php echo $entry->getCodeIso2(); ?> </td>
                <td> <?php echo $entry->getCodeIso3(); ?> </td>
                <td> <?php echo $entry->getCodeIsoNum(); ?> </td>
                <td> <?php echo $entry->getDateOuverture(); ?> &rarr; <?php echo $entry->getDateFermeture(); ?></td>
            </tr>

            <?php $position += 1; ?>