Index: openacs-4/packages/glossar/lib/glossar-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-list.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/glossar/lib/glossar-list.tcl 2 Nov 2005 15:12:40 -0000 1.5 +++ openacs-4/packages/glossar/lib/glossar-list.tcl 13 Nov 2005 13:39:56 -0000 1.6 @@ -91,7 +91,7 @@ lappend actions "[_ glossar.New_Translation]" [export_vars -base "${base_url}/glossar-add" {owner_id gl_translation_p customer_id}] "[_ glossar.Add_New_Translation]" -set row_list [list title description source_category target_category glossar_edit glossar_files] +set row_list [list checkbox title description source_category target_category glossar_edit glossar_files] set no_perm_p 0 @@ -114,90 +114,92 @@ if { $no_perm_p == 0} { -template::list::create \ - -name gl_glossar \ - -key glossar_id \ - -no_data "[_ glossar.None]" \ - -selected_format $format \ - -pass_properties {customer_id owner_id edit_link} \ - -elements { - title { - label {[_ glossar.glossar_title]} - display_template "@gl_glossar.title@" - } - description { - label {[_ glossar.glossar_description]} - } - source_category { - label {[_ glossar.glossar_source_category_header]} - } - target_category { - label {[_ glossar.glossar_target_category]} - } - glossar_edit { - display_template "[_ acs-kernel.common_Edit]" - } - glossar_files { - display_template "[_ glossar.Files] (@gl_glossar.files_count@)" - } + template::list::create \ + -name gl_glossar \ + -key glossar_id \ + -no_data "[_ glossar.None]" \ + -selected_format $format \ + -pass_properties {customer_id owner_id edit_link} \ + -elements { + title { + label {[_ glossar.glossar_title]} + display_template "@gl_glossar.title@" + } + description { + label {[_ glossar.glossar_description]} + } + source_category { + label {[_ glossar.glossar_source_category_header]} + } + target_category { + label {[_ glossar.glossar_target_category]} + } + glossar_edit { + display_template "[_ acs-kernel.common_Edit]" + } + glossar_files { + display_template "[_ glossar.Files] (@gl_glossar.files_count@)" + } - } -actions $actions -sub_class narrow \ - -bulk_actions {"Move Glossars" "glossar-move" "Moves glossars to another customer"} \ - -orderby { - default_value title - glossar_id { - label {[_ glossar.glossar_id]} - orderby_desc {sort_key asc , gl.glossar_id desc} - orderby_asc {sort_key asc , gl.glossar_id asc} - default_direction desc - } - title { - label {[_ glossar.glossar_title]} - orderby_desc {sort_key asc , crr.title desc} - orderby_asc {sort_key asc , crr.title asc} - default_direction asc - } - } -orderby_name orderby \ - -filters { - customer_id {} - edit_link {} - } \ - -page_size_variable_p 1 \ - -page_size $page_size \ - -page_flush_p 0 \ - -page_query_name gl_glossar \ - -formats { - normal { - label "[_ acs-templating.Table]" - layout table - elements $row_list - } - csv { - label "[_ acs-templating.CSV]" - output csv - page_size 0 - row - } - } + } -actions $actions -sub_class narrow \ + -bulk_actions {"Move Glossars" $gl_glossar.move_url "Moves glossars to another customer"} \ + -orderby { + default_value title + glossar_id { + label {[_ glossar.glossar_id]} + orderby_desc {sort_key asc , gl.glossar_id desc} + orderby_asc {sort_key asc , gl.glossar_id asc} + default_direction desc + } + title { + label {[_ glossar.glossar_title]} + orderby_desc {sort_key asc , crr.title desc} + orderby_asc {sort_key asc , crr.title asc} + default_direction asc + } + } -orderby_name orderby \ + -filters { + customer_id {} + edit_link {} + } \ + -page_size_variable_p 1 \ + -page_size $page_size \ + -page_flush_p 0 \ + -page_query_name gl_glossar \ + -formats { + normal { + label "[_ acs-templating.Table]" + layout table + elements $row_list + } + csv { + label "[_ acs-templating.CSV]" + output csv + page_size 0 + row + } + } -db_multirow -extend {source_category target_category gl_translation_p glossar_edit glossar_files files_url edit_url title_url files_count} gl_glossar gl_glossar {} { - if {![empty_string_p $target_category_id]} { - set gl_translation_p 1 - } else { - set gl_translation_p 0 + db_multirow -extend {source_category target_category gl_translation_p glossar_edit glossar_files files_url edit_url title_url files_count} gl_glossar gl_glossar {} { + if {![empty_string_p $target_category_id]} { + set gl_translation_p 1 + } else { + set gl_translation_p 0 + } + set files_count [db_string get_files_count { } -default 0] + set glossar_edit "[_ glossar.glossar_Edit]" + set glossar_files "[_ glossar.files]" + set source_category "[category::get_name $source_category_id]" + set target_category "[category::get_name $target_category_id]" + set title_url "[export_vars -base "${base_url}/glossar-term-list" {glossar_id gl_translation_p customer_id owner_id}]" + set edit_url "[export_vars -base "${base_url}/glossar-edit" {glossar_id}]" + set files_url "[export_vars -base "${base_url}/glossar-file-upload" {glossar_id}]" + set return_url [ad_conn url] + set move_url "[export_vars -base "${base_url}/glossar-move" {$return_url}]" + } if_no_rows { + + } - set files_count [db_string get_files_count { } -default 0] - set glossar_edit "[_ glossar.glossar_Edit]" - set glossar_files "[_ glossar.files]" - set source_category "[category::get_name $source_category_id]" - set target_category "[category::get_name $target_category_id]" - set title_url "[export_vars -base "${base_url}/glossar-term-list" {glossar_id gl_translation_p customer_id owner_id}]" - set edit_url "[export_vars -base "${base_url}/glossar-add" {owner_id glossar_id gl_translation_p }]" - set files_url "[export_vars -base "${base_url}/glossar-file-upload" {glossar_id}]" -} if_no_rows { - - -} } \ No newline at end of file