Index: openacs-4/packages/calendar/tcl/cal-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/cal-item-procs.tcl,v diff -u -r1.20.2.4 -r1.20.2.5 --- openacs-4/packages/calendar/tcl/cal-item-procs.tcl 25 Oct 2005 11:50:36 -0000 1.20.2.4 +++ openacs-4/packages/calendar/tcl/cal-item-procs.tcl 16 Aug 2006 17:20:32 -0000 1.20.2.5 @@ -90,8 +90,11 @@ } { upvar $array row + if { [catch { + set attachments_enabled_p [calendar::attachments_enabled_p] + }] } { set attachments_enabled_p 0 } - if {[calendar::attachments_enabled_p]} { + if { $attachments_enabled_p } { set query_name select_item_data_with_attachment } else { set query_name select_item_data Index: openacs-4/packages/calendar/tcl/calendar-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-sc-procs.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/calendar/tcl/calendar-sc-procs.tcl 1 Apr 2004 21:00:49 -0000 1.1 +++ openacs-4/packages/calendar/tcl/calendar-sc-procs.tcl 16 Aug 2006 17:20:32 -0000 1.1.2.1 @@ -36,7 +36,7 @@ content $content \ keywords {} \ storage_type text \ - mime_type text/plain ] + mime text/plain ] } ad_proc -private calendar::fts::url { cal_item_id } { @@ -56,12 +56,14 @@ } { db_transaction { calendar::sc::register_cal_item_fts_impl + calendar::sc::register_acs_event_fts_impl } } ad_proc -private calendar::sc::unregister_implementations {} { db_transaction { acs_sc::impl::delete -contract_name FtsContentProvider -impl_name cal_item + acs_sc::impl::delete -contract_name FtsContentProvider -impl_name acs_event } } @@ -78,3 +80,17 @@ acs_sc::impl::new_from_spec -spec $spec } + +ad_proc -private calendar::sc::register_acs_event_fts_impl {} { + set spec { + name "acs_event" + aliases { + datasource calendar::fts::datasource + url calendar::fts::url + } + contract_name FtsContentProvider + owner calendar + } + + acs_sc::impl::new_from_spec -spec $spec +} Index: openacs-4/packages/calendar/www/cal-item-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-new.tcl,v diff -u -r1.26.2.11 -r1.26.2.12 --- openacs-4/packages/calendar/www/cal-item-new.tcl 2 Aug 2006 10:40:49 -0000 1.26.2.11 +++ openacs-4/packages/calendar/www/cal-item-new.tcl 16 Aug 2006 17:20:33 -0000 1.26.2.12 @@ -173,7 +173,7 @@ set end_time "{} {} {} [expr $start_hour + 1] 0 {} {HH24:MI}" set time_p 1 } else { - set time_p 1 + set time_p 0 set start_hour $start_time set start_time "{} {} {} 0 0 {} {HH24:MI}" set end_time "{} {} {} 0 0 {} {HH24:MI}" Index: openacs-4/packages/calendar/www/cal-item-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-view.adp,v diff -u -r1.25 -r1.25.2.1 --- openacs-4/packages/calendar/www/cal-item-view.adp 13 Jan 2005 13:56:30 -0000 1.25 +++ openacs-4/packages/calendar/www/cal-item-view.adp 16 Aug 2006 17:20:33 -0000 1.25.2.1 @@ -9,99 +9,68 @@ - -
+ + + - + + - - + + - - + - - + - - - - - - - - + + + + - + - - - - - - - - - +
Calendar Event Details
- Calendar Event Details: - #calendar.Title#@cal_item.name@
#calendar.Title# - @cal_item.name@#calendar.Description#:@cal_item.description;noquote@
#calendar.Description#: - @cal_item.description;noquote@ + #calendar.Sharing#:@cal_item.calendar_name@
#calendar.Sharing#: - @cal_item.calendar_name@ + #calendar.Date_1# #calendar.and_Time#:@cal_item.pretty_short_start_date@ + , #calendar.from# @cal_item.start_time@ #calendar.to# @cal_item.end_time@
#calendar.Date_1# - - #calendar.and_Time# - - : - - @cal_item.pretty_short_start_date@ - , #calendar.from# @cal_item.start_time@ - #calendar.to# @cal_item.end_time@ -
- #calendar.Type# - - @cal_item.item_type@ -
#calendar.Type#@cal_item.item_type@
- #calendar.Attachments# - #calendar.Attachments# - + + @attachment_options;noquote@
-
#calendar.edit# #calendar.delete# - @attachment_options;noquote@ -

#calendar.sync_with_Outlook# +

#calendar.sync_with_Outlook# + (#calendar.all_events#)

- #calendar.all_events# - Sync all events with Outlook
Index: openacs-4/packages/calendar/www/cal-item-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-view.tcl,v diff -u -r1.15.2.2 -r1.15.2.3 --- openacs-4/packages/calendar/www/cal-item-view.tcl 10 Dec 2005 12:01:03 -0000 1.15.2.2 +++ openacs-4/packages/calendar/www/cal-item-view.tcl 16 Aug 2006 17:20:33 -0000 1.15.2.3 @@ -18,10 +18,13 @@ set write_p [permission::write_permission_p -object_id $cal_item_id -creation_user $cal_item(creation_user)] +if {[exists_and_not_null return_url]} { + set return_url [ad_urlencode $return_url] +} # Attachments? if {$cal_item(n_attachments) > 0} { - set item_attachments [attachments::get_attachments -object_id $cal_item(cal_item_id)] + set item_attachments [attachments::get_attachments -object_id $cal_item(cal_item_id) -return_url [ad_return_url]] } else { set item_attachments [list] } @@ -31,7 +34,7 @@ # Attachment URLs if {[calendar::attachments_enabled_p]} { - set attachment_options " | add attachment" + set attachment_options "\[add attachment\]" } else { set attachment_options {} } Index: openacs-4/packages/calendar/www/view-list-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-list-display.tcl,v diff -u -r1.25.2.1 -r1.25.2.2 --- openacs-4/packages/calendar/www/view-list-display.tcl 26 Sep 2005 08:44:57 -0000 1.25.2.1 +++ openacs-4/packages/calendar/www/view-list-display.tcl 16 Aug 2006 17:20:33 -0000 1.25.2.2 @@ -8,7 +8,10 @@ } if {[info exists portlet_mode_p] && $portlet_mode_p} { - set item_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=[ad_urlencode "../"]&action=edit&cal_item_id=\$item_id" + if {![info exists return_url]} { + set return_url [ad_urlencode "../"] + } + set item_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=${return_url}&action=edit&cal_item_id=\$item_id" set url_stub_callback "calendar_portlet_display::get_url_stub" set page_num_formvar [export_form_vars page_num] set page_num "&page_num=$page_num" Index: openacs-4/packages/calendar/www/view-month-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-month-display.adp,v diff -u -r1.13.6.4 -r1.13.6.5 --- openacs-4/packages/calendar/www/view-month-display.adp 5 Jul 2006 23:07:15 -0000 1.13.6.4 +++ openacs-4/packages/calendar/www/view-month-display.adp 16 Aug 2006 17:20:33 -0000 1.13.6.5 @@ -30,12 +30,17 @@ - onclick="javascript:location.href='@items.add_url@';"> + onclick="javascript:location.href='@items.day_url@';"> - onclick="javascript:location.href='@items.add_url@';"> + onclick="javascript:location.href='@items.day_url@';"> - @items.day_number@@items.day_number@ + + @items.day_number@ #calendar.Add_Item# + + + @items.day_number@ + Index: openacs-4/packages/calendar/www/view-month-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-month-display.tcl,v diff -u -r1.17.2.6 -r1.17.2.7 --- openacs-4/packages/calendar/www/view-month-display.tcl 11 Oct 2005 02:08:59 -0000 1.17.2.6 +++ openacs-4/packages/calendar/www/view-month-display.tcl 16 Aug 2006 17:20:33 -0000 1.17.2.7 @@ -38,7 +38,10 @@ if {[info exists portlet_mode_p] && $portlet_mode_p} { set page_num_urlvar "&page_num=$page_num" - set item_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=[ad_urlencode "../"]&action=edit&cal_item_id=\$item_id" + if {![info exists return_url]} { + set return_url [ad_urlencode "../"] + } + set item_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=${return_url}&action=edit&cal_item_id=\$item_id" set prev_month_template "?view=month&date=\[ad_urlencode \$prev_month\]&page_num=$page_num" set next_month_template "?view=month&date=\[ad_urlencode \$next_month\]&page_num=$page_num" set url_stub_callback "calendar_portlet_display::get_url_stub" Index: openacs-4/packages/calendar/www/view-one-day-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-one-day-display.tcl,v diff -u -r1.32.2.1 -r1.32.2.2 --- openacs-4/packages/calendar/www/view-one-day-display.tcl 19 Jun 2005 07:49:35 -0000 1.32.2.1 +++ openacs-4/packages/calendar/www/view-one-day-display.tcl 16 Aug 2006 17:20:33 -0000 1.32.2.2 @@ -8,15 +8,18 @@ } set current_date $date +if {![info exists return_url]} { + set return_url [ad_urlencode "../"] +} if {[info exists portlet_mode_p] && $portlet_mode_p} { - set item_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=[ad_urlencode "../"]&action=edit&cal_item_id=\$item_id" + set item_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=${return_url}&action=edit&cal_item_id=\$item_id" set url_stub_callback "calendar_portlet_display::get_url_stub" - set hour_template "calendar/cal-item-new?date=$current_date&start_time=\$day_current_hour" + set hour_template "calendar/cal-item-new?date=$current_date&start_time=\$day_current_hour&return_url=$return_url" } else { set item_template "cal-item-view?cal_item_id=\$item_id" set url_stub_callback "" - set hour_template {cal-item-new?date=$current_date&start_time=$day_current_hour} + set hour_template {cal-item-new?date=$current_date&start_time=$day_current_hour&return_url=$return_url} } if { ![info exists show_calendar_name_p] } { Index: openacs-4/packages/calendar/www/view-week-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-week-display.adp,v diff -u -r1.10.2.1 -r1.10.2.2 --- openacs-4/packages/calendar/www/view-week-display.adp 19 Jun 2005 07:49:35 -0000 1.10.2.1 +++ openacs-4/packages/calendar/www/view-week-display.adp 16 Aug 2006 17:20:33 -0000 1.10.2.2 @@ -19,7 +19,7 @@ #calendar.Add_Item# + src="/resources/acs-subsite/add.gif" alt="#calendar.Add_Item#"> @items.start_date@ Index: openacs-4/packages/calendar/www/view-week-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-week-display.tcl,v diff -u -r1.17 -r1.17.2.1 --- openacs-4/packages/calendar/www/view-week-display.tcl 17 May 2004 15:15:00 -0000 1.17 +++ openacs-4/packages/calendar/www/view-week-display.tcl 16 Aug 2006 17:20:33 -0000 1.17.2.1 @@ -8,7 +8,10 @@ } if {[info exists portlet_mode_p] && $portlet_mode_p} { - set item_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=[ad_urlencode "../"]&action=edit&cal_item_id=\$item_id" + if {![info exists return_url]} { + set return_url [ad_urlencode "../"] + } + set item_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=${return_url}&action=edit&cal_item_id=\$item_id" set url_stub_callback "calendar_portlet_display::get_url_stub" set page_num_formvar [export_form_vars page_num] set page_num_urlvar "&page_num=$page_num" @@ -105,7 +108,7 @@ "" \ "" \ "" \ - "${base_url}cal-item-new?date=${ansi_this_date}&start_time=&end_time=" \ + "${base_url}cal-item-new?date=${ansi_this_date}&start_time=&end_time=&return_url=$return_url" \ "?view=day&date=$ansi_this_date&page_num_urlvar" } @@ -138,7 +141,7 @@ $end_time \ $no_time_p \ "?view=day&date=$ansi_start_date&page_num_urlvar" \ - "${base_url}cal-item-new?date=${ansi_this_date}&start_time=&end_time=" + "${base_url}cal-item-new?date=${ansi_this_date}&start_time=&end_time=&return_url=$return_url" set current_weekday $day_of_week } @@ -157,7 +160,7 @@ "" \ "" \ "" \ - "${base_url}cal-item-new?date=${ansi_this_date}&start_time=&end_time=" \ + "${base_url}cal-item-new?date=${ansi_this_date}&start_time=&end_time=&return_url=$return_url" \ "?view=day&date=$ansi_this_date&page_num_urlvar" } } Index: openacs-4/packages/calendar/www/view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view.adp,v diff -u -r1.28 -r1.28.6.1 --- openacs-4/packages/calendar/www/view.adp 26 Feb 2004 12:43:23 -0000 1.28 +++ openacs-4/packages/calendar/www/view.adp 16 Aug 2006 17:20:33 -0000 1.28.6.1 @@ -12,7 +12,7 @@

- + #calendar.Add_Item##calendar.Add_Item#

@@ -32,25 +32,25 @@
- - - -
Index: openacs-4/packages/calendar/www/view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view.tcl,v diff -u -r1.22 -r1.22.2.1 --- openacs-4/packages/calendar/www/view.tcl 29 Jun 2004 10:17:52 -0000 1.22 +++ openacs-4/packages/calendar/www/view.tcl 16 Aug 2006 17:20:33 -0000 1.22.2.1 @@ -25,6 +25,9 @@ set package_id [ad_conn package_id] set user_id [ad_conn user_id] +# HAM : try to create a return url back here after creating a new item +set return_url [ad_urlencode [ad_return_url]] + set admin_p [permission::permission_p -object_id $package_id -privilege calendar_admin] set show_calendar_name_p [parameter::get -parameter Show_Calendar_Name_p -default 1] Index: openacs-4/packages/calendar/www/resources/calendar.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/resources/calendar.css,v diff -u -r1.7.2.3 -r1.7.2.4 --- openacs-4/packages/calendar/www/resources/calendar.css 4 Apr 2006 09:58:02 -0000 1.7.2.3 +++ openacs-4/packages/calendar/www/resources/calendar.css 16 Aug 2006 17:20:33 -0000 1.7.2.4 @@ -28,6 +28,7 @@ border-width: 0px 0px 1px 0px; border-style: solid; border-color: #dfe2e5; + vertical-align: top; } .cal-week {