Index: openacs-4/packages/glossar/www/glossar-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-add.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/glossar/www/glossar-add.tcl 20 Aug 2005 09:37:51 -0000 1.1 +++ openacs-4/packages/glossar/www/glossar-add.tcl 17 Oct 2005 16:23:01 -0000 1.2 @@ -39,21 +39,21 @@ set package_id $owner(package_id) -set source_tree_id [category_tree::get_id "#acs-translations.cat_tree_wieners_from#"] -set target_tree_id [category_tree::get_id "#acs-translations.cat_tree_wieners_to#"] +set from_object_id [db_string get_from_default_object { }] +set to_object_id [db_string get_to_default_object { }] +# We get the mapped category tree's to show in the form +set source_tree_id [lindex [lindex [category_tree::get_mapped_trees $from_object_id] 0] 0] +set target_tree_id [lindex [lindex [category_tree::get_mapped_trees $to_object_id] 0] 0] + ad_form -name glossar-add -export {owner_id package_id gl_translation_p customer_id} -form { {glossar_id:key} {title:text(text) {label "[_ glossar.Title]"} } {description:text(textarea),optional {label "[_ glossar.Comment]"} {html{rows 4 cols 30} }} - - } - - if {$gl_translation_p == 1} { ad_form -extend -name glossar-add -form { @@ -67,7 +67,6 @@ } else { - ad_form -extend -name glossar-add -form { {source_category_id:integer(category) {label "[_ glossar.glossar_single_category]"} {category_tree_id $source_tree_id} {assign_single_p t} {require_category_p t} {html {size 4}} } @@ -89,15 +88,8 @@ set title "" } -edit_request { - db_1row get_glossar { - SELECT crr.title , crr.description , gl.source_category_id , gl.target_category_id , gl.owner_id - FROM gl_glossars gl, cr_items cr, cr_revisions crr - WHERE cr.latest_revision = crr.revision_id - AND crr.revision_id = gl.glossar_id - AND cr.item_id = :glossar_id - } + db_1row get_glossar { } - } -new_data { if {![info exists target_category_id]} { Index: openacs-4/packages/glossar/www/glossar-add.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-add.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/glossar/www/glossar-add.xql 17 Oct 2005 16:23:01 -0000 1.1 @@ -0,0 +1,45 @@ + + + + + + select + crr.title, + crr.description, + gl.source_category_id, + gl.target_category_id, + gl.owner_id + from + gl_glossars gl, + cr_items cr, + cr_revisions crr + where + cr.latest_revision = crr.revision_id + and crr.revision_id = gl.glossar_id + and cr.item_id = :glossar_id + + + + + + select + object_id + from + acs_objects + where + title = '#glossar.from_default_object_id#' + + + + + + select + object_id + from + acs_objects + where + title = '#glossar.to_default_object_id#' + + + +