Revision: 2216
http://mrbs.svn.sourceforge.net/mrbs/?rev=2216&view=rev
Author: cimorrison
Date: 2011-12-29 15:32:47 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
Added the ability to display the mini calendars at the bottom, if
$display_calendars_bottom is set to true. Based on a patch from Daniel Yule.
Modified Paths:
--------------
mrbs/trunk/web/day.php
mrbs/trunk/web/mincals.inc
mrbs/trunk/web/month.php
mrbs/trunk/web/mrbs.css.php
mrbs/trunk/web/systemdefaults.inc.php
mrbs/trunk/web/week.php
Modified: mrbs/trunk/web/day.php
===================================================================
--- mrbs/trunk/web/day.php 2011-12-28 21:50:07 UTC (rev 2215)
+++ mrbs/trunk/web/day.php 2011-12-29 15:32:47 UTC (rev 2216)
@@ -20,22 +20,20 @@
// print the page header
print_header($day, $month, $year, $area, isset($room) ? $room : "");
-?>
-<div class="screenonly">
- <div id="dwm_header">
-
-<?php
+echo "<div id=\"dwm_header\" class=\"screenonly\">\n";
+
// Show all available areas
echo make_area_select_html('day.php', $area, $year, $month, $day);
// Draw the three month calendars
-minicals($year, $month, $day, $area, $room, 'day');
-echo "</div>";
+if (!$display_calendar_bottom)
+{
+ minicals($year, $month, $day, $area, $room, 'day');
+}
-?>
-</div>
-<?php
+echo "</div>\n";
+
//y? are year, month and day of yesterday
//t? are year, month and day of tomorrow
@@ -122,6 +120,11 @@
echo $before_after_links_html;
show_colour_key();
+ // Draw the three month calendars
+ if ($display_calendar_bottom)
+ {
+ minicals($year, $month, $day, $area, $room, 'day');
+ }
}
require_once "trailer.inc";
Modified: mrbs/trunk/web/mincals.inc
===================================================================
--- mrbs/trunk/web/mincals.inc 2011-12-28 21:50:07 UTC (rev 2215)
+++ mrbs/trunk/web/mincals.inc 2011-12-29 15:32:47 UTC (rev 2216)
@@ -323,7 +323,7 @@
$thismonth = mktime(12, 0, 0, $month, $day, $year);
$nextmonth = mktime(12, 0, 0, $month+1, 1, $year);
-echo "<div id=\"cals\">\n";
+echo "<div id=\"cals\" class=\"screenonly\">\n";
echo "<div id=\"cal_last\">\n";
$cal = new Calendar(date("d",$lastmonth), date("m",$lastmonth),
date("Y",$lastmonth), 0, $area, $room, $dmy);
Modified: mrbs/trunk/web/month.php
===================================================================
--- mrbs/trunk/web/month.php 2011-12-28 21:50:07 UTC (rev 2215)
+++ mrbs/trunk/web/month.php 2011-12-29 15:32:47 UTC (rev 2216)
@@ -78,10 +78,7 @@
}
// Section with areas, rooms, minicals.
-?>
-<div class="screenonly">
- <div id="dwm_header">
-<?php
+echo "<div id=\"dwm_header\" class=\"screenonly\">\n";
// Get the area and room names (we will need them later for the heading)
$this_area_name = "";
@@ -98,12 +95,14 @@
echo make_room_select_html('month.php', $area, $room, $year, $month, $day);
// Draw the three month calendars
-minicals($year, $month, $day, $area, $room, 'month');
-echo "</div>\n";
+if (!$display_calendar_bottom)
+{
+ minicals($year, $month, $day, $area, $room, 'month');
+}
-// End of "screenonly" div
echo "</div>\n";
+
// Don't continue if this room is invalid, which could be because the area
// has no rooms, or else the room or area has been disabled
if ($room_invalid)
@@ -526,5 +525,11 @@
print $before_after_links_html;
show_colour_key();
+// Draw the three month calendars
+if ($display_calendar_bottom)
+{
+ minicals($year, $month, $day, $area, $room, 'month');
+}
+
require_once "trailer.inc";
?>
Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2011-12-28 21:50:07 UTC (rev 2215)
+++ mrbs/trunk/web/mrbs.css.php 2011-12-29 15:32:47 UTC (rev 2216)
@@ -695,7 +695,7 @@
#banner a:hover {color: <?php echo $anchor_hover_color_banner ?>;
text-decoration:underline; font-weight: normal}
#banner input.date {width: 6.5em; text-align: center}
-table#colour_key {clear: both; border-spacing: 0; border-collapse: collapse}
+table#colour_key {clear: both; float: left; border-spacing: 0;
border-collapse: collapse; margin-bottom: 0.5em}
#colour_key td {width: 7.0em; padding: 2px; font-weight: bold;
color: <?php echo $colour_key_font_color ?>;
border: <?php echo $main_table_cell_border_width ?>px solid <?php echo
$main_table_body_h_border_color ?>}
@@ -783,7 +783,7 @@
div#trailer {border-top: 1px solid <?php echo $trailer_border_color ?>;
border-bottom: 1px solid <?php echo $trailer_border_color ?>;
float: left;
- margin-top: 1.5em; margin-bottom: 1.5em;
+ margin-top: 1.0em; margin-bottom: 1.5em;
padding-top: 0.3em; padding-bottom: 0.3em}
#trailer div {float: left; width: 100%}
#trailer div.trailer_label {float: left; clear: left; width: 20%; max-width:
9.0em; font-weight: bold}
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2011-12-28 21:50:07 UTC (rev
2215)
+++ mrbs/trunk/web/systemdefaults.inc.php 2011-12-29 15:32:47 UTC (rev
2216)
@@ -341,6 +341,10 @@
// well as the top in the day and week views, set to TRUE;
$column_labels_both_ends = FALSE;
+// To display the mini caldandars at the bottom of the day week and month views
+// set this value to TRUE
+$display_calendar_bottom = FALSE;
+
// Define default starting view (month, week or day)
// Default is day
$default_view = "day";
Modified: mrbs/trunk/web/week.php
===================================================================
--- mrbs/trunk/web/week.php 2011-12-28 21:50:07 UTC (rev 2215)
+++ mrbs/trunk/web/week.php 2011-12-29 15:32:47 UTC (rev 2216)
@@ -18,10 +18,7 @@
// Section with areas, rooms, minicals.
-?>
-<div class="screenonly">
- <div id="dwm_header">
-<?php
+echo "<div id=\"dwm_header\" class=\"screenonly\">\n";
// Get the area and room names (we will need them later for the heading)
$this_area_name = "";
@@ -38,10 +35,11 @@
echo make_room_select_html('week.php', $area, $room, $year, $month, $day);
// Draw the three month calendars
-minicals($year, $month, $day, $area, $room, 'week');
-echo "</div>\n";
+if (!$display_calendar_bottom)
+{
+ minicals($year, $month, $day, $area, $room, 'week');
+}
-// End of "screenonly" div
echo "</div>\n";
// Don't continue if this room is invalid, which could be because the area
@@ -103,6 +101,11 @@
print $before_after_links_html;
show_colour_key();
+// Draw the three month calendars
+if ($display_calendar_bottom)
+{
+ minicals($year, $month, $day, $area, $room, 'week');
+}
require_once "trailer.inc";
?>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits