Revision: 1168
http://mrbs.svn.sourceforge.net/mrbs/?rev=1168&view=rev
Author: jberanek
Date: 2009-08-01 21:05:58 +0000 (Sat, 01 Aug 2009)
Log Message:
-----------
* Implemented new config variable, $mincals_week_numbers. If this is
set to true, week numbers will be shown in the mini-calendars. The
numbers will only be accurate if you set $weekstarts to 1.
Modified Paths:
--------------
mrbs/trunk/web/mincals.inc
mrbs/trunk/web/mrbs.css.php
mrbs/trunk/web/systemdefaults.inc.php
Modified: mrbs/trunk/web/mincals.inc
===================================================================
--- mrbs/trunk/web/mincals.inc 2009-07-22 13:30:39 UTC (rev 1167)
+++ mrbs/trunk/web/mincals.inc 2009-08-01 21:05:58 UTC (rev 1168)
@@ -118,6 +118,7 @@
global $day;
global $month;
global $year;
+ global $mincals_week_numbers;
if (!isset($weekstarts)) $weekstarts = 0;
$s = "";
@@ -164,11 +165,20 @@
$s .= "<thead>\n";
// prints month name and year
+ $cols = 7;
+ if ($mincals_week_numbers)
+ {
+ $cols++;
+ }
$s .= "<tr>\n";
- $s .= "<th colspan=\"7\">$monthName $this->year</th>\n";
+ $s .= "<th colspan=\"$cols\">$monthName $this->year</th>\n";
$s .= "</tr>\n";
$s .= "<tr>\n";
+ if ($mincals_week_numbers)
+ {
+ $s .= "<th></th>\n";
+ }
// gets days of week
$s .= $this->getFirstDays();
$s .= "</tr>\n";
@@ -182,6 +192,10 @@
{
$s .= "<tr>\n";
+ if ($mincals_week_numbers)
+ {
+ $s .= "<td valign=\"middle\"
class=\"mincals_week_number\">".date("W",gmmktime (12, 0, 0, $this->month, $d,
$this->year))."</td>\n";
+ }
for ($i = 0; $i < 7; $i++)
{
$hide_this_day = is_hidden_day(($i + $weekstarts) % 7);
Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2009-07-22 13:30:39 UTC (rev 1167)
+++ mrbs/trunk/web/mrbs.css.php 2009-08-01 21:05:58 UTC (rev 1168)
@@ -642,8 +642,8 @@
.calendar td.hidden {background-color: <?php echo $calendar_hidden_color ?>;
font-weight: bold}
.calendar a.current {font-weight: bold; color: <?php echo
$highlight_font_color ?>}
td#sticky_day {border: 1px dotted <?php echo $highlight_font_color ?>}
+td.mincals_week_number { opacity: 0.5; font-size: 60%; }
-
/* ------------ REPORT.PHP ----------------------*/
.div_report h2, #div_summary h1 {border-top: 2px solid <?php echo
$report_h2_border_color ?>;
padding-top: 0.5em; margin-top: 2.0em}
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2009-07-22 13:30:39 UTC (rev
1167)
+++ mrbs/trunk/web/systemdefaults.inc.php 2009-08-01 21:05:58 UTC (rev
1168)
@@ -283,6 +283,11 @@
// 'first day of the week' (13 Oct), set this to TRUE
$view_week_number = FALSE;
+// To display week numbers in the mini-calendars, set this to true. The week
+// numbers are only accurate if you set $weekstarts to 1, i.e. set the
+// start of the week to Monday
+$mincals_week_numbers = FALSE;
+
// To display times on the x-axis (along the top) and rooms or days on the
y-axis (down the side)
// set to TRUE; the default/traditional version of MRBS has rooms (or days)
along the top and
// times along the side. Transposing the table can be useful if you have a
large number of
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits