Index: openacs-4/packages/wp-slim/www/add-edit-presentation-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-presentation-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/www/add-edit-presentation-oracle.xql 21 Dec 2004 22:07:50 -0000 1.1 @@ -0,0 +1,121 @@ + + + oracle8.1.6 + + + select (case when owner = :user_id then name || ' (yours)' else name end) as name, style_id + from wp_styles + where owner = :user_id + or public_p = 't' + order by name + + + + + + begin + :1 := wp_presentation.new( + creation_user => :user_id, + creation_ip => :creation_ip, + creation_date => sysdate, + pres_title => :pres_title, + page_signature => :page_signature, + copyright_notice => :copyright_notice, + style => :style, + public_p => :public_p, + show_modified_p => :show_modified_p, + audience => :audience, + background => :background, + parent_id => :package_id, + package_id => :package_id + ); + end; + + + + + + begin + acs_permission.grant_permission(:pres_item_id,:user_id,'wp_admin_presentation'); + acs_permission.grant_permission(:pres_item_id,:user_id,'wp_view_presentation'); + acs_permission.grant_permission(:pres_item_id,:user_id,'wp_edit_presentation'); + acs_permission.grant_permission(:pres_item_id,:user_id,'wp_delete_presentation'); + end; + + + + + + begin + acs_permission.grant_permission(:pres_item_id,acs.magic_object_id('the_public'),'wp_view_presentation'); + end; + + + + + + begin + wp_presentation.new_revision( + creation_user => :user_id, + creation_ip => :creation_ip, + creation_date => sysdate, + pres_item_id => :pres_item_id, + pres_title => :pres_title, + page_signature => :page_signature, + copyright_notice => :copyright_notice, + public_p => :public_p, + show_modified_p => :show_modified_p, + style => :style, + audience => :audience, + background => :background + ); + end; + + + + + + begin + acs_permission.grant_permission(:pres_item_id,acs__magic_object_id('the_public'),'wp_view_presentation'); + end; + + + + + + begin + acs_permission.revoke_permission(:pres_item_id,acs__magic_object_id('the_public'),'wp_view_presentation'); + end; + + + + + + select p.pres_title, p.page_signature, p.copyright_notice, p.public_p, style, + p.show_modified_p from cr_wp_presentations p, cr_items i + where i.item_id = :pres_item_id + and i.live_revision = p.presentation_id + + + + + + select content as audience + from cr_revisions, cr_items + where cr_items.content_type = 'cr_wp_presentation_aud' + and cr_items.parent_id = :pres_item_id + and cr_revisions.revision_id = cr_items.live_revision + + + + + + select content as background + from cr_revisions r, cr_items i + where i.content_type = 'cr_wp_presentation_back' + and i.parent_id = :pres_item_id + and r.revision_id = i.live_revision + + + + Index: openacs-4/packages/wp-slim/www/add-edit-presentation-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-presentation-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/www/add-edit-presentation-postgresql.xql 21 Dec 2004 22:07:50 -0000 1.1 @@ -0,0 +1,114 @@ + + + postgresql7.1 + + + select (case when owner = :user_id then name || ' (yours)' else name end) as name, style_id + from wp_styles + where owner = :user_id + or public_p = 't' + order by name + + + + + + select wp_presentation__new( + now(), + :user_id, + :creation_ip, + :pres_title, + :page_signature, + :copyright_notice, + :style, + :public_p, + :show_modified_p, + :audience, + :background, + :package_id, + :package_id + ) from dual + + + + + + begin + perform acs_permission__grant_permission(:pres_item_id,:user_id,'wp_admin_presentation'); + perform acs_permission__grant_permission(:pres_item_id,:user_id,'wp_view_presentation'); + perform acs_permission__grant_permission(:pres_item_id,:user_id,'wp_edit_presentation'); + perform acs_permission__grant_permission(:pres_item_id,:user_id,'wp_delete_presentation'); + return 0; + end; + + + + + + select acs_permission__grant_permission(:pres_item_id,acs__magic_object_id('the_public'),'wp_view_presentation'); + + + + + + select wp_presentation__new_revision( + now(), + :user_id, + :creation_ip, + :pres_item_id, + :pres_title, + :page_signature, + :copyright_notice, + :style, + :public_p, + :show_modified_p, + :audience, + :background + ); + + + + + + select + acs_permission__grant_permission(:pres_item_id,acs__magic_object_id('the_public'),'wp_view_presentation'); + + + + + + select + acs_permission__revoke_permission(:pres_item_id,acs__magic_object_id('the_public'),'wp_view_presentation'); + + + + + + select p.pres_title, p.page_signature, p.copyright_notice, p.public_p, style, + p.show_modified_p from cr_wp_presentations p, cr_items i + where i.item_id = :pres_item_id + and i.live_revision = p.presentation_id + + + + + + select content as audience + from cr_revisions, cr_items + where cr_items.content_type = 'cr_wp_presentation_aud' + and cr_items.parent_id = :pres_item_id + and cr_revisions.revision_id = cr_items.live_revision + + + + + + select content as background + from cr_revisions r, cr_items i + where i.content_type = 'cr_wp_presentation_back' + and i.parent_id = :pres_item_id + and r.revision_id = i.live_revision + + + + Index: openacs-4/packages/wp-slim/www/add-edit-presentation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-presentation.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/www/add-edit-presentation.adp 21 Dec 2004 22:07:50 -0000 1.1 @@ -0,0 +1,4 @@ + +#wp-slim.Create_Presentation# +@context@ + Index: openacs-4/packages/wp-slim/www/add-edit-presentation.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-presentation.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/www/add-edit-presentation.tcl 21 Dec 2004 22:07:50 -0000 1.1 @@ -0,0 +1,123 @@ +# /packages/wimpy-point/www/add-edit-presentation.tcl +ad_page_contract { + # This file displays the form for creating a new presentation. + @author Paul Konigsberg (paul@arsdigita.com) + @creation-date Thu Nov 9 10:04:22 2000 + @cvs-id $Id: add-edit-presentation.tcl,v 1.1 2004/12/21 22:07:50 miguelm Exp $ +} { + pres_item_id:integer,optional +} -properties { + title:onevalue + context:onevalue +} + +set package_id [ad_conn package_id] +set user_id [ad_verify_and_get_user_id] +set creation_ip [ad_conn peeraddr] +set audience [_ wp-slim.Audience] +set background [_ wp-slim.Background] +set def "" + +permission::require_permission -party_id $user_id -object_id $package_id -privilege wp_create_presentation + +# Get the available styles + +set items [db_list_of_lists wp_styles { *SQL* }] +lappend items [list none -1] + +# Messages shown in help text + +set give_this_pre [_ wp-slim.lt_Give_this_presentatio] +set if_you [_ wp-slim.lt_If_you_want_a_signatu] +append if_you [_ wp-slim.lt_Personally_I_like_to_] +set copyright [_ wp-slim.lt_If_you_want_a_copyrig] +set WimpyPoint [_ wp-slim.lt_WimpyPoint_keeps_trac] +set hide [_ wp-slim.lt_If_you_want_to_hide_t] +append hide [_ wp-slim.lt_Suggestion_if_you_hav] +set finally [_ wp-slim.lt_Finally_if_youre_plan] + +ad_form -name add-edit-presentation -form { + pres_item_id:key + {pres_title:text(text) + {label "#wp-slim.Title#"} + {html { size 50 }} + {help_text "$give_this_pre"} + } + {page_signature:text(text),optional + {label "#wp-slim.Page_Signature#"} + {html { size 50 }} + {value $def} + {help_text "$if_you"} + } + {copyright_notice:text(text),optional + {label "#wp-slim.Copyright_Notice#"} + {html { size 50 }} + {value $def} + {help_text "$copyright"} + } + {show_modified_p:text(radio) + {label "#wp-slim.lt_Show_Modification_Dat#"} + {options { {#wp-slim.Yes# t} {#wp-slim.No# f}}} + {value t} + {help_text "$WimpyPoint"} + } + {public_p:text(radio) + {label "#wp-slim.Available_to_Public#"} + {options {{#wp-slim.Yes# t} {#wp-slim.No# f}}} + {value t} + {help_text "$hide"} + } + {style:text(select) + {label "#wp-slim.Style#"} + {options $items} + } + {audience:text(textarea),optional + {label "#wp-slim.Audience#"} + {html {rows 4 cols 50}} + } + {background:text(textarea),optional + {label "#wp-slim.Background#"} + {html {rows 4 cols 50 }} + {help_text "$finally"} + } +} -new_data { + set title "[_ wp-slim.Create_Presentation]" + set context [list $title] + set pres_item_id [db_exec_plsql wp_presentation_insert { *SQL* } ] + db_exec_plsql grant_owner_access { *SQL* } + if {$public_p == "t"} { + db_exec_plsql make_wp_presentation_public { *SQL* } + } +} -edit_data { + set title "[_ wp-slim.Edit_Presentation]" + set context [list [list "presentation-top?[export_url_vars pres_item_id]" "$pres_title"] "[_ wp-slim.Edit_Presentation]"] + db_exec_plsql update_wp_presentation { *SQL* } + if {$public_p == "t"} { + db_exec_plsql grant_public_read { *SQL* } + } else { + db_exec_plsql revoke_public_read { *SQL* } + } + +} -new_request { + set title "[_ wp-slim.Create_Presentation]" + set context [list $title] + +} -edit_request { + db_1row get_presentation_data { *SQL* } + db_1row get_aud_data { *SQL* } + db_1row get_back_data { *SQL* } + set page_signature [ad_quotehtml $page_signature] + set copyright_notice [ad_quotehtml $copyright_notice] + set audience [ad_quotehtml $audience] + set background [ad_quotehtml $background] + set title "[_ wp-slim.Edit_Presentation]" + set context [list [list "presentation-top?[export_url_vars pres_item_id]" "$pres_title"] "[_ wp-slim.Edit_Presentation]"] +} -after_submit { + ad_returnredirect "presentation-top?[export_url_vars pres_item_id]" + ad_script_abort +} + + + + + Index: openacs-4/packages/wp-slim/www/add-edit-slide-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-slide-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/www/add-edit-slide-oracle.xql 21 Dec 2004 22:07:50 -0000 1.1 @@ -0,0 +1,94 @@ + + + oracle8.1.6 + + + + select pres_title + from cr_wp_presentations p, cr_items i + where i.item_id = :pres_item_id + and i.live_revision = p.presentation_id + + + + + + select 1+max(sort_key) + from cr_wp_slides s, cr_items i, cr_revisions r + where i.parent_id = :pres_item_id + and s.slide_id = i.live_revision + + + + + + select wp_slide__get_bullet_items(:slide_item_id) as bullets_stored + from cr_wp_slides s, cr_items i + where i.item_id = :slide_item_id + and i.live_revision = s.slide_id + + + + + + begin + :1 := wp_slide.new( + pres_item_id => :pres_item_id, + creation_user => :user_id, + creation_ip => :creation_ip, + creation_date => sysdate, + slide_title => :slide_title, + original_slide_id => -100, + sort_key => :sort_key, + preamble => :preamble, + postamble => :postamble, + bullet_items => :bullet_list, + package_id => :package_id + ); + end; + + + + + + begin + wp_slide.new_revision ( + creation_user => :user_id, + creation_ip => :creation_ip, + creation_date => sysdate, + slide_item_id => :slide_item_id, + slide_title => :slide_title, + preamble => :preamble, + postamble => :postamble, + bullet_items => :bullet_items, + original_slide_id => :original_slide_id, + sort_key => :sort_key + ); + end; + + + + + + select s.slide_title, + s.sort_key, + s.original_slide_id, + wp_slide__get_preamble(:slide_item_id) as preamble, + wp_slide__get_postamble(:slide_item_id) as postamble, + wp_slide__get_bullet_items(:slide_item_id) as bullet_items + from cr_wp_slides s, cr_items i + where i.item_id = :slide_item_id + and i.live_revision = s.slide_id + + + + + + select s.sort_key + from cr_wp_slides s, cr_items i + where i.item_id = :slide_item_id + and i.live_revision = s.slide_id + + + + Index: openacs-4/packages/wp-slim/www/add-edit-slide-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-slide-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/www/add-edit-slide-postgresql.xql 21 Dec 2004 22:07:50 -0000 1.1 @@ -0,0 +1,97 @@ + + + postgresql7.1 + + + + select pres_title + from cr_wp_presentations p, cr_items i + where i.item_id = :pres_item_id + and i.live_revision = p.presentation_id + + + + + + select 1+max(sort_key) + from cr_wp_slides s, cr_items i, cr_revisions r + where i.parent_id = :pres_item_id + and s.slide_id = i.live_revision + + + + + + select wp_slide__get_bullet_items(:slide_item_id) as bullets_stored + from cr_wp_slides s, cr_items i + where i.item_id = :slide_item_id + and i.live_revision = s.slide_id + + + + + + select wp_slide__new( + :pres_item_id, + now(), + :user_id, + :creation_ip, + :slide_title, + '-1', + '-100', + :sort_key, + :preamble, + :bullet_list, + :postamble, + 't', + 'f', + NULL, + :package_id + ); + + + + + + select wp_slide__new_revision ( + now(), + :user_id, + :creation_ip, + :slide_item_id, + :slide_title, + :preamble, + :bullet_items, + :postamble, + '-1', + :osi, + :sort_key, + 't', + 'f' + ); + + + + + + select s.slide_title, + s.sort_key, + s.original_slide_id, + wp_slide__get_preamble(:slide_item_id) as preamble, + wp_slide__get_postamble(:slide_item_id) as postamble, + wp_slide__get_bullet_items(:slide_item_id) as bullet_items + from cr_wp_slides s, cr_items i + where i.item_id = :slide_item_id + and i.live_revision = s.slide_id + + + + + + select s.sort_key + from cr_wp_slides s, cr_items i + where i.item_id = :slide_item_id + and i.live_revision = s.slide_id + + + + Index: openacs-4/packages/wp-slim/www/add-edit-slide.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-slide.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/www/add-edit-slide.adp 21 Dec 2004 22:07:50 -0000 1.1 @@ -0,0 +1,16 @@ + +#wp-slim.Create_A_Slide# +@context@ + + + + Index: openacs-4/packages/wp-slim/www/add-edit-slide.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/add-edit-slide.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wp-slim/www/add-edit-slide.tcl 21 Dec 2004 22:07:50 -0000 1.1 @@ -0,0 +1,249 @@ +# /packages/wp/www/add-edit-slide.tcl +ad_page_contract { + + # This file presents the form for users to create a slide. + @author Paul Konigsberg (paul@arsdigita.com) + @creation-date Mon Nov 20 12:07:24 2000 + @cvs-id $Id: add-edit-slide.tcl,v 1.1 2004/12/21 22:07:50 miguelm Exp $ +} { + pres_item_id:naturalnum,notnull + {sort_key:naturalnum,optional ""} + slide_item_id:naturalnum,optional + {edit_slide:naturalnum,optional ""} + {edit_preamble:naturalnum,optional ""} +} -properties { + context + pres_item_id + sort_key + pres_title +} + +#################### +# Global variables # +#################### +set osi "" +set def "" +set bullet_num "" + + +set user_id [ad_verify_and_get_user_id] +set creation_ip [ad_conn peeraddr] +set package_id [ad_conn package_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + +############################## +# Get the presentation title # +############################## + +db_1row get_presentation { *SQL* } + +if {![empty_string_p $edit_slide]} { + db_1row get_bullets_stored { *SQL* } + append bullet_num [llength $bullets_stored] + db_1row get_slide_sort_key { *SQL* } +} else { + if {[empty_string_p $sort_key] } { + set sort_key [db_string get_sort_key { *SQL* }] + } +} +############################### +# Messages shown in help text # +############################### + +set optional_preamble [_ wp-slim.lt_optional_random_text_] +set you_can [_ wp-slim.lt_You_can_add_additiona] +set optional_postamble [_ wp-slim.lt_optional_random_text__1] + + +################################################################################ +# Since 2 htmlarea can't interact in the same page or at least I can't make it # +# there are two edits one for the preamble text and the other one fot the # +# postamble # +################################################################################ + + +if { $edit_preamble == ""} { + set edit_preamble 1 +} + +if { $edit_preamble == 1 } { + ad_form -name f -export {pres_item_id sort_key} -form { + slide_item_id:key + {slide_title:text(text) + {label "#wp-slim.Slide_Titlenbsp#"} + {html { size 50}} + } + {preamble:richtext(richtext),nospell,optional + {label "Preamble Text:"} + {html {rows 10 cols 70}} + {help_text "$optional_preamble" } + {value $def} + {section "#wp-slim.Preamble#"} + {htmlarea_p 1} + } + } +} else { + ad_form -name f -export {pres_item_id sort_key} -form { + slide_item_id:key + {slide_title:text(text) + {label "#wp-slim.Slide_Titlenbsp#"} + {html { size 50}} + } + {preamble:richtext(richtext),nospell,optional + {label "Preamble Text:"} + {html {rows 10 cols 70}} + {help_text "$optional_preamble" } + {value $def} + {section "#wp-slim.Preamble#"} + {htmlarea_p 0} + } + } + +} + + +############################################################################################### +# Generates the number of bullets, first there are 5 free bullets, then always 3 free bullets # +############################################################################################### + +if { $bullet_num <= 2} { + set array_max 5 +} else { + set array_max [expr $bullet_num + 3] +} + +################################################################################### +# Creates the bullets list dynamically. The list of list elements has the bullets # +################################################################################### + +set elements [list] +for {set j 1} {$j <= $array_max} {incr j} { + set element [list bullet.$j:text(text),optional \ + {html { size 60 }} \ + {value $def}] + if { $j == 1 } { + lappend element [list section "#wp-slim.Bullet_Items#"] + lappend element [list after_html " "] + } + if { $j == $array_max } { + set swap_num [expr $array_max - 1] + lappend element [list help_text "$you_can"] + lappend element [list after_html " "] + } + if { $j > 1 && $j < $array_max } { + set swap_num [expr $j - 1 ] + lappend element [list after_html " "] + } + lappend element [list label "Bullet $j:" ] + lappend elements [list $element] +} + + +############################### +# Add the bullets to the form # +############################### + +set i 0 +foreach item $elements { + ad_form -extend -name f -form [lindex $elements $i] + incr i +} + +############################ +# Add the end of the form # +############################ + +if { $edit_preamble == 1} { + ad_form -extend -name f -form { + {postamble:richtext(richtext),nospell,optional + {label "Postamble Text:"} + {html {rows 10 cols 70}} + {help_text "$optional_postamble" } + {value $def} + {section "#wp-slim.Postamble#"} + {htmlarea_p 0} + } + } +} else { + ad_form -extend -name f -form { + {postamble:richtext(richtext),nospell,optional + {label "Postamble Text:"} + {html {rows 10 cols 70}} + {help_text "$optional_postamble" } + {value $def} + {section "#wp-slim.Postamble#"} + {htmlarea_p 1} + } + } +} + +if { $edit_slide == 1} { + set context [list [list "presentation-top?[export_url_vars pres_item_id]" "$pres_title"] "[_ wp-slim.Edit_Slide]"] + ad_form -extend -name f -form { + {attach:text(radio) + {label "#wp-slim.Upload_Attachments#"} + {options {{#wp-slim.No# f} {#wp-slim.Yes# t}}} + {value f} + } + } +} else { + set context [list [list "presentation-top?[export_url_vars pres_item_id]" "$pres_title"] "[_ wp-slim.New_Slide]"] + ad_form -extend -name f -form { + {attach:text(hidden) + {value "f"} + } + } +} + +#################### +# FORM PROCESSING # +#################### + +ad_form -extend -name f -new_data { + + # makes a bullet list to send to the procedure + set bullet_list [list] + for {set i 1} {$i <= $array_max} {incr i} { + set bullet_value [set bullet.$i] + if { ![empty_string_p $bullet_value ] } { + lappend bullet_list [set bullet.$i] + } + } + + #insert the slide + db_exec_plsql wp_slide_insert { *SQL* } + if { $attach == "t"} { + set context [list [list "presentation-top?[export_url_vars pres_item_id]" "$pres_title"] [list "add-edit-slide?[export_url_vars slide_item_id pres_item_id edit_slide]" "[_ wp-slim.Edit_Slide]"] "$slide_title"] + ad_returnredirect attach-list?[export_url_vars pres_item_id slide_item_id] + } else { + ad_returnredirect presentation-top?[export_url_vars pres_item_id] + } +} -edit_data { + + # makes a bullet list to send to the procedure + set bullet_items [list] + for {set i 1} {$i <= $array_max} {incr i} { + set bullet_value [set bullet.$i] + if { ![empty_string_p $bullet_value ] } { + lappend bullet_items [set bullet.$i] + } + } + + # update the slide in the db + db_exec_plsql update_slide { *SQL* } + if { $attach == "t"} { + set context [list [list "presentation-top?[export_url_vars pres_item_id]" "$pres_title"] [list "add-edit-slide?[export_url_vars slide_item_id pres_item_id edit_slide]" "[_ wp-slim.Edit_Slide]"] "$slide_title"] + ad_returnredirect attach-list?[export_url_vars pres_item_id slide_item_id] + } else { + ad_returnredirect presentation-top?[export_url_vars pres_item_id] + } +} -edit_request { + + db_1row get_slide_info { *SQL* } + set index 1 + foreach item $bullet_items { + set bullet.$index $item + incr index + } + append osi $original_slide_id +} Index: openacs-4/packages/wp-slim/www/attach-detail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-detail.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/wp-slim/www/attach-detail.tcl 22 Sep 2003 18:41:27 -0000 1.6 +++ openacs-4/packages/wp-slim/www/attach-detail.tcl 21 Dec 2004 22:06:47 -0000 1.7 @@ -34,9 +34,9 @@ set user_id [ad_verify_and_get_user_id] permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation +set edit-slide 1 +set context [list [list "add-edit-slide?[export_url_vars slide_item_id pres_item_id edit-slide]" "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.Details]"] -set context [list [list "edit-slide?[export_url_vars slide_item_id pres_item_id]" "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.Details]"] - db_multirow revisions revisions_get { select r.revision_id, ao.creation_date as creation_date, Index: openacs-4/packages/wp-slim/www/attach-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-list.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/wp-slim/www/attach-list.adp 22 Sep 2003 18:41:27 -0000 1.6 +++ openacs-4/packages/wp-slim/www/attach-list.adp 21 Dec 2004 22:06:47 -0000 1.7 @@ -1,7 +1,6 @@ #wp-slim.List_of_Attachments# @context@ -
  • @att.name@ (#wp-slim.remove# | #wp-slim.details#) Index: openacs-4/packages/wp-slim/www/attach-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-list.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/attach-list.tcl 22 Sep 2003 18:41:27 -0000 1.5 +++ openacs-4/packages/wp-slim/www/attach-list.tcl 21 Dec 2004 22:06:47 -0000 1.6 @@ -28,9 +28,9 @@ where content_type = 'cr_wp_slide' and item_id = :slide_item_id }] +set edit_slide 1 +set context [list [list "presentation-top?[export_url_vars pres_item_id ]" "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.List_Attachments]"] -set context [list [list "edit-slide?[export_url_vars slide_item_id pres_item_id]" "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.List_Attachments]"] - db_multirow att attachments_get { select name, item_id from cr_items Index: openacs-4/packages/wp-slim/www/attach.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/wp-slim/www/attach.tcl 22 Sep 2003 18:41:27 -0000 1.9 +++ openacs-4/packages/wp-slim/www/attach.tcl 21 Dec 2004 22:06:47 -0000 1.10 @@ -68,4 +68,5 @@ ad_script_abort } -ad_returnredirect edit-slide?[export_url_vars slide_item_id pres_item_id] +set edit_slide 1 +ad_returnredirect add-edit-slide?[export_url_vars slide_item_id pres_item_id edit_slide] Index: openacs-4/packages/wp-slim/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/wp-slim/www/index.adp 9 Mar 2004 20:50:46 -0000 1.9 +++ openacs-4/packages/wp-slim/www/index.adp 21 Dec 2004 22:06:47 -0000 1.10 @@ -66,7 +66,7 @@

    #wp-slim.Options#

    Index: openacs-4/packages/wp-slim/www/presentation-print-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-print-view.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/presentation-print-view.adp 9 Mar 2004 21:05:57 -0000 1.5 +++ openacs-4/packages/wp-slim/www/presentation-print-view.adp 21 Dec 2004 22:06:47 -0000 1.6 @@ -20,7 +20,8 @@
    -

    @slides.preamble@ + <% set slides(preamble) [lindex $slides(preamble) 0] %> +

    @slides.preamble;noquote@

    @@ -73,7 +74,8 @@
    -

    @slides.postamble@ + <% set slides(postamble) [lindex $slides(postamble) 0] %> +

    @slides.postamble;noquote@

    Index: openacs-4/packages/wp-slim/www/presentation-top.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-top.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/wp-slim/www/presentation-top.adp 22 Sep 2003 18:41:27 -0000 1.7 +++ openacs-4/packages/wp-slim/www/presentation-top.adp 21 Dec 2004 22:06:47 -0000 1.8 @@ -4,7 +4,7 @@

    #wp-slim.The_Slides#

    - #wp-slim.lt_Create_the_first_slid# + #wp-slim.lt_Create_the_first_slid# @@ -13,21 +13,26 @@ - + - +
    @slides.sort_key@. @slides.slide_title@ -[ #wp-slim.edit# | + [ #wp-slim.Preamble# + + #wp-slim.edit# | + #wp-slim.Postamble# + + #wp-slim.edit# | #wp-slim.delete# | #wp-slim.attach# | #wp-slim.view_revisions#] #wp-slim.arrow# #wp-slim.Insert# #wp-slim.arrow# #wp-slim.Insert#
    #wp-slim.lt_Change_order_of_slide# #wp-slim.arrow# #wp-slim.Add# #wp-slim.arrow# #wp-slim.Add#
    @@ -37,7 +42,7 @@
    • #wp-slim.Show_presentation#
    • #wp-slim.lt_Printer_friendly_view# -
    • #wp-slim.lt_Edit_presentation_pro# +
    • #wp-slim.lt_Edit_presentation_pro#
    • #wp-slim.lt_Delete_this_presentat# Index: openacs-4/packages/wp-slim/www/serve-slide.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.adp,v diff -u -r1.12 -r1.13 --- openacs-4/packages/wp-slim/www/serve-slide.adp 9 Mar 2004 20:33:40 -0000 1.12 +++ openacs-4/packages/wp-slim/www/serve-slide.adp 21 Dec 2004 22:06:47 -0000 1.13 @@ -26,7 +26,7 @@
      -

      @preamble@ +

      @preamble;noquote@

      @@ -76,7 +76,7 @@
      -

      @postamble@ +

      @postamble;noquote@

      Index: openacs-4/packages/wp-slim/www/serve-slide.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/wp-slim/www/serve-slide.tcl 29 Sep 2003 02:41:33 -0000 1.8 +++ openacs-4/packages/wp-slim/www/serve-slide.tcl 21 Dec 2004 22:06:47 -0000 1.9 @@ -60,6 +60,10 @@ and ao.object_id = s.slide_id } +# to support htmlArea +set preamble [lindex $preamble 0] +set postamble [lindex $postamble 0] + set modified_date [lc_time_fmt $modified_date "%Q"] db_1row get_presentation_page_signature { *SQL* } @@ -115,9 +119,10 @@ and i.live_revision = x.attach_id } +set edit_slide 1 set extra "" if {$edit_p == 1} { - append extra "[_ wp-slim.edit] | " + append extra "[_ wp-slim.edit] | " } if {$delete_p == 1} { append extra "[_ wp-slim.delete] |" Index: openacs-4/packages/wp-slim/www/slide-revisions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-revisions.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/wp-slim/www/slide-revisions.adp 22 Sep 2003 18:41:27 -0000 1.6 +++ openacs-4/packages/wp-slim/www/slide-revisions.adp 21 Dec 2004 22:06:47 -0000 1.7 @@ -20,6 +20,6 @@ -

      #wp-slim.lt_Create_a_new_revision# +

      #wp-slim.lt_Create_a_new_revision# Index: openacs-4/packages/wp-slim/www/style-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-edit.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/style-edit.adp 29 Sep 2003 02:41:33 -0000 1.4 +++ openacs-4/packages/wp-slim/www/style-edit.adp 21 Dec 2004 22:06:47 -0000 1.5 @@ -2,9 +2,8 @@ #wp-slim.role_Style# @context@ - + Done

      -

      #wp-slim.Create_Style#

      @export_form_vars@ Index: openacs-4/packages/wp-slim/www/style-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-list.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/style-list.adp 22 Sep 2003 18:41:27 -0000 1.3 +++ openacs-4/packages/wp-slim/www/style-list.adp 21 Dec 2004 22:06:47 -0000 1.4 @@ -1,7 +1,7 @@ #wp-slim.Your_Styles# @context@ - + Done

      Index: openacs-4/packages/wp-slim/www/style-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-view.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/style-view.adp 21 Oct 2003 18:49:18 -0000 1.5 +++ openacs-4/packages/wp-slim/www/style-view.adp 21 Dec 2004 22:06:47 -0000 1.6 @@ -1,7 +1,7 @@ #wp-slim.One_Style# @context@ - +    Done @export_form_vars;noquote@