Index: openacs-4/packages/acs-object-management/www/admin/view.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-object-management/www/admin/view.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-object-management/www/admin/view.xql 13 Aug 2009 00:15:05 -0000 1.1 +++ openacs-4/packages/acs-object-management/www/admin/view.xql 27 Nov 2009 00:38:50 -0000 1.2 @@ -4,28 +4,26 @@ - select aova.attribute_id, aova.col_name, aova.pretty_name, aova.sort_order, + select aova.attribute_id, aova.view_attribute, aova.pretty_name, aova.sort_order, aova.col_expr, aa.datatype, aa.object_type - from acs_attributes aa, acs_object_view_attributes aova + from acs_attributes aa join acs_view_attributes aova using (attribute_id) where aova.object_view = :object_view - and aa.attribute_id = aova.attribute_id + order by aova.sort_order - select aova.attribute_id, aova.col_name, aova.pretty_name, aova.sort_order, + select aova.attribute_id, aova.view_attribute, aova.pretty_name, aova.sort_order, aova.col_expr, aa.datatype, aa.object_type - from acs_object_views aov, acs_object_view_attributes aova, - acs_attributes aa + from acs_attributes aa join acs_view_attributes aova using (attribute_id) + join acs_views aov using (object_view) where aov.object_type = :object_type and aov.root_view_p - and aov.object_view = aova.object_view - and aova.attribute_id = aa.attribute_id and not exists (select 1 - from acs_object_view_attributes aova2 + from acs_view_attributes aova2 where aova2.object_view = :object_view - and aova2.col_name = aova.col_name) + and aova2.view_attribute = aova.view_attribute) order by aova.sort_order