Index: openacs-4/packages/ams/tcl/ams-list-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-list-procs.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/ams/tcl/ams-list-procs.tcl 28 Oct 2005 21:02:46 -0000 1.6
+++ openacs-4/packages/ams/tcl/ams-list-procs.tcl 14 Feb 2006 21:49:29 -0000 1.7
@@ -223,7 +223,8 @@
ad_proc -public ams::list::attribute::map {
- -list_id:required
+ {-list_id ""}
+ {-list_ids ""}
-attribute_id:required
{-sort_order ""}
{-required_p "f"}
@@ -238,7 +239,14 @@
if { ![exists_and_not_null sort_order] } {
set sort_order [expr 1 + [db_string get_highest_sort_order {} -default "0"]]
}
- return [db_exec_plsql ams_list_attribute_map {}]
+
+ if {![string eq "" $list_id]} {
+ return [db_exec_plsql ams_list_attribute_map {}]
+ } elseif {![string eq "" $list_ids]} {
+ foreach list_id $list_ids {
+ db_exec_plsql ams_list_attribute_map {}
+ }
+ }
}
ad_proc -public ams::list::attribute::unmap {
Index: openacs-4/packages/ams/www/list-code.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-code.adp,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/ams/www/list-code.adp 9 Feb 2006 20:46:43 -0000 1.7
+++ openacs-4/packages/ams/www/list-code.adp 14 Feb 2006 21:49:29 -0000 1.8
@@ -38,13 +38,6 @@
-widget "@attributes.widget@" \
-dynamic_p "@attributes.dynamic_p@"
-ams::list::attribute::map \
- -list_id $list_id \
- -attribute_id $attribute_id \
- -sort_order "@attributes.list_sort_order@" \
- -required_p "@attributes.required_p@" \
- -section_heading "@attributes.section_heading@"
-
set option_id [ams::option::new \
@@ -54,6 +47,24 @@
+
+#################################
+###
+### End Of Attribute definition
+###
+#################################
+
+
+
+set attribute_id [attribute::id -object_type "@attributes2.object_type@" -attribute_name "@attributes2.attribute_name@"]
+ams::list::attribute::map \
+ -list_id $list_id \
+ -attribute_id $attribute_id \
+ -sort_order "@attributes2.list_sort_order@" \
+ -required_p "@attributes2.required_p@" \
+ -section_heading "@attributes2.section_heading@"
+
+
Index: openacs-4/packages/ams/www/list-code.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-code.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/ams/www/list-code.tcl 9 Feb 2006 20:46:43 -0000 1.7
+++ openacs-4/packages/ams/www/list-code.tcl 14 Feb 2006 21:49:29 -0000 1.8
@@ -47,8 +47,25 @@
set help_text [attribute::help_text -attribute_id $attribute_id]
}
-
+db_multirow -extend {message_key option_key true_pretty true_plural help_text true_option} -unclobber attributes2 select_mapped_attributes2 {
+ select alam.required_p,
+ alam.section_heading,
+ alam.sort_order as list_sort_order,
+ ams.*
+ from ams_list_attribute_map alam,
+ ams_attributes ams
+ where alam.list_id = :list_id
+ and alam.attribute_id = ams.attribute_id
+ order by alam.sort_order
+} {
+ regsub -all {"} $section_heading {\"} section_heading
+ set message_key "${object_type}_${attribute_name}"
+ set pretty_name [lang::message::lookup en_US [string trim $pretty_name "#"]]
+ set pretty_plural [lang::message::lookup en_US [string trim $pretty_plural "#"]]
+ set help_text [attribute::help_text -attribute_id $attribute_id]
+
+}
ad_return_template
Index: openacs-4/packages/ams/www/widgets.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/widgets.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/ams/www/widgets.tcl 28 May 2005 15:37:27 -0000 1.3
+++ openacs-4/packages/ams/www/widgets.tcl 14 Feb 2006 21:49:29 -0000 1.4
@@ -12,9 +12,6 @@
set title "[_ ams.Widgets]"
set context [list $title]
-
-
-
list::create \
-name widgets \
-multirow widgets \
@@ -76,7 +73,7 @@
db_multirow widgets get_widgets {
select *
from ams_widgets
- order by widget_name
+ order by pretty_name
} {
}