Revision: 2217
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2217&view=rev
Author:   cimorrison
Date:     2011-12-29 17:14:25 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
Added support for displaying the week number in the month view if 
$view_week_number is set

Modified Paths:
--------------
    mrbs/trunk/web/month.php
    mrbs/trunk/web/mrbs.css.php
    mrbs/trunk/web/systemdefaults.inc.php

Modified: mrbs/trunk/web/month.php
===================================================================
--- mrbs/trunk/web/month.php    2011-12-29 15:32:47 UTC (rev 2216)
+++ mrbs/trunk/web/month.php    2011-12-29 17:14:25 UTC (rev 2217)
@@ -412,11 +412,19 @@
     echo "<div class=\"cell_container\">\n";
     
     echo "<div class=\"cell_header\">\n";
-    // first put in the day of the month
+    // If it's a Monday (the start of the ISO week), show the week number
+    if ($view_week_number && (($weekcol + $weekstarts)%7 == 1))
+    {
+      echo "<a class=\"week_number\" 
href=\"week.php?year=$year&amp;month=$month&amp;day=$cday&amp;area=$area&amp;room=$room\">";
+      echo date("W", gmmktime(12, 0, 0, $month, $cday, $year));
+      echo "</a>\n";
+    }
+    // then put in the day of the month
     echo "<a class=\"monthday\" 
href=\"day.php?year=$year&amp;month=$month&amp;day=$cday&amp;area=$area\">$cday</a>\n";
+
     echo "</div>\n";
+    
     // then the link to make a new booking
-    
     $query_string = 
"room=$room&amp;area=$area&amp;year=$year&amp;month=$month&amp;day=$cday";
     if ($enable_periods)
     {

Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2011-12-29 15:32:47 UTC (rev 2216)
+++ mrbs/trunk/web/mrbs.css.php 2011-12-29 17:14:25 UTC (rev 2217)
@@ -240,11 +240,13 @@
                                                                          /* 
also change the value of height in mrbs-ielte6.css */
 .month a.new_booking {position: absolute; top: 0; left: 0; z-index: 10}  /* 
needs to be above the base, but below the date (monthday) */
        
-div.cell_header {position: relative; width: 2.0em; z-index: 20;         /* 
needs to be above the new booking anchor */
+div.cell_header {position: relative; width: 100%; z-index: 20;         /* 
needs to be above the new booking anchor */
      min-height: 20%; height: 20%; max-height: 20%; overflow: hidden}
-                                                                               
   
-a.monthday {display: block; width: 100%; font-size: medium}             /* the 
date in the top left corner */
 
+#month_main div.cell_header a {display: block; width: auto; float: left}       
                                                                        
+#month_main div.cell_header a.monthday {font-size: medium}  /* the date in the 
top left corner */
+#month_main div.cell_header a.week_number {opacity: 0.5; padding: 2px 4px 0 
4px}
+
 div.booking_list {position: relative; z-index: 20;                      /* 
contains the list of bookings */
     max-height: 80%; font-size: x-small;                                /* 
needs to be above new_booking */
     overflow: <?php echo ($month_cell_scrolling ? 'auto' : 'visible') ?>}
@@ -783,6 +785,7 @@
 div#trailer {border-top: 1px solid <?php echo $trailer_border_color ?>; 
              border-bottom: 1px solid <?php echo $trailer_border_color ?>; 
              float: left;
+             clear: left;
              margin-top: 1.0em; margin-bottom: 1.5em;
              padding-top: 0.3em; padding-bottom: 0.3em}
 #trailer div {float: left; width: 100%}

Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php       2011-12-29 15:32:47 UTC (rev 
2216)
+++ mrbs/trunk/web/systemdefaults.inc.php       2011-12-29 17:14:25 UTC (rev 
2217)
@@ -318,7 +318,8 @@
 $monthly_view_entries_details = "both";
 
 // To view weeks in the bottom (trailer.inc) as week numbers (42) instead of
-// 'first day of the week' (13 Oct), set this to TRUE
+// 'first day of the week' (13 Oct), set this to TRUE.  Will also give week
+// numbers in the month view
 $view_week_number = FALSE;
 
 // To display week numbers in the mini-calendars, set this to true. The week

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

Reply via email to