Skip to content

Commit

Permalink
amélioration de l'affichage et liens pour créer une réservation
Browse files Browse the repository at this point in the history
  • Loading branch information
ynaessens committed May 16, 2018
1 parent 50fc61e commit 9103433
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG
@@ -1,8 +1,8 @@
Bugs connus sur la version de GitHub :
- La supression en bloc ne fonctionne pas
- affichage défectueux du menu en position haute dans la page month_all2


Tâches prévus :
Tâches prévues :
- Outil test des prérequis droits...


Expand Down
15 changes: 12 additions & 3 deletions month_all2.php
Expand Up @@ -3,7 +3,7 @@
* month_all2.php
* Interface d'accueil avec affichage par mois des réservations de toutes les ressources d'un domaine
* Ce script fait partie de l'application GRR
* Dernière modification : $Date: 2018-05-14 18:30$
* Dernière modification : $Date: 2018-05-16 15:30$
* @author Laurent Delineau & JeromeB & Yan Naessens
* @copyright Copyright 2003-2018 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
Expand Down Expand Up @@ -231,7 +231,7 @@
}
$weekcol = 0;
echo '<table class="table-bordered">'.PHP_EOL;
$sql = "SELECT room_name, capacity, id, description FROM ".TABLE_PREFIX."_room WHERE area_id=$area ORDER BY order_display,room_name";
$sql = "SELECT room_name, capacity, id, description, statut_room FROM ".TABLE_PREFIX."_room WHERE area_id=$area ORDER BY order_display,room_name";
$res = grr_sql_query($sql);
echo "<tr><th></th>\n";
//$t2 = mktime(0, 0, 0, $month, 1, $year);
Expand Down Expand Up @@ -290,7 +290,7 @@
}
else
{
if (isset($d[$cday]["id"][0]))
if (isset($d[$cday]["id"][0])) // il y a une réservation au moins à afficher
{
$n = count($d[$cday]["id"]);
for ($i = 0; $i < $n; $i++)
Expand Down Expand Up @@ -336,6 +336,15 @@
}
}
}
// la ressource est-elle accessible en réservation ? on affiche le lien vers edit_entry
$date_booking = $t2 +86400 ; // le jour courant à minuit
if ((($authGetUserLevel > 1) || (auth_visiteur(getUserName(), $row['2']) == 1)) && (UserRoomMaxBooking(getUserName(), $row['2'], 1) != 0) && verif_booking_date(getUserName(), -1, $row['2'], $date_booking, $date_now, $enable_periods) && verif_delais_max_resa_room(getUserName(), $row['2'], $date_booking) && verif_delais_min_resa_room(getUserName(), $row['2'], $date_booking) && plages_libre_semaine_ressource($row['2'], $month, $cday, $year) && (($row['4'] == "1") || (($row['4'] == "0") && (authGetUserLevel(getUserName(),$row['2']) > 2) )) && $_GET['pview'] != 1)
{
if ($enable_periods == 'y')
echo '<a href="edit_entry.php?room=',$row["2"],'&amp;period=&amp;year=',$year,'&amp;month=',$month,'&amp;day=',$cday,'&amp;page=month_all2" title="',get_vocab("cliquez_pour_effectuer_une_reservation"),'"><span class="glyphicon glyphicon-plus"></span></a>',PHP_EOL;
else
echo '<a href="edit_entry.php?room=',$row["2"],'&amp;minute=0&amp;year=',$year,'&amp;month=',$month,'&amp;day=',$cday,'&amp;page=month_all2" title="',get_vocab("cliquez_pour_effectuer_une_reservation"),'"><span class="glyphicon glyphicon-plus"></span></a>',PHP_EOL;;
}
}
echo "</td>\n";
}
Expand Down

1 comment on commit 9103433

@ynaessens
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l'affichage de la page en paramétrant le menu en haut n'est toujours pas correct

Please sign in to comment.