Index: openacs-4/packages/calendar/tcl/calendar-display-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/Attic/calendar-display-procs.tcl,v
diff -u -r1.19 -r1.20
--- openacs-4/packages/calendar/tcl/calendar-display-procs.tcl 28 Apr 2002 20:22:35 -0000 1.19
+++ openacs-4/packages/calendar/tcl/calendar-display-procs.tcl 10 May 2002 20:21:02 -0000 1.20
@@ -86,6 +86,7 @@
{-url_stub_callback ""}
{-prev_week_template ""}
{-next_week_template ""}
+ {-show_calendar_name_p 1}
} {
Creates a week widget
@@ -132,8 +133,12 @@
set time_details "$pretty_start_date - $pretty_end_date:"
}
- set item "$time_details $item_details ($calendar_name)
"
+ set item "$time_details $item_details"
+ if {$show_calendar_name_p} {
+ append item "($calendar_name)
"
+ }
+
if { [string length $status_summary] > 0 } {
append item " $status_summary "
}
@@ -166,6 +171,7 @@
{-start_hour 0}
{-end_hour 23}
{-url_stub_callback ""}
+ {-show_calendar_name_p 1}
} {
Creates a day widget
@@ -204,21 +210,36 @@
}
db_foreach select_day_items {} {
- if {[empty_string_p $item_type]} {
- set item_details "$calendar_name"
- } else {
- set item_details "$calendar_name - $item_type"
+ set item_details ""
+
+ if {$show_calendar_name_p} {
+ append item_details $calendar_name
}
+ if {![empty_string_p $item_type]} {
+ if {![empty_string_p $item_details]} {
+ append item_details " - "
+ }
+
+ append item_details "$item_type"
+ }
+
set item $name
set item_subst [subst $item_template]
if {[dt_no_time_p -start_time $pretty_start_date -end_time $pretty_end_date]} {
# Hack for no-time items
- set item "$item_subst ($item_details)"
+ set item "$item_subst"
+ if {![empty_string_p $item_details]} {
+ append item " ($item_details)"
+ }
+
set ns_set_pos "X"
} else {
- set item "$pretty_start_date - $pretty_end_date: $item_subst ($item_details)"
+ set item "$pretty_start_date - $pretty_end_date: $item_subst"
+ if {![empty_string_p $item_details]} {
+ append item " ($item_details)"
+ }
set ns_set_pos $start_hour
}
@@ -251,6 +272,7 @@
{-calendar_id_list ""}
{-item_template {$item}}
{-url_stub_callback ""}
+ {-show_calendar_name_p 1}
} {
Creates a list widget
} {
@@ -282,7 +304,12 @@
db_foreach select_day_items {} {
# ns_log Notice "bma: one item"
- set item "$pretty_start_date - $pretty_end_date: $name ($calendar_name)"
+ set item "$pretty_start_date - $pretty_end_date: $name"
+
+ if {$show_calendar_name_p} {
+ append item " ($calendar_name)"
+ }
+
set item [subst $item_template]
ns_set put $items $start_hour $item