Index: openacs-4/packages/lars-blogger/www/calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/calendar.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/calendar.tcl 16 Sep 2002 15:04:27 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/calendar.tcl 28 Aug 2003 09:41:55 -0000 1.4 @@ -19,18 +19,42 @@ set package_id [ad_conn package_id] -db_foreach entry_dates { * SQL * } { - ns_set put $calendar_details $entry_date_julian "1" +if {[empty_string_p $screen_name]} { + db_foreach all_entry_dates { * SQL * } { + ns_set put $calendar_details $entry_date_julian "1" + } +} else { + db_foreach entry_dates { * SQL * } { + ns_set put $calendar_details $entry_date_julian "1" + } } +if {[empty_string_p $screen_name]} { + + set day_number_template "\[ad_decode \[ns_set get \$calendar_details \$julian_date\] 1 \"\$day_number\" \$day_number\]" + +} else { + + set day_number_template "\[ad_decode \[ns_set get \$calendar_details \$julian_date\] 1 \"\$day_number\" \$day_number\]" + +} + set widget [dt_widget_month_small \ -date $date \ -calendar_details $calendar_details \ - -day_number_template "\[ad_decode \[ns_set get \$calendar_details \$julian_date\] 1 \"\$day_number\" \$day_number\]"] + -day_number_template $day_number_template] -set prev_month_url "${package_url}archive/[clock format [clock scan $prev_month] -format %Y/%m]/" -set next_month_url "${package_url}archive/[clock format [clock scan $next_month] -format %Y/%m]/" +if {[empty_string_p $screen_name]} { + set prev_month_url "${package_url}archive/[clock format [clock scan $prev_month] -format %Y/%m]/" + set next_month_url "${package_url}archive/[clock format [clock scan $next_month] -format %Y/%m]/" + +} else { + + set prev_month_url "${package_url}user/$screen_name/archive/[clock format [clock scan $prev_month] -format %Y/%m]/" + set next_month_url "${package_url}user/$screen_name/archive/[clock format [clock scan $next_month] -format %Y/%m]/" + +} # Add year to the link append next_month_name " [string range $next_month 0 3]" append prev_month_name " [string range $prev_month 0 3]"