Skip to content

Commit

Permalink
FIX affichage page résa journalière
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeDevome committed Sep 28, 2024
1 parent a54bf3f commit 0c15f29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions reservation/controleurs/jour.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@
{
if (verif_acces_ressource($user_name, $room))
{
$afficherCellule = 0;
$statutCellule = 0; //0 vide, 1 réservable, 2 déjà une reservation, 3 hors résa
$titre = "";
$descr = "";
Expand Down Expand Up @@ -287,16 +288,19 @@
if ($id_derniere_ligne_du_bloc != $id)
$cellules[$id] = $cellules[$id]-1;
}
$afficherCellule = 1;
}
$rowspan = $cellules[$id];
}
$compteur[$id] = 1;
}
else
$afficherCellule = 1;


if ( $id == 0 || (est_hors_reservation(mktime(0, 0, 0, $month, $day, $year), $area)))
{

$afficherCellule = 1;
$date_booking = mktime($hour, $minute, 0, $month, $day, $year);
if ($enable_periods == 'y')
$date_booking = mktime(23,59,0,$month,$day,$year);
Expand All @@ -323,13 +327,15 @@
}
else if ($descr != "")
{
$afficherCellule = 1;
$statutCellule = 2;
if (($statut_room[$room] == "1") || (($statut_room[$room] == "0") && ($authLevel > 2) ))
{
$titre = $today[$room][$t]["who"];
}
}
$cellulesJours[] = array('statut' => $statutCellule, 'class' => $c, 'rowspan' => $rowspan, 'ressource' => $room, 'idresa' => $id, 'titre' => $titre, 'descr' => $descr, 'ficheResa' => $acces_fiche_reservation);
if($afficherCellule == 1)
$cellulesJours[] = array('statut' => $statutCellule, 'class' => $c, 'rowspan' => $rowspan, 'ressource' => $room, 'idresa' => $id, 'titre' => $titre, 'descr' => $descr, 'ficheResa' => $acces_fiche_reservation);
}
}
$lignesHoraires[] = array('classHoraire' => $classHoraire, 'horairePeriode' => $horairePeriode, 'cellulesJours' => $cellulesJours, 'periode' => $time_t_stripped, 'heure' => $hour, 'minute' => $minute);
Expand Down
2 changes: 1 addition & 1 deletion reservation/templates/jour.twig
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<tr>
<td class="{{ligne.classHoraire}}">{{ligne.horairePeriode}}</td>
{% for cellule in ligne.cellulesJours %}
<td rowspan="{{cellule.rowspan}}" class="{{cellule.class}}">
<td rowspan="{{cellule.rowspan}}" class="{{cellule.class}}">
{% if cellule.statut == 1 %} <!-- Réservable -->
<a href="app.php?p=editentree&room={{cellule.ressource}}&amp;year={{d.gYear}}&amp;month={{d.gMonth}}&amp;day={{d.gDay}}&amp;page=jour&amp;room_back={{cellule.ressource}}&amp;{% if d.usePeriode == "y" %}period={{ligne.periode}}{% else %}hour={{ligne.heure}}&amp;minute={{ligne.minute}}{% endif %}" title="{{trad.cliquez_pour_effectuer_une_reservation}}">
<i class="fa-solid fa-plus"></i>
Expand Down

0 comments on commit 0c15f29

Please sign in to comment.