Revision: 1478
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1478&view=rev
Author:   cimorrison
Date:     2010-09-26 15:59:47 +0000 (Sun, 26 Sep 2010)

Log Message:
-----------
Merged in latest changes from the trunk

Modified Paths:
--------------
    mrbs/branches/provisional_bookings_new_style/web/day.php
    mrbs/branches/provisional_bookings_new_style/web/functions.inc
    mrbs/branches/provisional_bookings_new_style/web/month.php
    mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
    mrbs/branches/provisional_bookings_new_style/web/week.php

Added Paths:
-----------
    mrbs/branches/provisional_bookings_new_style/web/images/repeat.png

Property Changed:
----------------
    mrbs/branches/provisional_bookings_new_style/
    mrbs/branches/provisional_bookings_new_style/web/upgrade/5/pgsql.sql


Property changes on: mrbs/branches/provisional_bookings_new_style
___________________________________________________________________
Modified: svn:mergeinfo
   - /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/trunk:1407-1475
   + /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/trunk:1407-1477

Modified: mrbs/branches/provisional_bookings_new_style/web/day.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/day.php    2010-09-24 
17:44:14 UTC (rev 1477)
+++ mrbs/branches/provisional_bookings_new_style/web/day.php    2010-09-26 
15:59:47 UTC (rev 1478)
@@ -139,14 +139,15 @@
 //Note: The predicate clause 'start_time <= ...' is an equivalent but simpler
 //form of the original which had 3 BETWEEN parts. It selects all entries which
 //occur on or cross the current day.
-$sql = "SELECT $tbl_room.id AS room_id, start_time, end_time, name, 
$tbl_entry.id AS entry_id, type,
-        $tbl_entry.description AS entry_description, status,
-        $tbl_entry.create_by AS entry_create_by
-   FROM $tbl_entry, $tbl_room
-   WHERE $tbl_entry.room_id = $tbl_room.id
-   AND area_id = $area
-   AND start_time <= $pm7 AND end_time > $am7
-   ORDER BY start_time";   // necessary so that multiple bookings appear in 
the right order
+$sql = "SELECT R.id AS room_id, start_time, end_time, name, repeat_id,
+               E.id AS entry_id, type,
+               E.description AS entry_description, status,
+               E.create_by AS entry_create_by
+          FROM $tbl_entry E, $tbl_room R
+         WHERE E.room_id = R.id
+           AND area_id = $area
+           AND start_time <= $pm7 AND end_time > $am7
+      ORDER BY start_time";   // necessary so that multiple bookings appear in 
the right order
    
 $res = sql_query($sql);
 if (! $res)
@@ -163,6 +164,7 @@
   //  row['start_time'] = start time
   //  row['end_time'] = end time
   //  row['name'] = short description
+  //  row['repeat_id'] = repeat type
   //  row['entry_id'] = id of this booking
   //  row['type'] = type (internal/external)
   //  row['entry_description'] = description

Modified: mrbs/branches/provisional_bookings_new_style/web/functions.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/functions.inc      
2010-09-24 17:44:14 UTC (rev 1477)
+++ mrbs/branches/provisional_bookings_new_style/web/functions.inc      
2010-09-26 15:59:47 UTC (rev 1478)
@@ -1066,6 +1066,7 @@
   //       start_time
   //       end_time
   //       name
+  //       repeat_id
   //       entry_id
   //       type
   //       entry_description
@@ -1075,6 +1076,7 @@
   // $column is a column of the map of the screen that will be displayed
   // It looks like:
   //     $column[Time][n][id]
+  //                     [is_repeat]
   //                     [color]
   //                     [data]
   //                     [long_descr]
@@ -1145,6 +1147,7 @@
     
     // fill in the id, type and start time
     $column[$time_t][$n]["id"] = $row['entry_id'];
+    $column[$time_t][$n]["is_repeat"] = !empty($row['repeat_id']);
     $column[$time_t][$n]["status"] = $row['status'];
     $column[$time_t][$n]["color"] = $row['type'];
     $column[$time_t][$n]["start_time"] = utf8_strftime(hour_min_format(), 
$row['start_time']);
@@ -1275,6 +1278,7 @@
   // display and looks like this:
   // 
   // $cell[n][id]
+  //         [is_repeat]
   //         [color]
   //         [data]
   //         [long_descr]
