Index: openacs-4/packages/news/www/admin/process.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/process.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/news/www/admin/process.tcl 18 Nov 2002 17:59:12 -0000 1.5 +++ openacs-4/packages/news/www/admin/process.tcl 22 Oct 2003 16:12:39 -0000 1.6 @@ -12,16 +12,11 @@ @cvs-id $Id$ } { - n_items:multiple,notnull action:notnull - } -errors { - n_items:notnull "[_ news.lt_Please_check_the_item]" - } -properties { - title:onevalue context:onevalue action:onevalue @@ -30,7 +25,6 @@ n_items:onevalue halt_p:onevalue news_items:multirow - } @@ -44,7 +38,17 @@ set title "[_ news.Confirm_Action] $action" set context [list $title] +array set action_msg_key { + publish news.Publish + "make permanent" news.Make_Permanent + "archive now" news.Archive_Now + "archive next week" news.lt_Archive_as_of_Next_We + "archive next month" news.lt_Archive_as_of_Next_Mo + "make permanent" news.Make_Permanent +} +set action_pretty [_ $action_msg_key($action)] + # produce bind_id_list for {set i 0} {$i < [llength $n_items]} {incr i} { set id_$i [lindex $n_items $i] @@ -55,16 +59,35 @@ # 'archive' or 'making permanent' only after release possible if {[regexp -nocase {archive|permanent} $action ]} { - db_multirow unapproved unapproved_list {} + db_multirow -extend { creation_date_pretty } unapproved unapproved_list {} { + set creation_date_pretty [lc_time_fmt $creation_date "%x"] + } + set halt_p [array size unapproved] } # proceed if no errors if { ![info exist halt_p] || $halt_p==0 } { - db_multirow news_items item_list {} { - set creation_date [lc_time_fmt $creation_date "%x"] + template::list::create \ + -name news_items \ + -multirow news_items \ + -elements { + publish_title { + label \#news.Title\# + } + creation_date { + label \#news.Creation_Date\# + display_col creation_date_pretty + } + item_creator { + label \#news.Author\# + } + } + + db_multirow -extend { creation_date_pretty } news_items item_list {} { + set creation_date_pretty [lc_time_fmt $creation_date "%x"] } }