Index: openacs-4/contrib/packages/bcms-ui-base/resources/file-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/file-form.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/bcms-ui-base/resources/file-form.tcl 9 Oct 2003 09:58:21 -0000 1.2 +++ openacs-4/contrib/packages/bcms-ui-base/resources/file-form.tcl 27 Oct 2003 10:17:21 -0000 1.3 @@ -1,77 +1,43 @@ -ad_page_contract { - a form to create or edit a file +# this file is meant to be included with the following parameters +# +# folder_id - if you are creating a new file +# revision_id - if you are editing a file revision +# return_url - requires a return_url, so after creating or editing a folder it redirect to this url +# form_mode - either "edit" or "display" - this file is meant to be included with the following parameters +bcms::ui::base::check_include_vars - folder_id - if you are creating a new file - file_id - if you are creating a new revision of a file - revision_id - if you are editing a file revision - return_url - requires a return_url, so after creating or editing a folder it redirect to this url - -} { - {file_name:optional ""} -} - -# check if the parameters exists and set them to their defaults -if {![info exists folder_id]} { - if {![info exists file_id] && ![info exists revision_id]} { - error "folder_id does not exists, please pass in the folder_id if you are creating a new file" - } - set folder_id "" -} -if {![info exists file_id]} { - if {![info exists folder_id] && ![info exists revision_id]} { - error "file_id does not exists, please pass in the file_id if you are creating a new revision" - } - set file_id "" -} - -# lets get an existing file with name $file_name -if {![string equal $file_name ""]} { - array set existing_file [bcms::item::get_item_by_url -root_id $folder_id -url $file_name] -} - -ad_form -name simpleform -html {enctype multipart/form-data} -form { +ad_form -name simpleform -mode $form_mode -html {enctype multipart/form-data} -form { revision_id:key -} -if {![string equal $folder_id ""] || [info exists revision_id]} { - ad_form -extend -name simpleform -form { - {file_name:text(text) {help_text {no spaces, no special characters}} {label "File Name"}} - } -validate { - {file_name - {([array size existing_file] == 0) || ([info exists file_id] && ($existing_file(item_id) == $file_id))} - "File Name already exists,
please use another File Name" - } - } -} - -ad_form -extend -name simpleform -form { - + {name:text(text) {help_text {no spaces, no special characters}} {label "File Name"}} {title:text(text) {label "Title"}} {description:text(textarea),optional {html {rows 5 cols 80}} {label "Description"}} {upload_file:file(file),optional {label "File"}} {folder_id:integer(hidden),optional {value $folder_id}} - {file_id:integer(hidden),optional {value $file_id}} + {item_id:integer(hidden),optional {value $item_id}} {return_url:text(hidden) {value $return_url}} } -validate { - # require file only we are uploading a new file, otherwise it ok to just edit the other fields {upload_file {!$__new_p || [exists_and_not_null upload_file]} + # require file only we are uploading a new file, otherwise it ok to just edit the other fields "File is required" } + {name + {![bcms::item::is_item_duplicate_p -url $name -root_id $folder_id -item_id $item_id]} + "File Name already exists,
please use another File Name" + } } -edit_request { array set one_revision [bcms::revision::get_revision -revision_id $revision_id] - set file_id $one_revision(item_id) - set file_name $one_revision(name) + set item_id $one_revision(item_id) + set name $one_revision(name) set title $one_revision(title) set content $one_revision(content) set description $one_revision(description) + set folder_id $one_revision(parent_id) - ad_set_form_values file_id file_name title content description - } -edit_data { if {[exists_and_not_null upload_file]} { @@ -81,27 +47,17 @@ bcms::revision::set_revision -revision_id $revision_id \ -title $title -description $description } - if {[info exists file_name]} { - bcms::item::set_item -item_id $file_id -name $file_name + if {[info exists name]} { + bcms::item::set_item -item_id $item_id -name $name # we have renamed the file, we need to redirect on the new name - set path [ns_set get [lindex [bcms::item::get_item_path -item_id $file_id -prepend_path [ad_conn package_url] -return_list -no_parent] 1] path] - ad_returnredirect $path + bcms::ui::base::redirect_after_rename -item_id $item_id } } -new_data { - if {![string equal $file_id ""]} { - # just create the revision the file is existing -# set revision_id [bcms::revision::add_revision -item_id $file_id \ -# -title $title -content $content -description $description \ -# -mime_type "text/html"] - } elseif {![string equal $folder_id ""] && ![string equal $file_name ""]} { - # if the file does not exists, create the file and revision - set file_id [bcms::upload_file -file_name $file_name -folder_id $folder_id \ - -title $title -description $description -upload_file $upload_file] - } else { - ns_log notice "bcms: file not created" - } + # create the file and revision + set item_id [bcms::upload_file -file_name $name -folder_id $folder_id \ + -title $title -description $description -upload_file $upload_file] } -after_submit { Index: openacs-4/contrib/packages/bcms-ui-base/resources/folder-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/folder-form.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/resources/folder-form.tcl 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/resources/folder-form.tcl 27 Oct 2003 10:17:21 -0000 1.2 @@ -1,16 +1,13 @@ -ad_page_contract { - a form to create or edit a folder +# a form to create or edit a folder +# +# this file is meant to be included with the following parameters +# +# folder_id - if you are editing a folder +# parent_id - if you are creating a folder +# create_index_p - if true will create a blank page named "index" on the new folder, defaults to true +# return_url - requires a return_url, so after creating or editing a folder it redirect to this url +# form_mode - either "edit" or "display" - this file is meant to be included with the following parameters - - folder_id - if you are editing a folder - parent_id - if you are creating a folder - create_index_p - if true will create a blank page named "index" on the new folder, defaults to true - return_url - requires a return_url, so after creating or editing a folder it redirect to this url - -} { -} - # initialize the vars that don't exist if {![info exists parent_id]} { if {![info exists folder_id]} { @@ -21,8 +18,11 @@ if {![info exists create_index_p]} { set create_index_p true } +if {![info exists form_mode]} { + set form_mode edit +} -ad_form -name simpleform -form { +ad_form -name simpleform -mode $form_mode -form { folder_id:key @@ -42,6 +42,11 @@ bcms::folder::set_folder -folder_id $folder_id -name $folder_name -label $folder_label + if {[info exists folder_name]} { + # we have renamed the folder, we need to redirect on the new name + bcms::ui::base::redirect_after_rename -item_id $folder_id + } + } -new_data { set creation_user_id [ad_conn user_id] Index: openacs-4/contrib/packages/bcms-ui-base/resources/form-template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/form-template.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/resources/form-template.adp 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/resources/form-template.adp 27 Oct 2003 10:17:21 -0000 1.2 @@ -43,6 +43,7 @@ + @@ -54,6 +55,10 @@ + + * + +
Index: openacs-4/contrib/packages/bcms-ui-base/resources/image-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/image-form.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/bcms-ui-base/resources/image-form.tcl 9 Oct 2003 09:58:21 -0000 1.3 +++ openacs-4/contrib/packages/bcms-ui-base/resources/image-form.tcl 27 Oct 2003 10:17:21 -0000 1.4 @@ -1,127 +1,86 @@ -ad_page_contract { - a form to create or edit a image +# this file is meant to be included with the following parameters - this image is meant to be included with the following parameters +# folder_id - if you are creating a new image +# revision_id - if you are editing a image revision +# return_url - requires a return_url, so after creating or editing a folder it redirect to this url - folder_id - if you are creating a new image - image_id - if you are creating a new revision of a image - revision_id - if you are editing a image revision - return_url - requires a return_url, so after creating or editing a folder it redirect to this url +bcms::ui::base::check_include_vars -} { - {image_name:optional ""} -} - -# check if the parameters exists and set them to their defaults -if {![info exists folder_id]} { - if {![info exists image_id] && ![info exists revision_id]} { - error "folder_id does not exists, please pass in the folder_id if you are creating a new image" - } - set folder_id "" -} -if {![info exists image_id]} { - if {![info exists folder_id] && ![info exists revision_id]} { - error "image_id does not exists, please pass in the image_id if you are creating a new revision" - } - set image_id "" -} - -# lets get an existing image with name $image_name -if {![string equal $image_name ""]} { - array set existing_image [bcms::item::get_item_by_url -root_id $folder_id -url $image_name] -} - -ad_form -name simpleform -html {enctype multipart/form-data} -form { +ad_form -name simpleform -mode $form_mode -html {enctype multipart/form-data} -form { revision_id:key -} -if {![string equal $folder_id ""] || [info exists revision_id]} { - ad_form -extend -name simpleform -form { - {image_name:text(text) {help_text {no spaces, no special characters}} {label "Image Name"}} - } -validate { - {image_name - {([array size existing_image] == 0) || ([info exists image_id] && ($existing_image(item_id) == $image_id))} - "Image Name already exists,
please use another Image Name" - } - } -} - -ad_form -extend -name simpleform -form { - + {name:text(text) {help_text {no spaces, no special characters}} {label "Image Name"}} {title:text(text) {label "Title"}} {description:text(textarea),optional {html {rows 5 cols 80}} {label "Description"}} {width:integer(text),optional {label "Width"}} {height:integer(text),optional {label "Height"}} - {upload_image:file(file),optional {label "Image"}} + {upload_file:file(file),optional {label "Image"}} {folder_id:integer(hidden),optional {value $folder_id}} - {image_id:integer(hidden),optional {value $image_id}} + {item_id:integer(hidden),optional {value $item_id}} {return_url:text(hidden) {value $return_url}} } -validate { - # require image only we are uploading a new image, otherwise it ok to just edit the other fields - {upload_image - {!$__new_p || [exists_and_not_null upload_image]} + {upload_file + {!$__new_p || [exists_and_not_null upload_file]} + # require file only we are uploading a new file, otherwise it ok to just edit the other fields "Image is required" } + {name + {![bcms::item::is_item_duplicate_p -url $name -root_id $folder_id -item_id $item_id]} + "Image Name already exists,
please use another Image Name" + } } -edit_request { array set one_revision [bcms::revision::get_revision -revision_id $revision_id -additional_properties {width height}] - set image_id $one_revision(item_id) - set image_name $one_revision(name) + set item_id $one_revision(item_id) + set name $one_revision(name) set title $one_revision(title) set content $one_revision(content) set description $one_revision(description) set width $one_revision(width) set height $one_revision(height) + set folder_id $one_revision(parent_id) - ad_set_form_values image_id image_name title content description width height - } -edit_data { - if {[exists_and_not_null upload_image]} { + if {[exists_and_not_null upload_file]} { bcms::revision::set_revision -revision_id $revision_id \ - -title $title -description $description -upload_file $upload_image + -title $title -description $description -upload_file $upload_file } else { bcms::revision::set_revision -revision_id $revision_id \ -title $title -description $description } - if {[info exists image_name]} { - bcms::item::set_item -item_id $image_id -name $image_name + + set additional_properties {} + if {[info exists width]} { + lappend additional_properties "width $width" + } + if {[info exists height]} { + lappend additional_properties "height $height" + } + + db_dml update_event "update images set [bcms::parse_properties -properties $additional_properties -return_format update] where image_id = :revision_id" + + if {[info exists name]} { + bcms::item::set_item -item_id $item_id -name $name # we have renamed the image, we need to redirect on the new name - set path [ns_set get [lindex [bcms::item::get_item_path -item_id $image_id -prepend_path [ad_conn package_url] -return_list -no_parent] 1] path] - ad_returnredirect $path + bcms::ui::base::redirect_after_rename -item_id $item_id } } -new_data { - if {![string equal $image_id ""]} { - # just create the revision the image is existing -# set revision_id [bcms::revision::add_revision -item_id $image_id \ -# -title $title -content $content -description $description \ -# -mime_type "text/html"] - } elseif {![string equal $folder_id ""] && ![string equal $image_name ""]} { - # if the image does not exists, create the image and revision + db_transaction { + set item_id [bcms::item::create_item -item_name $name -parent_id $folder_id -content_type image \ + -storage_type file] - if {![info exists creation_user_id]} { set creation_user_id [ad_conn user_id] } - if {![info exists creation_ip]} { set creation_ip [ad_conn peeraddr] } + set additional_properties {} + if {[exists_and_not_null width]} { lappend additional_properties "width $width" } + if {[exists_and_not_null height]} { lappend additional_properties "height $height" } + set revision_id [bcms::revision::upload_file_revision -item_id $item_id \ + -title $title -description $description \ + -upload_file $upload_file \ + -additional_properties $additional_properties] - db_transaction { - set file_id [bcms::item::create_item -item_name $image_name -parent_id $folder_id -content_type image \ - -storage_type file -creation_user_id $creation_user_id -creation_ip $creation_ip] - - set additional_properties {} - if {[exists_and_not_null width]} { lappend additional_properties "width $width" } - if {[exists_and_not_null height]} { lappend additional_properties "height $height" } - set revision_id [bcms::revision::upload_file_revision -item_id $file_id \ - -title $title -description $description \ - -upload_file $upload_image \ - -creation_user_id $creation_user_id -creation_ip $creation_ip -additional_properties $additional_properties] - - } - - - } else { - ns_log notice "bcms: image not created" } } -after_submit { Index: openacs-4/contrib/packages/bcms-ui-base/resources/page-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/page-form.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/bcms-ui-base/resources/page-form.tcl 4 Oct 2003 08:44:51 -0000 1.2 +++ openacs-4/contrib/packages/bcms-ui-base/resources/page-form.tcl 27 Oct 2003 10:17:21 -0000 1.3 @@ -1,97 +1,53 @@ -ad_page_contract { - a form to create or edit a page +# this file is meant to be included with the following parameters +# +# folder_id - if you are creating a new page +# revision_id - if you are editing a page revision +# return_url - requires a return_url, so after creating or editing a folder it redirect to this url +# form_mode - either "edit" or "display" - this file is meant to be included with the following parameters +bcms::ui::base::check_include_vars - folder_id - if you are creating a new page - page_id - if you are creating a new revision of a page - revision_id - if you are editing a page revision - return_url - requires a return_url, so after creating or editing a folder it redirect to this url - -} { - {page_name:optional ""} -} - -# check if the parameters exists and set them to their defaults -if {![info exists folder_id]} { - if {![info exists page_id] && ![info exists revision_id]} { - error "folder_id does not exists, please pass in the folder_id if you are creating a new page" - } - set folder_id "" -} -if {![info exists page_id]} { - if {![info exists folder_id] && ![info exists revision_id]} { - error "page_id does not exists, please pass in the page_id if you are creating a new revision" - } - set page_id "" -} - -# lets get an existing page with name $page_name -if {![string equal $page_name ""]} { - array set existing_page [bcms::item::get_item_by_url -root_id $folder_id -url $page_name] -} - -ad_form -name simpleform -form { +ad_form -name simpleform -mode $form_mode -form { revision_id:key -} -if {![string equal $folder_id ""] || [info exists revision_id]} { - ad_form -extend -name simpleform -form { - {page_name:text(text) {help_text {no spaces, no special characters}} {label "Page Name"}} - } -validate { - {page_name - {([array size existing_page] == 0) || ([info exists page_id] && ($existing_page(item_id) == $page_id))} - "Page Name already exists,
please use another Page Name" - } - } -} - -ad_form -extend -name simpleform -form { - + {name:text(text) {help_text {no spaces, no special characters}} {label "Page Name"}} {title:text(text) {label "Title"}} {description:text(textarea),optional {html {rows 5 cols 80}} {label "Description"}} - {content:text(textarea),optional {html {rows 20 cols 80}} {label "Body"}} + {content:text(textarea),optional {html {rows 20 cols 80}} {label "Page Content"}} {folder_id:integer(hidden),optional {value $folder_id}} - {page_id:integer(hidden),optional {value $page_id}} + {item_id:integer(hidden),optional {value $item_id}} {return_url:text(hidden) {value $return_url}} +} -validate { + {name + {![bcms::item::is_item_duplicate_p -url $name -root_id $folder_id -item_id $item_id]} + "Page Name already exists,
please use another Page Name" + } } -edit_request { array set one_revision [bcms::revision::get_revision -revision_id $revision_id] - set page_id $one_revision(item_id) - set page_name $one_revision(name) + set item_id $one_revision(item_id) + set name $one_revision(name) set title $one_revision(title) set content $one_revision(content) set description $one_revision(description) + set folder_id $one_revision(parent_id) - ad_set_form_values page_id page_name title content description - } -edit_data { bcms::revision::set_revision -revision_id $revision_id \ -title $title -content $content -description $description - if {[info exists page_name]} { - bcms::item::set_item -item_id $page_id -name $page_name + if {[info exists name]} { + bcms::item::set_item -item_id $item_id -name $name # we have renamed the page, we need to redirect on the new name - set path [ns_set get [lindex [bcms::item::get_item_path -item_id $page_id -prepend_path [ad_conn package_url] -return_list -no_parent] 1] path] - ad_returnredirect $path + bcms::ui::base::redirect_after_rename -item_id $item_id } } -new_data { - if {![string equal $page_id ""]} { - # just create the revision the page is existing - set revision_id [bcms::revision::add_revision -item_id $page_id \ - -title $title -content $content -description $description \ - -mime_type "text/html"] - } elseif {![string equal $folder_id ""] && ![string equal $page_name ""]} { - # if the page does not exists, create the page and revision - set page_id [bcms::create_page -page_name $page_name -folder_id $folder_id -mime_type "text/html" \ - -title $title -description $description -page_body $content] - } else { - ns_log notice "bcms: page not created" - } - + # create the page and revision + set item_id [bcms::create_page -page_name $name -folder_id $folder_id -mime_type "text/html" \ + -title $title -description $description -page_body $content] } -after_submit { ad_returnredirect $return_url Index: openacs-4/contrib/packages/bcms-ui-base/resources/search-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/search-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/bcms-ui-base/resources/search-postgresql.xql 5 Oct 2003 12:28:03 -0000 1.2 +++ openacs-4/contrib/packages/bcms-ui-base/resources/search-postgresql.xql 27 Oct 2003 10:17:21 -0000 1.3 @@ -15,7 +15,8 @@ i.live_revision, i.latest_revision, i.content_type, - to_char(ao.last_modified,'YYYY-MM-DD HH:MM AM') as last_modified + to_char(ao.last_modified,'YYYY-MM-DD HH:MM AM') as last_modified, + i.storage_type from cr_items i, acs_objects ao, (select tree_sortkey, item_id from cr_items where item_id = :root_folder_id) r $openfts_from where tree_ancestor_p(r.tree_sortkey, i.tree_sortkey) Index: openacs-4/contrib/packages/bcms-ui-base/resources/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/search.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/bcms-ui-base/resources/search.tcl 5 Oct 2003 12:28:03 -0000 1.3 +++ openacs-4/contrib/packages/bcms-ui-base/resources/search.tcl 27 Oct 2003 10:17:21 -0000 1.4 @@ -104,8 +104,25 @@ - + + + + + + + + + + + + + + + + + + } html { style "width:70px" } } Index: openacs-4/contrib/packages/bcms-ui-base/resources/template-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/template-form.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/resources/template-form.tcl 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/resources/template-form.tcl 27 Oct 2003 10:17:21 -0000 1.2 @@ -1,92 +1,69 @@ -ad_page_contract { - a form to create or edit a tempalte +# this file is meant to be included with the following parameters - this file is meant to be included with the following parameters +# folder_id - if you are creating a new template +# revision_id - if you are editing a template revision +# return_url - requires a return_url, so after creating or editing a folder it redirect to this url +# form_mode - either "edit" or "display" - folder_id - if you are creating a new template - template_id - if you are creating a new revision of a template - revision_id - if you are editing a template revision - return_url - requires a return_url, so after creating or editing a folder it redirect to this url +bcms::ui::base::check_include_vars -} { - {template_name:optional ""} +set cms_context [parameter::get -parameter cms_context -default ""] +if {[string equal $cms_context ""]} { + error "no cms context defined" } -# check if the parameters exists and set them to their defaults -if {![info exists folder_id]} { - if {![info exists template_id] && ![info exists revision_id]} { - error "folder_id does not exists, please pass in the folder_id if you are creating a new tempate" - } - set folder_id "" -} -if {![info exists template_id]} { - if {![info exists folder_id] && ![info exists revision_id]} { - error "template_id does not exists, please pass in the template_id if you are creating a new revision" - } - set template_id "" -} - -# lets get an existing template with name $template_name -if {![string equal $template_name ""]} { - array set existing_template [bcms::item::get_item_by_url -root_id $folder_id -url $template_name] -} - -ad_form -name simpleform -form { +ad_form -name simpleform -mode $form_mode -form { revision_id:key -} -if {![string equal $folder_id ""]} { - ad_form -extend -name simpleform -form { - {template_name:text(text) {label "Template Name"}} - } -validate { - {template_name - {([array size existing_template] == 0) || ([info exists template_id] && ($existing_template(item_id) == $template_id))} - "Template Name already exists,
please use another Template Name" - } - } -} - - -ad_form -extend -name simpleform -form { - + {name:text(text) {label "Template Name"}} {title:text(text) {label "Title"}} {description:text(textarea),optional {html {rows 5 cols 80}} {label "Description"}} {content:text(textarea),optional {html {rows 20 cols 80}} {label "Template Content"}} {folder_id:integer(hidden),optional {value $folder_id}} - {template_id:integer(hidden),optional {value $template_id}} + {item_id:integer(hidden),optional {value $item_id}} {return_url:text(hidden) {value $return_url}} +} -validate { + {name + {![bcms::item::is_item_duplicate_p -url $name -root_id $folder_id -item_id $item_id]} + "Template Name already exists,
please use another Template Name" + } } -edit_request { array set one_revision [bcms::revision::get_revision -revision_id $revision_id] - set template_id $one_revision(item_id) - set template_name $one_revision(name) + set item_id $one_revision(item_id) + set name $one_revision(name) set title $one_revision(title) - set content $one_revision(content) set description $one_revision(description) + set folder_id $one_revision(parent_id) - ad_set_form_values template_id template_name title content description + set template_filename "[acs_root_dir]/templates/${cms_context}/${name}.adp" + # read the file contents from the file system + if {[file exists $template_filename]} { + set content [template::util::read_file $template_filename] + } else { + set content $one_revision(content) + } } -edit_data { bcms::revision::set_revision -revision_id $revision_id \ -title $title -content $content -description $description + array set template [bcms::item::get_item -item_id $item_id] + + if {![empty_string_p $template(live_revision)]} { + set template_filename "[acs_root_dir]/templates/${cms_context}/${name}.adp" + template::util::write_file $template_filename $content + } + } -new_data { - if {![string equal $template_id ""]} { - # just create the revision the template is existing - set revision_id [bcms::template::add_template -template_id $template_id \ + # create the template and revision + db_transaction { + set item_id [bcms::template::create_template -template_name $name -parent_id $folder_id] + set revision_id [bcms::template::add_template -template_id $item_id \ -title $title -content $content -description $description] - } elseif {![string equal $folder_id ""] && ![string equal $template_name ""]} { - # if the template does not exists, create the template and revision - db_transaction { - set template_id [bcms::template::create_template -template_name $template_name -parent_id $folder_id] - set revision_id [bcms::template::add_template -template_id $template_id \ - -title $title -content $content -description $description] - } - } else { - ns_log notice "bcms: template not created" } } -after_submit { Index: openacs-4/contrib/packages/bcms-ui-base/tcl/bcms-ui-base-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/tcl/bcms-ui-base-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/bcms-ui-base/tcl/bcms-ui-base-procs.tcl 9 Oct 2003 09:58:21 -0000 1.3 +++ openacs-4/contrib/packages/bcms-ui-base/tcl/bcms-ui-base-procs.tcl 27 Oct 2003 10:17:21 -0000 1.4 @@ -106,3 +106,278 @@ } +ad_proc -public bcms::ui::base::switch_cms_context_url { + {-cms_context:required} + {-return_url} +} { + create a link to switch to a cms_context + + @param cms_context switch to which cms_context + @param return_url set where to redirect after switching cms_context + + @returns a url to on how to switch to a cms_context +} { + + set package_url [ad_conn package_url] + if {![info exists return_url]} { + set return_url [ad_return_url] + } + + return [export_vars -base ${package_url}manage/switch-context {{cms_context $cms_context} {return_url $return_url}}] + +} + +ad_proc -public bcms::ui::base::context_action_link { + {-context_action:required} + {-export_vars:required} + {-context_action_label} +} { + create a html a href for a particular context action + + @param context_action context action you would like to generate a link + @parem export_vars vars to put on the get query +} { + + set package_url [ad_conn package_url] + + set context_action_link " " + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Apply Template" + } + append context_action_link "" + } + folder-set-category { + append context_action_link " id=\"folder-set-category\" href=\"${package_url}manage/folder-set-category?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Use Categories" + } + append context_action_link "" + } + folder-add { + append context_action_link " id=\"folder-add\" href=\"${package_url}manage/folder-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add SubFolder" + } + append context_action_link "" + } + page-add { + append context_action_link " id=\"page-add\" href=\"${package_url}manage/page-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add Page" + } + append context_action_link "" + } + image-add { + append context_action_link " id=\"image-add\" href=\"${package_url}manage/image-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add Image" + } + append context_action_link "" + } + file-add { + append context_action_link " id=\"file-add\" href=\"${package_url}manage/file-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add File" + } + append context_action_link "" + } + sb-event-add { + append context_action_link " id=\"sb-event-add\" href=\"${package_url}manage/sb-event-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add Event & Gigs" + } + append context_action_link "" + } + sb-bio-add { + append context_action_link " id=\"sb-bio-add\" href=\"${package_url}manage/sb-bio-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add Biography" + } + append context_action_link "" + } + template-add { + append context_action_link " id=\"template-add\" href=\"${package_url}manage/template-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add Template" + } + append context_action_link "" + } + revision-publish { + append context_action_link " id=\"revision-publish\" href=\"${package_url}manage/revision-publish?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Publish" + } + append context_action_link "" + } + revision-unpublish { + append context_action_link " id=\"revision-unpublish\" href=\"${package_url}manage/revision-unpublish?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Unpublish" + } + append context_action_link "" + } + categorize-item { + append context_action_link " id=\"categorize-item\" href=\"${package_url}manage/categorize-item?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Categorize" + } + append context_action_link "" + } + revision-list { + append context_action_link " id=\"revision-list\" href=\"${package_url}manage/revision-list?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "View Version(s)" + } + append context_action_link "" + } + relate-page { + append context_action_link " id=\"relate-page\" href=\"${package_url}manage/relate-item?${export_vars}&[export_vars {{content_type_search content_revision} {relation_type pages}}]\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Relate Page" + } + append context_action_link "" + } + relate-image { + append context_action_link " id=\"relate-image\" href=\"${package_url}manage/relate-item?${export_vars}&[export_vars {{content_type_search image} {relation_type images}}]\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Relate Image" + } + append context_action_link "" + } + template-write { + append context_action_link " id=\"template-write\" href=\"${package_url}manage/template-write?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Write Template" + } + append context_action_link "" + } + sb-writing-add { + append context_action_link " id=\"sb-writing-add\" href=\"${package_url}manage/sb-writing-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add Writing" + } + append context_action_link "" + } + sb-download-add { + append context_action_link " id=\"sb-download-add\" href=\"${package_url}manage/sb-download-add?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Add Download" + } + append context_action_link "" + } + sb-band-set { + append context_action_link " id=\"sb-band-set\" href=\"${package_url}manage/sb-band-set?$export_vars\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Select Band" + } + append context_action_link "" + } + sb-featured-set { + append context_action_link " id=\"sb-featured-set\" href=\"${package_url}manage/sb-featured-set?$export_vars&[export_vars {{action set}}]\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Set Featured" + } + append context_action_link "" + } + sb-featured-unset { + append context_action_link " id=\"sb-featured-set\" href=\"${package_url}manage/sb-featured-set?$export_vars&[export_vars {{action unset}}]\">" + if {[info exists context_action_label]} { + append context_action_link $context_action_label + } else { + append context_action_link "Unset Featured" + } + append context_action_link "" + } + default { error "context_action = $context_action is not a valid value" } + + } + + return $context_action_link + +} + + +ad_proc -public bcms::ui::base::redirect_after_rename { + {-item_id:required} +} { + after renaming the url/name of an item. you will need to redirect to the new url/name + + @param item_id redirect to the url of this item +} { + set first_row [lindex [bcms::item::get_item_path -item_id $item_id -prepend_path [ad_conn package_url] -return_list -no_parent] 1] + if {[llength $first_row] > 0} { + set path [ns_set get $first_row path] + } else { + set path [ad_conn package_url] + } + ad_returnredirect $path + ad_script_abort +} + +ad_proc -public bcms::ui::base::check_include_vars { +} { + check item_id, folder_id, revision_id, form_mode and return_url vars. This is used for the forms that is included in /bcms-ui-base/resources +} { + upvar 1 item_id item_id folder_id folder_id revision_id revision_id form_mode form_mode return_url return_url + + # check if the parameters exists and set them to their defaults + if {![info exists folder_id]} { + if {![info exists revision_id]} { + error "folder_id does not exists, please pass in the folder_id if you are creating a new item" + } + set folder_id "" + set item_id "" + } else { + set item_id "" + } + if {![info exists form_mode]} { + set form_mode edit + } + if {![info exists return_url]} { + error "return_url does not exists, please pass in return_url" + } +} Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/category-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/category-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/category-view.tcl 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/category-view.tcl 27 Oct 2003 10:17:21 -0000 1.2 @@ -2,10 +2,15 @@ views a category and list the categories underneath it } - set package_url [ad_conn package_url] set current_url [ad_return_url -urlencode] +# check the permission if user has permission for the package +if {![permission::permission_p -object_id [ad_conn package_id] -privilege admin]} { + ad_return_forbidden "Serurity Violation" "You don't have permission to administer. This incident has been logged." + ad_script_abort +} + set root_url [ad_conn package_url] set extra_url [ad_conn extra_url] if [string equal $extra_url ""] { @@ -31,7 +36,6 @@ set context_action " Edit this Category - Delete this Category Add Category" set context_list [bcms::widget::category_context -category_id $category_id] Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.tcl 4 Oct 2003 08:46:40 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.tcl 27 Oct 2003 10:17:21 -0000 1.2 @@ -1,9 +1,9 @@ -# serve the correct template based from the manage type, -# its its in the content manage type, then return the template according to -# the content type +# serve the correct template based from the manage type, +# its its in the content manage type, then return the template according to +# the content type -# this page also set an array current_item if the manage type is -# content or template +# this page also set an array current_item if the manage type is +# content or template # check what are we managing: category, templates or contents @@ -45,6 +45,12 @@ ad_returnredirect "$current_url/" ad_script_abort } + + # check the permission if user has permission for the package + if {![permission::permission_p -object_id [ad_conn package_id] -privilege admin]} { + ad_return_forbidden "Serurity Violation" "You don't have permission to administer. This incident has been logged." + ad_script_abort + } # return the correct template of a particular content type if {[string equal "content_folder" $current_item(content_type)]} { @@ -59,6 +65,14 @@ ad_return_template template-view } elseif {[string equal "image" $current_item(content_type)]} { ad_return_template image-view + } elseif {[string equal "sb_event" $current_item(content_type)]} { + ad_return_template sb-event-view + } elseif {[string equal "sb_bio" $current_item(content_type)]} { + ad_return_template sb-bio-view + } elseif {[string equal "sb_writing" $current_item(content_type)]} { + ad_return_template sb-writing-view + } elseif {[string equal "sb_download" $current_item(content_type)]} { + ad_return_template sb-download-view } } else { Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.adp 4 Oct 2003 08:46:40 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.adp 27 Oct 2003 10:17:21 -0000 1.2 @@ -5,11 +5,11 @@ @context_help@ 1 +
+@title@ + +
-

File Name: @current_item.name@

-

Title: @file_revision.title@

-

Description: @file_revision.description@

- Download Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.tcl 4 Oct 2003 08:46:40 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.tcl 27 Oct 2003 10:17:21 -0000 1.2 @@ -3,27 +3,35 @@ } { {revision_id:optional,naturalnum $current_item(latest_revision)} {preview_p:optional 0} + {return_url:optional [ad_return_url]} } +set package_url [ad_conn package_url] + +# if we are previewing lets serve the file if {$preview_p} { cr_write_content -revision_id $revision_id ad_script_abort } array set file_revision [bcms::revision::get_revision -revision_id $revision_id] -set current_url [ad_return_url -urlencode] -set current_url_unencoded [ad_return_url] -set package_url [ad_conn package_url] - # we will only allow edits on the latest version, else you can only view them if {$revision_id == $file_revision(latest_revision)} { - set context_action " -Edit this File -Publish this File -Categorize this File -View Version(s)" + set context_action "" + if {[empty_string_p $current_item(live_revision)]} { + append context_action [bcms::ui::base::context_action_link -context_action revision-publish \ + -export_vars [export_vars {revision_id return_url}]] + } else { + append context_action [bcms::ui::base::context_action_link -context_action revision-unpublish \ + -export_vars [export_vars {{revision_id $current_item(live_revision)} return_url}]] + } + append context_action [bcms::ui::base::context_action_link -context_action categorize-item \ + -export_vars [export_vars {{item_id $current_item(item_id)} {folder_id $current_item(parent_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action revision-list \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] + set context_help "You can edit this file, etc." set title "View file" @@ -32,8 +40,8 @@ lappend context "$file_revision(title)" } else { - set context_action " -View Version(s)" + set context_action [bcms::ui::base::context_action_link -context_action revision-list \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] set context_help "This is a version of a file. You can only view this file" Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.adp 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.adp 27 Oct 2003 10:17:21 -0000 1.2 @@ -5,4 +5,12 @@ @context_help@ 1 +
+Folder Properties + +
+ +
+Folder Contents +
Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.tcl 9 Oct 2003 09:58:21 -0000 1.3 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.tcl 27 Oct 2003 10:17:21 -0000 1.4 @@ -1,20 +1,15 @@ ad_page_contract { - lists the items under a folder. we need to use different queries on templates and actions + lists the items under a folder. we need to use different queries on template and content manage_type } { {orderby:optional} {page:optional} + {return_url:optional [ad_return_url]} } +set package_url [ad_conn package_url] -set current_url [ad_return_url -urlencode] -set return_url [ad_return_url] - array set folder [bcms::folder::get_folder -folder_id $current_item(item_id)] -set package_url [ad_conn package_url] -set current_item_id $current_item(item_id) -set context_action [list] - set manage_type [ad_get_client_property -default content [ad_conn package_id] manage_type] # check to see if we are managing content or template, they differ in action and queries if {[string equal $manage_type "content"]} { @@ -30,10 +25,6 @@ -bulk_action_export_vars { return_url } \ - -actions [list \ - Edit "${package_url}manage/folder-edit?folder_id=$current_item_id&return_url=$current_url" "Edit this Folder" \ - "Use Categories" "${package_url}manage/folder-set-category?folder_id=$current_item_id&return_url=$current_url" "Categorize Contents on the Folder" \ - ]\ -elements { name { label "Name" @@ -59,6 +50,15 @@ + + + + + + + + + } html { style "width:70px" } } @@ -127,26 +127,37 @@ bcms::item::list_items -parent_id $current_item(item_id) -multirow_name item_list -additional_columns [list creation_user] -orderby [template::list::orderby_clause -name item_list] -show_only [template::list::page_get_ids -name item_list] - set context_action " - Edit this Folder - Template this Folder - Use Categories - Add a Folder - Add a Page - Add a File - Add an Image" + set context_action [bcms::ui::base::context_action_link -context_action apply-template \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action folder-set-category \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action folder-add \ + -export_vars [export_vars {{parent_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action page-add \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action image-add \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action file-add \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action sb-event-add \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action sb-bio-add \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action sb-writing-add \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action sb-download-add \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] set context_help "This is a content folder. You can see the contents of the folder on your right. You may click the actions that can be performed on this folder on your left." - set title "View Folder Contents" + set title "View Folder" } else { template::list::create \ -name item_list \ -multirow item_list \ - -pass_properties { package_url } \ -key template_id \ - -bulk_actions { + -bulk_actions [list \ "Delete" "${package_url}manage/template-delete" "Delete checked items" - } \ + ]\ -bulk_action_export_vars { return_url } \ @@ -158,7 +169,8 @@ } bcms::template::list_templates -parent_id $current_item(item_id) -multirow_name item_list - set context_action "Add a Template" + set context_action [bcms::ui::base::context_action_link -context_action template-add \ + -export_vars [export_vars {{folder_id $current_item(item_id)} return_url}]] set context_help "This is a template folder. You can see available templates on your right, you can add templates here" set title "View Templates" Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.adp 4 Oct 2003 08:46:40 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.adp 27 Oct 2003 10:17:21 -0000 1.2 @@ -5,11 +5,11 @@ @context_help@ 1 +
+@title@ + +
-