@@ -1343,6 +1347,7 @@
     for ($n=0; $n<$n_bookings; $n++)
     {
       $id         = $cell[$n]["id"];
+      $is_repeat  = $cell[$n]["is_repeat"];
       $status     = $cell[$n]["status"];
       $color      = $cell[$n]["color"];
       $descr      = htmlspecialchars($cell[$n]["data"]);
@@ -1392,6 +1397,7 @@
     for ($n=0; $n<$n_bookings; $n++)
     {
       $id         = $cell[$n]["id"];
+      $is_repeat  = $cell[$n]["is_repeat"];
       $status     = $cell[$n]["status"];
       $color      = $cell[$n]["color"];
       $descr      = htmlspecialchars($cell[$n]["start_time"] . " " . 
$cell[$n]["data"]);
@@ -1414,7 +1420,9 @@
            (($n==0) ? " style=\"border-top-width: 0\"" : "") .   // no border 
for first row
            ">\n";
       echo "<div class=\"celldiv slots1\">\n";     // we want clipping of 
overflow
-      echo "  <a href=\"view_entry.php?id=$id&amp;". $query_strings['booking'] 
. "\" title=\"$long_descr\">$descr</a>\n";
+      echo "<a href=\"view_entry.php?id=$id&amp;". $query_strings['booking'] . 
"\" title=\"$long_descr\">";
+      echo ($is_repeat) ? "<img class=\"repeat_symbol\" 
src=\"images/repeat.png\" alt=\"" . get_vocab("series") . "\" title=\"" . 
get_vocab("series") . "\" width=\"10\" height=\"10\">" : '';
+      echo "$descr</a>\n";
       echo "</div>\n";
      
       echo "</td>\n";
@@ -1433,6 +1441,7 @@
     if(isset($cell[0]["id"]))
     {       
       $id         = $cell[0]["id"];
+      $is_repeat  = $cell[0]["is_repeat"];
       $status     = $cell[0]["status"];
       $color      = $cell[0]["color"];
       $descr      = htmlspecialchars($cell[0]["data"]);
@@ -1525,8 +1534,10 @@
         else
         {
           echo "<div class=\"celldiv slots" . $slots . "\">\n";     // we want 
clipping of overflow
-        } 
-        echo "  <a href=\"view_entry.php?id=$id&amp;". 
$query_strings['booking'] . "\" title=\"$long_descr\">$descr</a>\n";
+        }
+        echo "<a href=\"view_entry.php?id=$id&amp;". $query_strings['booking'] 
. "\" title=\"$long_descr\">";
+        echo ($is_repeat) ? "<img class=\"repeat_symbol $c\" 
src=\"images/repeat.png\" alt=\"" . get_vocab("series") . "\" title=\"" . 
get_vocab("series") . "\" width=\"10\" height=\"10\">" : '';
+        echo "$descr</a>\n";
         echo "</div>\n";
       }
       echo "</td>\n";

Copied: mrbs/branches/provisional_bookings_new_style/web/images/repeat.png 
(from rev 1477, mrbs/trunk/web/images/repeat.png)
===================================================================
(Binary files differ)

Modified: mrbs/branches/provisional_bookings_new_style/web/month.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/month.php  2010-09-24 
17:44:14 UTC (rev 1477)
+++ mrbs/branches/provisional_bookings_new_style/web/month.php  2010-09-26 
15:59:47 UTC (rev 1478)
@@ -256,7 +256,8 @@
 // This data will be retrieved day-by-day fo the whole month
 for ($day_num = 1; $day_num<=$days_in_month; $day_num++)
 {
-  $sql = "SELECT start_time, end_time, id, name, type, status, create_by
+  $sql = "SELECT start_time, end_time, id, name, type,
+                 repeat_id, status, create_by
             FROM $tbl_entry
            WHERE room_id=$room
              AND start_time <= $midnight_tonight[$day_num] AND end_time > 
$midnight[$day_num]
@@ -287,6 +288,7 @@
       }
       $d[$day_num]["id"][] = $row['id'];
       $d[$day_num]["color"][] = $row['type'];
+      $d[$day_num]["is_repeat"][] = !empty($row['repeat_id']);
       
       // Handle private events
       if (is_private_event($row['status'] & STATUS_PRIVATE)) 
@@ -316,6 +318,7 @@
         $d[$day_num]["shortdescrip"][] = htmlspecialchars($row['name']);
       }
       
