mod_roomReservationConfig: when whitelisting a room, the log message for un-whitelist...
[iserv-mod-room-reservation.git] / includes / mod_roomReservationConfigPage.inc
index 4c74132..46ce45a 100644 (file)
@@ -29,6 +29,7 @@
 require_once("ctrl.inc");
 require_once("mod_room-reservation/mod_roomReservationPage.inc");
 require_once("mod_room-reservation/mod_roomReservationTimesliceListBox.inc");
+require_once("mod_room-reservation/mod_roomReservationRoomWhitelistListBox.inc");
 
 /** @todo document */
 class mod_roomReservationConfigPage extends mod_roomReservationPage {
@@ -36,10 +37,13 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
   protected $bPostShowWeekend;
   protected $bPostShowLessons;
   protected $asMessages = array();
+  protected $otlb;
+  protected $orwlb;
   
   public function __construct(mod_roomReservationConfig &$oCfg) {
     parent::__construct($oCfg);
-    
+    $this->otlb = new mod_roomReservationTimesliceListBox($this->oCfg);
+    $this->orwlb = new mod_roomReservationRoomWhitelistListBox($this->oCfg);
     $this->setTitle(_c("room-reservation:Configuration"));
     $this->setIcon("mod_room-reservation_config");
   }
@@ -54,17 +58,11 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
         $this->bPostShowWeekend = 
           ($_POST["mod_roomReservationConfigPage"]["showweekend"] == true);
       }
-      ###########
-      echo "bPostShowWeekend is ".($this->bPostShowWeekend?"true ":"false ");
-      ###########
       
       if(isset($_POST["mod_roomReservationConfigPage"]["showlessons"])) {
         $this->bPostShowLessons = 
           ($_POST["mod_roomReservationConfigPage"]["showlessons"] == true);
       }
-      ###########
-      echo "bPostShowLessons is ".($this->bPostShowLessons?"true ":"false ");
-      ###########
       
       // process the request
       if(isset($_POST["mod_roomReservationConfigPage"]["submit"])) {
@@ -85,8 +83,17 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
       printf("<p>%s</p>", nl2br(q(join("\n", $this->asMessages))));
     }
     
+    // first column
     echo "<table border='0' cellspacing='10' cellpadding='0'><tr>".
-       "<td style='width:50%;'>\n"; // two rows
+       "<td style='width:50%;'>\n";
+    
+    GroupBox(_c("room-reservation:Available rooms"), "host");
+    printf("<p>%s</p>", _c("room-reservation:The following rooms are ".
+       "available for booking:"));
+    echo "<div style='margin:8px;'>";
+    $this->orwlb->show();
+    echo "</div>\n";
+    _GroupBox();
     
     GroupBox(_("Privileges"), "keys");
     $asAdminGroups = rrPrivilegedGroups("mod_roomreservation_admin");
@@ -121,6 +128,18 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
     echo "</tr></table></p>\n";
     _GroupBox();
 
+    // second column
+    echo "</td><td><!--second row-->\n";
+    
+    GroupBox(_c("room-reservation:Periods"), "mod_room-reservation_timeslice");
+    printf("<p>%s</p>", _c("room-reservation:Here you can fill in the ".
+       "periods where bookings can be undertaken. A booking period can ".
+       "e.&nbsp;g. correspond to a lesson."));
+    echo "<div style='margin:8px;'>";
+    $this->otlb->show();
+    echo "</div>\n";
+    _GroupBox();
+    
     GroupBox(_c("room-reservation:Further options"), "manage");
     printf("<div style='margin:8px;'><form action='%s' method='post'>".
        "<table><tr>\n", $_SERVER["PHP_SELF"]);
@@ -153,20 +172,7 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
        "[submit]' value='%s' /></td>", $GLOBALS["stdbtn"], _("OK"));
     echo "</tr></table></form></div>\n";
     _GroupBox();
-    
-    // second row
-    echo "</td><td><!--second row-->\n";
-    
-    GroupBox(_c("room-reservation:Periods"), "mod_room-reservation_timeslice");
-    printf("<p>%s</p>", _c("room-reservation:Here you can fill in the ".
-       "periods where bookings can be undertaken. A booking period can ".
-       "e.&nbsp;g. correspond to a lesson."));
-    echo "<div style='margin:8px;'>";
-    $otlb = new mod_roomReservationTimesliceListBox($this->oCfg);
-    $otlb->show();
-    echo "</div>";
-    _GroupBox();
-    
+
     echo "</td></tr></table>\n";
   }
 }
This page took 0.024157 seconds and 4 git commands to generate.