File Name: @current_item.name@

-

Title: @image_revision.title@

-

Description: @image_revision.description@

- Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.tcl 4 Oct 2003 08:46:40 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.tcl 27 Oct 2003 10:17:21 -0000 1.2 @@ -3,27 +3,33 @@ } { {revision_id:optional,naturalnum $current_item(latest_revision)} {preview_p:optional 0} + {return_url:optional [ad_return_url]} } +set package_url [ad_conn package_url] + +# if we are previewing lets serve the file if {$preview_p} { cr_write_content -revision_id $revision_id ad_script_abort } - array set image_revision [bcms::revision::get_revision -revision_id $revision_id] -set current_url [ad_return_url -urlencode] -set current_url_unencoded [ad_return_url] -set package_url [ad_conn package_url] - # we will only allow edits on the latest version, else you can only view them if {$revision_id == $image_revision(latest_revision)} { - set context_action " -Edit this Image -Publish this Image -Categorize this Image -View Version(s)" + set context_action "" + if {[empty_string_p $current_item(live_revision)]} { + append context_action [bcms::ui::base::context_action_link -context_action revision-publish \ + -export_vars [export_vars {revision_id return_url}]] + } else { + append context_action [bcms::ui::base::context_action_link -context_action revision-unpublish \ + -export_vars [export_vars {{revision_id $current_item(live_revision)} return_url}]] + } + append context_action [bcms::ui::base::context_action_link -context_action categorize-item \ + -export_vars [export_vars {{item_id $current_item(item_id)} {folder_id $current_item(parent_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action revision-list \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] set context_help "You can edit this image, etc." @@ -33,8 +39,8 @@ lappend context "$image_revision(title)" } else { - set context_action " -View Version(s)" + set context_action [bcms::ui::base::context_action_link -context_action revision-list \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] set context_help "This is a version of a image. You can only view this image" Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/master.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/master.adp 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/master.adp 27 Oct 2003 10:17:21 -0000 1.2 @@ -2,7 +2,7 @@ @title@ - + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.adp 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.adp 27 Oct 2003 10:17:21 -0000 1.2 @@ -5,10 +5,9 @@ @context_help@ 1 +
+@title@ + +
-

