Index: openacs.org-dev/packages/cms/www/modules/items/comment-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/cms/www/modules/items/comment-add.tcl,v diff -u -r1.1.1.1 -r1.1.1.2 --- openacs.org-dev/packages/cms/www/modules/items/comment-add.tcl 9 Jul 2002 17:35:03 -0000 1.1.1.1 +++ openacs.org-dev/packages/cms/www/modules/items/comment-add.tcl 8 Oct 2002 15:47:01 -0000 1.1.1.2 @@ -4,9 +4,7 @@ item_id -datatype integer } -template::query get_title item_title onevalue " - select content_item.get_title(:item_id) from dual -" +set item_title [db_string get_title ""] form create add_comment -elements " journal_id -datatype integer -widget hidden @@ -18,10 +16,8 @@ " if { [form is_request add_comment] } { - template::query get_journal_id journal_id onevalue " - select acs_object_id_seq.nextval from dual - " - element set_properties add_comment journal_id -value $journal_id + set journal_id [db_string get_journal_id ""] + element set_properties add_comment journal_id -value $journal_id } if { [form is_valid add_comment] } { @@ -34,7 +30,7 @@ db_transaction { set journal_id [db_exec_plsql new_entry " begin - :1 = journal_entry.new( + :1 := journal_entry.new( journal_id => :journal_id, object_id => :object_id, action => 'comment', @@ -46,5 +42,33 @@ } + set query " + select + rel_id, relation_tag, + i.item_id, i.name, trim(r.title) as title, t.pretty_name, + to_char(o.creation_date, 'MM/DD/YY HH24:MM') last_modified + from + cr_items i, acs_object_types t, acs_objects o, cr_revisions r, + cr_child_rels c + where + i.parent_id = :item_id + and + o.object_id = :item_id + and + i.content_type = t.object_type + and + r.revision_id = NVL(i.live_revision, i.latest_revision) + and + c.parent_id = i.parent_id + and + c.child_id = i.item_id + order by + t.pretty_name, title" + +#template::query children multirow $query + + + + template::forward "index?item_id=$object_id" }