Index: openacs-4/packages/acs-object-management/tcl/view-attribute-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-object-management/tcl/view-attribute-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-object-management/tcl/view-attribute-procs.xql 13 Aug 2009 00:15:05 -0000 1.1 +++ openacs-4/packages/acs-object-management/tcl/view-attribute-procs.xql 27 Nov 2009 00:38:50 -0000 1.2 @@ -1,26 +1,37 @@ - + - insert into acs_object_view_attributes - (attribute_id, col_name, object_view, pretty_name, col_expr, sort_order) - select attribute_id, col_name, :to_object_view, pretty_name, col_expr, + insert into acs_view_attributes + (attribute_id, view_attribute, object_view, pretty_name, col_expr, sort_order) + select attribute_id, view_attribute, :to_object_view, pretty_name, col_expr, (select coalesce(max(sort_order), 1) - from acs_object_view_attributes + from acs_view_attributes where object_view = :to_object_view) - from acs_object_view_attributes + from acs_view_attributes where object_view = :from_object_view and attribute_id = :attribute_id - + - delete from acs_object_view_attributes + delete from acs_view_attributes where object_view = :object_view and attribute_id = :attribute_id + + + select aa.object_type, aa.datatype, aa.default_value, aova.view_attribute, + aova.pretty_name, aova.sort_order, aova.col_expr + from acs_attributes aa, acs_view_attributes aova + where aova.object_view = :object_view + and aova.attribute_id = :attribute_id + and aa.attribute_id = :attribute_id + + +