Page Name: @current_item.name@

-

Title: @page_revision.title@

-

Description: @page_revision.description@

-

Content:

@page_revision.content@

- Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.tcl 9 Oct 2003 09:58:21 -0000 1.4 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.tcl 27 Oct 2003 10:17:21 -0000 1.5 @@ -2,25 +2,34 @@ view a page revision, if no revision_id is passed then latest revision is used } { {revision_id:optional,naturalnum $current_item(latest_revision)} + {return_url:optional [ad_return_url]} } -array set page_revision [bcms::revision::get_revision -revision_id $revision_id] - -set return_url [ad_return_url] set package_url [ad_conn package_url] +array set page_revision [bcms::revision::get_revision -revision_id $revision_id] + # we will only allow edits on the latest version, else you can only view them if {$revision_id == $page_revision(latest_revision)} { - set context_action " -Edit this Page -Template this Page -Publish this Page -Unpublish this Page -Categorize this Page -View Version(s) -Relate Page -Relate Image" + set context_action [bcms::ui::base::context_action_link -context_action apply-template \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] + if {[empty_string_p $current_item(live_revision)]} { + append context_action [bcms::ui::base::context_action_link -context_action revision-publish \ + -export_vars [export_vars {revision_id return_url}]] + } else { + append context_action [bcms::ui::base::context_action_link -context_action revision-unpublish \ + -export_vars [export_vars {{revision_id $current_item(live_revision)} return_url}]] + } + append context_action [bcms::ui::base::context_action_link -context_action categorize-item \ + -export_vars [export_vars {{item_id $current_item(item_id)} {folder_id $current_item(parent_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action revision-list \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action relate-page \ + -export_vars [export_vars {{item_id_one $current_item(item_id)} return_url}]] + append context_action [bcms::ui::base::context_action_link -context_action relate-image \ + -export_vars [export_vars {{item_id_one $current_item(item_id)} return_url}]] + set context_help "You can edit this page, etc." set title "View Page" @@ -29,8 +38,8 @@ lappend context "$page_revision(title)" } else { - set context_action " -View Version(s)" + set context_action [bcms::ui::base::context_action_link -context_action revision-list \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] set context_help "This is a version of a page. You can only view this page" Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.adp,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.adp 5 Oct 2003 12:28:03 -0000 1.3 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.adp 27 Oct 2003 10:17:21 -0000 1.4 @@ -2,5 +2,6 @@ @title@ @context@ - + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.tcl 4 Oct 2003 08:46:40 -0000 1.2 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.tcl 27 Oct 2003 10:17:21 -0000 1.3 @@ -1,8 +1,12 @@ ad_page_contract { display search results } { - name_search:optional {display_search_results:optional 0} + {name_search:optional ""} + {title_search:optional ""} + {content_search:optional ""} + {orderby:optional name,asc} + {page:optional 1} } if {$display_search_results} { @@ -14,3 +18,10 @@ set package_url [ad_conn package_url] set context [list [list $package_url "Search"] $title] +# check the permission if user has permission for the package +if {![permission::permission_p -object_id [ad_conn package_id] -privilege admin]} { + ad_return_forbidden "Serurity Violation" "You don't have permission to administer. This incident has been logged." + ad_script_abort +} + + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/template-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/template-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/template-view.adp 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/template-view.adp 27 Oct 2003 10:17:21 -0000 1.2 @@ -4,9 +4,5 @@ @context_action@ @context_help@ + -