+
       // Describe the start and end time, accounting for "all day"
       // and for entries starting before/ending after today.
       // There are 9 cases, for start time < = or > midnight this morning,
@@ -560,20 +563,17 @@
         {
           case "description":
           {
-            echo "<a href=\"$booking_link\" title=\"$full_text\">"
-              . $description_text . "</a>\n";
+            $display_text = $description_text;
             break;
           }
           case "slot":
           {
-            echo "<a href=\"$booking_link\" title=\"$full_text\">"
-              . $slot_text . "</a>\n";
+            $display_text = $slot_text;
             break;
           }
           case "both":
           {
-            echo "<a href=\"$booking_link\" title=\"$full_text\">"
-              . $full_text . "</a>\n";
+            $display_text = $full_text;
             break;
           }
           default:
@@ -581,6 +581,9 @@
             echo "error: unknown parameter";
           }
         }
+        echo "<a href=\"$booking_link\" title=\"$full_text\">";
+        echo ($d[$cday]['is_repeat'][$i]) ? "<img class=\"repeat_symbol\" 
src=\"images/repeat.png\" alt=\"" . get_vocab("series") . "\" title=\"" . 
get_vocab("series") . "\" width=\"10\" height=\"10\">" : '';
+        echo "$display_text</a>\n";
         echo "</div>\n";
       }
       echo "</div>\n";

Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php       
2010-09-24 17:44:14 UTC (rev 1477)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php       
2010-09-26 15:59:47 UTC (rev 1478)
@@ -208,6 +208,9 @@
 
 a.new_booking {display: block; font-size: medium; text-align: center}
 .new_booking img {margin: auto; padding: 4px 0 2px 0}
+img.repeat_symbol {float: right; padding: 3px}
+.dwm_main#month_main img.repeat_symbol {padding: 2px}
+
 <?php
 if (!$show_plus_link)
 {


Property changes on: 
mrbs/branches/provisional_bookings_new_style/web/upgrade/5/pgsql.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /mrbs/branches/custom_entry_fields/web/upgrade/5/pgsql.sql:1374-1396
/mrbs/branches/datepicker/web/upgrade/5/pgsql.sql:1409-1416
/mrbs/branches/provisional_bookings/web/upgrade/5/pgsql.sql:1242-1280
/mrbs/trunk/web/upgrade/5/pgsql.sql:1407-1475
   + /mrbs/branches/custom_entry_fields/web/upgrade/5/pgsql.sql:1374-1396
/mrbs/branches/datepicker/web/upgrade/5/pgsql.sql:1409-1416
/mrbs/branches/provisional_bookings/web/upgrade/5/pgsql.sql:1242-1280
/mrbs/trunk/web/upgrade/5/pgsql.sql:1407-1477

Modified: mrbs/branches/provisional_bookings_new_style/web/week.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/week.php   2010-09-24 
17:44:14 UTC (rev 1477)
+++ mrbs/branches/provisional_bookings_new_style/web/week.php   2010-09-26 
15:59:47 UTC (rev 1478)
@@ -217,13 +217,13 @@
 
 for ($j = 0; $j<=($num_of_days-1) ; $j++)
 {
-  $sql = "SELECT room_id, start_time, end_time, type, name, status,
-            id AS entry_id, description AS entry_description,
-            create_by AS entry_create_by
-          FROM $tbl_entry
-          WHERE room_id = $room
-          AND start_time <= $pm7[$j] AND end_time > $am7[$j]
-          ORDER BY start_time";   // necessary so that multiple bookings 
appear in the right order
+  $sql = "SELECT room_id, start_time, end_time, type, name, status, repeat_id,
+                 id AS entry_id, description AS entry_description,
+                 create_by AS entry_create_by
+            FROM $tbl_entry
+           WHERE room_id = $room
+             AND start_time <= $pm7[$j] AND end_time > $am7[$j]
+        ORDER BY start_time";   // necessary so that multiple bookings appear 
in the right order
 
   // Each row returned from the query is a meeting. Build an array of the
   // form:  $week_map[room][weekday][slot][x], where x = id, color, data, 
long_desc.


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to