Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl,v diff -u -N -r1.61 -r1.62 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 22 Jan 2006 20:10:25 -0000 1.61 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 22 Jan 2006 21:00:52 -0000 1.62 @@ -404,7 +404,8 @@ - [_ dotlrn-ecommerce.edit] + [_ dotlrn-ecommerce.edit] + [_ dotlrn-ecommerce.show][_ dotlrn-ecommerce.hide] [_ dotlrn-ecommerce.application_pending] @@ -496,7 +497,7 @@ set discount_clause "" } -db_multirow -extend {patron_message member_state fs_chunk section_folder_id section_pages_url category_name community_url course_edit_url section_add_url section_edit_url course_grades section_grades section_zones sections_url member_p sessions instructor_names price prices shopping_cart_add_url attendees available_slots pending_p waiting_p approved_p instructor_p registration_approved_url button waiting_list_number asm_url } course_list get_courses { } { +db_multirow -extend {toggle_display_url patron_message member_state fs_chunk section_folder_id section_pages_url category_name community_url course_edit_url section_add_url section_edit_url course_grades section_grades section_zones sections_url member_p sessions instructor_names price prices shopping_cart_add_url attendees available_slots pending_p waiting_p approved_p instructor_p registration_approved_url button waiting_list_number asm_url } course_list get_courses { } { # Since dotlrn-ecommerce is based on dotlrn-catalog, # it's possible to have a dotlrn_catalog object without an @@ -507,7 +508,7 @@ } set button [_ dotlrn-ecommerce.add_to_cart] - + set toggle_display_url [export_vars -base admin/toggle-display {section_id {return_url [ad_return_url]}}] set category_name [string range $category_name 0 [expr [string length $category_name] - 3]] set community_url [dotlrn_community::get_community_url $community_id] set return_url [ad_return_url] Index: openacs-4/packages/dotlrn-ecommerce/www/admin/toggle-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/toggle-display.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/toggle-display.tcl 22 Jan 2006 21:00:52 -0000 1.1 @@ -0,0 +1,10 @@ +ad_page_contract { + Toggle display_section_p +} { + section_id:integer,notnull + {return_url ".."} +} + +db_dml toggle_display "" + +ad_returnredirect $return_url Index: openacs-4/packages/dotlrn-ecommerce/www/admin/toggle-display.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/toggle-display.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/toggle-display.xql 22 Jan 2006 21:00:52 -0000 1.1 @@ -0,0 +1,9 @@ + + + + + + update ec_custom_product_field_values set display_section_p = not display_section_p where product_id = (select product_id from dotlrn_ecommerce_section where section_id=:section_id) + + +