Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 15 May 2007 20:14:14 -0000 1.23 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 9 Nov 2008 23:29:22 -0000 1.24 @@ -19,7 +19,7 @@ -header_bgcolor "black" -header_text_color "white" -header_text_size "+2" - -day_number_template {$day_number} + -day_number_template {$day_number} -day_header_size 2 -day_header_bgcolor "#666666" -calendar_width "100%" @@ -75,42 +75,46 @@ # in the title bar if { $prev_next_links_in_title == 0 } { - set title " - - $month_heading - \n" + set title [subst { + + + $month_heading + + \n}] } else { - set title " - - - - - - - -
$prev_month_url - $month_heading - $next_month_url
- \n" + set title [subst { + + + + + + + +
$prev_month_url + + $month_heading + + $next_month_url
+ \n}] } # Write out the header and the days of the week - append output " - - $title - \n" + append output [subst { +
+ $title + \n}] foreach day_of_week $days_of_week { - append output " - \n" + append output [subst { + \n}] } - append output "\n" + append output "\n" set day_of_week 1 set julian_date $first_julian_date @@ -140,68 +144,68 @@ set day_number 1 } - if { $day_of_week == 1} { - append output "\n" - } + if { $day_of_week == 1} { + append output "\n" + } - set skip_day 0 + set skip_day 0 - if {$before_month_p || $after_month_p} { - append output "\n" + append output "\n" - incr day_of_week - incr julian_date + incr day_of_week + incr julian_date incr day_number - if { $day_of_week > 7 } { - set day_of_week 1 - append output "\n" - } + if { $day_of_week > 7 } { + set day_of_week 1 + append output "\n" + } } # There are two ways to display previous and next month link - # this is the default if { $prev_next_links_in_title == 0 } { - append output " - - - \n" + append output [subst { + + + \n}] } return [concat $output "
- - $day_of_week - - + + $day_of_week + +
 " - if { $fill_all_days == 0 } { - set skip_day 1 - } else { - append output "[subst $day_number_template] " - } - } else { + if {$before_month_p || $after_month_p} { + append output " " + if { $fill_all_days == 0 } { + set skip_day 1 + } else { + append output "[subst $day_number_template] " + } + } else { if {$julian_date == $today_julian_date} { set the_bgcolor $today_bgcolor - set the_class "cal-month-today" + set the_class "cal-month-today" } else { set the_bgcolor $day_bgcolor - set the_class "cal-month-day" + set the_class "cal-month-day" } - append output "[subst $day_number_template] " - } + append output "[subst $day_number_template] " + } - if { (!$skip_day) && $large_calendar_p == 1 } { - append output "
" + if { (!$skip_day) && $large_calendar_p == 1 } { + append output "
" - set calendar_day_index [ns_set find $calendar_details $julian_date] - - while { $calendar_day_index >= 0 } { - set calendar_day [ns_set value $calendar_details $calendar_day_index] + set calendar_day_index [ns_set find $calendar_details $julian_date] + + while { $calendar_day_index >= 0 } { + set calendar_day [ns_set value $calendar_details $calendar_day_index] - ns_set delete $calendar_details $calendar_day_index + ns_set delete $calendar_details $calendar_day_index - append output "$calendar_day" + append output "$calendar_day" - set calendar_day_index [ns_set find $calendar_details $julian_date] - } - append output "
" - } + set calendar_day_index [ns_set find $calendar_details $julian_date] + } + append output "
" + } - append output "
$prev_month_url$next_month_url
$prev_month_url$next_month_url
\n"] @@ -217,7 +221,7 @@ -header_bgcolor "black" -header_text_color "white" -header_text_size "+1" - -day_number_template {$day_number} + -day_number_template {$day_number} -day_header_size 1 -day_header_bgcolor "#666666" -calendar_width 0 @@ -263,7 +267,7 @@ -header_bgcolor "black" -header_text_color "white" -header_text_size "+1" - -day_number_template {$day_number} + -day_number_template {$day_number} -day_header_size 1 -day_header_bgcolor "#666666" -calendar_width 0 @@ -315,7 +319,7 @@ -header_bgcolor "black" -header_text_color "white" -header_text_size "+1" - -day_number_template {$day_number} + -day_number_template {$day_number} -day_header_size 1 -day_header_bgcolor "#666666" -calendar_width 0 @@ -372,7 +376,7 @@ -header_bgcolor "black" -header_text_color "white" -header_text_size "+1" - -day_number_template {$day_number} + -day_number_template {$day_number} -day_header_size 1 -day_header_bgcolor "#666666" -calendar_width 0 @@ -451,13 +455,13 @@ if { $viewname == $view } { # current view append result " - $text + $text " } else { append result " - $text + $text " } @@ -589,7 +593,7 @@ } append results " - $curr_month" + $curr_month" # Output link to next month only if it's a legal month if {$next_month_legal_p != 0} { @@ -690,7 +694,7 @@ if {$i == $curr_month} { append output " - $month + $month \n" } else { set target_date [clock format \ @@ -699,7 +703,7 @@ append output " - $month + $month \n" } } @@ -724,12 +728,12 @@ for {set year [expr $curr_year - 2]} {$year <= $end_year} {incr year} { if {$year == $curr_year} { append output " - $year\n" + $year\n" } else { append output " - $year + $year \n" } } @@ -752,7 +756,7 @@ set days_of_week [list S M T W T F S] foreach day_of_week $days_of_week { - append output "$day_of_week\n" + append output "$day_of_week\n" } append output "
" @@ -791,18 +795,18 @@ append output " - $day_number + $day_number " } elseif {$julian_date == $julian_date_today} { append output " - $day_number + $day_number " } else { append output " - $day_number + $day_number " } @@ -833,21 +837,23 @@ + is [dt_ansi_to_pretty]
- " + " if { $view == "day" && [dt_sysdate] == $date } { - append output "Today" + append output "Today" } else { append output " - Today " + Today " } append output " - is [dt_ansi_to_pretty]

-
Date as YYYYMMDD +
+
Date as YYYYMMDD +
" foreach var $list_of_vars {