@template_revision.title@

-

@template_revision.description@

- -

@template_revision.content@

- Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/template-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/template-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/template-view.tcl 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/template-view.tcl 27 Oct 2003 10:17:21 -0000 1.2 @@ -2,31 +2,18 @@ view a template revision, if no revision_id is passed then latest revision is used } { {revision_id:optional,naturalnum $current_item(latest_revision)} + {return_url:optional [ad_return_url]} } -array set template_revision [bcms::revision::get_revision -revision_id $revision_id] - -set current_url [ad_return_url -urlencode] set package_url [ad_conn package_url] -set context_action [list] -lappend context_action "Edit This Template" -lappend context_action "Delete This Template" -set revision_action "" -append revision_action "
Change Version to:
" -lappend context_action $revision_action +array set template_revision [bcms::revision::get_revision -revision_id $revision_id] -lappend context_action "Add Version" -lappend context_action "Write/Publish This Template" +set context_action {} +append context_action [bcms::ui::base::context_action_link -context_action template-write \ + -export_vars [export_vars {revision_id return_url}]] +append context_action [bcms::ui::base::context_action_link -context_action revision-list \ + -export_vars [export_vars {{item_id $current_item(item_id)} return_url}]] set context_help "" Index: openacs-4/contrib/packages/bcms-ui-base/templates/public/admin-link.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/public/admin-link.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/public/admin-link.adp 27 Oct 2003 10:17:21 -0000 1.1 @@ -0,0 +1,3 @@ + + Admin + Index: openacs-4/contrib/packages/bcms-ui-base/templates/public/admin-link.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/public/admin-link.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/public/admin-link.tcl 27 Oct 2003 10:17:21 -0000 1.1 @@ -0,0 +1,3 @@ +if {[permission::permission_p -object_id [ad_conn package_id] -privilege admin]} { + set switch_to_content [bcms::ui::base::switch_cms_context_url -cms_context bcms-ui-base] +} Index: openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.adp 4 Oct 2003 08:46:41 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.adp 27 Oct 2003 10:17:21 -0000 1.2 @@ -1,5 +1,7 @@ - + + @current_band_id@ +
View as: +
+ Index: openacs-4/contrib/packages/bcms-ui-base/www/admin/set-root-folder.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/admin/set-root-folder.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/bcms-ui-base/www/admin/set-root-folder.tcl 5 Oct 2003 12:28:03 -0000 1.2 +++ openacs-4/contrib/packages/bcms-ui-base/www/admin/set-root-folder.tcl 27 Oct 2003 10:17:21 -0000 1.3 @@ -1,6 +1,7 @@ ad_page_contract { this page is set the root_folder_id and template_folder_id of this package instance } { + new_content_type:optional } bcms::folder::tree_folders -parent_id [bcms::folder::get_cr_root_folder] -multirow_name folders -include_parent @@ -9,6 +10,10 @@ set current_url [ad_return_url -urlencode] +if {[exists_and_not_null new_content_type] && [exists_and_not_null current_root_folder_id]} { + bcms::register_content_type -folder_id $current_root_folder_id -content_type $new_content_type +} + set title "Set Folder" set context [list $title] Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/apply-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/apply-template.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/apply-template.tcl 9 Oct 2003 09:58:21 -0000 1.2 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/apply-template.tcl 27 Oct 2003 10:17:21 -0000 1.3 @@ -13,6 +13,7 @@ bcms::template::apply_template -item_id $item_id -template_id $template_id -context public ad_returnredirect $return_url + ad_script_abort } else { @@ -23,14 +24,11 @@ -key item_id \ -elements { title { - label "Title/Label" + label "Title" link_url_eval {[bcms::ui::base::apply_template_url -item_id $item_id -template_id $template_id -return_url $return_url]} } - content_type { - label "Content Type" - } } - bcms::template::list_templates -parent_id [parameter::get -parameter template_folder_id] -multirow_name template_list + bcms::template::list_templates -parent_id [parameter::get -parameter template_folder_id] -multirow_name template_list -revision live set title "Apply Template" set context_help "" Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/delete-item.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/delete-item.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/delete-item.tcl 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/delete-item.tcl 27 Oct 2003 10:17:22 -0000 1.2 @@ -11,10 +11,16 @@ db_transaction { foreach one_item $item_id { - bcms::item::delete_item -item_id $one_item + array set item [bcms::item::get_item -item_id $one_item] + if {[string equal $item(content_type) "content_folder"]} { + bcms::folder::delete_folder -folder_id $one_item + } else { + bcms::item::delete_item -item_id $one_item + } } } ad_returnredirect $return_url + ad_script_abort } else { Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/file-edit.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/file-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/folder-edit.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/folder-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/image-edit.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/image-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/master.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/master.tcl 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/master.tcl 27 Oct 2003 10:17:22 -0000 1.2 @@ -1,3 +1,5 @@ +set package_url [ad_conn package_url] + set manage_type [ad_get_client_property -default content [ad_conn package_id] manage_type] if {[string equal $manage_type "template"]} { #if we are on template manage_type then we need to use the template folder not the page folder @@ -7,10 +9,17 @@ } if {![info exists context_url]} { - set context_url [ad_conn package_url] + set context_url $package_url } set root_url [ad_conn package_url] regexp "${root_url}(\[^ ?\]*)" $context_url match_p context_url + +# check the permission if user has permission for the package +if {![permission::permission_p -object_id [ad_conn package_id] -privilege admin]} { + ad_return_forbidden "Serurity Violation" "You don't have permission to administer. This incident has been logged." + ad_script_abort +} + array set current_item [bcms::item::get_item_by_url -root_id $root_id -url "/$context_url"] set context [bcms::widget::item_context -item_id $current_item(item_id) -root_id $root_id] Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/move-item.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/move-item.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/move-item.tcl 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/move-item.tcl 27 Oct 2003 10:17:22 -0000 1.2 @@ -16,6 +16,7 @@ } ad_returnredirect $return_url + ad_script_abort } else { Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/page-add-revision.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/page-edit.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/page-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/page-revision.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/page-revision.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-add.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-add.tcl 27 Oct 2003 10:17:22 -0000 1.1 @@ -0,0 +1,19 @@ +ad_page_contract { + add a revision, copy from the latest one +} { + item_id:notnull,naturalnum + return_url:notnull +} + +array set item [bcms::item::get_item -item_id $item_id] + +if {[array size item] > 0} { + bcms::revision::copy_revision -revision_id $item(latest_revision) +} else { + error "item does not exist" +} + +ad_returnredirect $return_url +ad_script_abort + + Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-list.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-list.adp 27 Oct 2003 10:17:22 -0000 1.1 @@ -0,0 +1,7 @@ + +@title@ +@return_url@ +@context_action@ + + + Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-list.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-list.tcl 27 Oct 2003 10:17:22 -0000 1.1 @@ -0,0 +1,34 @@ +ad_page_contract { + list the revision of a item +} { + item_id:naturalnum,notnull + return_url:notnull +} + +set package_url [ad_conn package_url] +set current_url [ad_return_url -urlencode] + +template::list::create \ + -name revision_list \ + -multirow revision_list \ + -key revision_id \ + -elements { + creation_date {label "Date"} + last_name { + label "Author" + display_template {@revision_list.first_names@ @revision_list.last_name@} + } + live_revision_id { + label "Status" + display_template {published} + } + revision_id { + display_template {View} + } + + } + +bcms::revision::list_revisions -item_id $item_id -multirow_name revision_list + +set title "View Page Version(s)" +set context_action "Add a Revision" Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-publish.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-publish.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-publish.tcl 4 Oct 2003 08:47:32 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-publish.tcl 27 Oct 2003 10:17:22 -0000 1.2 @@ -8,11 +8,6 @@ array set revision [bcms::revision::get_revision -revision_id $revision_id] if {[array size revision] > 0} { - #if we are publishing the latest revision then we create a newer version - #so we will not edit the live and latest revision. - if {$revision(latest_revision) == $revision_id} { - bcms::revision::copy_revision -revision_id $revision_id - } # publish it if the revision is not live, otherwise its has already been published if {$revision(live_revision) != $revision_id} { bcms::revision::set_revision_status -revision_id $revision_id -status live @@ -22,3 +17,4 @@ } ad_returnredirect $return_url +ad_script_abort Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-unpublish.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-unpublish.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-unpublish.tcl 9 Oct 2003 09:58:21 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/revision-unpublish.tcl 27 Oct 2003 10:17:22 -0000 1.2 @@ -8,3 +8,4 @@ bcms::revision::set_revision_status -revision_id $revision_id -status production ad_returnredirect $return_url +ad_script_abort Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/switch-context.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/switch-context.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/switch-context.tcl 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/switch-context.tcl 27 Oct 2003 10:17:22 -0000 1.2 @@ -11,5 +11,5 @@ ad_set_client_property -persistent t [ad_conn package_id] cms_context public } - ad_returnredirect $return_url +ad_script_abort Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/switch-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/switch-type.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/switch-type.tcl 22 Sep 2003 07:36:47 -0000 1.2 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/switch-type.tcl 27 Oct 2003 10:17:22 -0000 1.3 @@ -27,6 +27,8 @@ if {[info exists return_url]} { ad_returnredirect $return_url + ad_script_abort } else { ad_returnredirect [ad_conn package_url] + ad_script_abort } Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/template-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/template-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/template-delete.tcl 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/template-delete.tcl 27 Oct 2003 10:17:22 -0000 1.2 @@ -15,8 +15,8 @@ } } ad_returnredirect $return_url + ad_script_abort - } else { template::list::create \ Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/template-edit.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/www/manage/template-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/bcms-ui-base/www/manage/template-write.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/www/manage/template-write.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/www/manage/template-write.tcl 27 Aug 2003 17:33:49 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/www/manage/template-write.tcl 27 Oct 2003 10:17:22 -0000 1.2 @@ -22,3 +22,4 @@ } ad_returnredirect $return_url +ad_script_abort