Index: openacs-4/contrib/packages/classified-ads/sql/postgresql/attributes-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/sql/postgresql/attributes-package-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/classified-ads/sql/postgresql/attributes-package-create.sql 30 Jul 2003 04:56:41 -0000 1.4 +++ openacs-4/contrib/packages/classified-ads/sql/postgresql/attributes-package-create.sql 31 Jul 2003 01:24:31 -0000 1.5 @@ -23,7 +23,6 @@ p_keyword_id alias for $11; v_attribute_id acs_attributes.attribute_id%TYPE; v_sort_order acs_attributes.sort_order%TYPE; - v_sitewide_p ca_attributes.sitewide_p%TYPE; v_column_exists boolean; begin Index: openacs-4/contrib/packages/classified-ads/tcl/categories-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/tcl/categories-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/classified-ads/tcl/categories-procs.tcl 30 Jul 2003 04:56:41 -0000 1.4 +++ openacs-4/contrib/packages/classified-ads/tcl/categories-procs.tcl 31 Jul 2003 01:24:31 -0000 1.5 @@ -117,7 +117,7 @@ ad_proc -public classified-ads::categories::get_all_tree { {-keyword_id ""} {-include_description:boolean "0"} - {-indent_factor:integer 2} + {-indent_factor 2} {-indent_pattern " "} } { Returns a list of lists with the tree of categories for the Index: openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql 30 Jul 2003 04:56:41 -0000 1.4 +++ openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql 31 Jul 2003 01:24:31 -0000 1.5 @@ -261,4 +261,45 @@ + + + + + SELECT + aa.attribute_id, + aa.attribute_name, + aa.pretty_name, + aa.pretty_plural, + aa.default_value, + aa.storage, + aa.datatype, + aa.sort_order, + coalesce(aa.table_name, at.table_name) as table_name, + coalesce(aa.column_name, aa.attribute_name) as column_name, + keywords.heading AS category_heading + FROM + acs_attributes aa, + ca_attributes ca, + acs_object_types at, + ( + select + subtree.keyword_id, + subtree.heading + from cr_keywords parent, cr_keywords subtree + where parent.keyword_id = :keyword_id + and parent.tree_sortkey between subtree.tree_sortkey and tree_right(subtree.tree_sortkey) + ) keywords + WHERE + aa.attribute_id = ca.attribute_id + AND + ca.keyword_id = keywords.keyword_id + AND + aa.object_type = :content_type + AND + at.object_type = :content_type + $storage_stub + + + + Index: openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs.tcl 30 Jul 2003 04:56:41 -0000 1.10 +++ openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs.tcl 31 Jul 2003 01:24:31 -0000 1.11 @@ -552,22 +552,26 @@ ad_proc -public classified-ads::get_attributes { - {-content_type:required} + {-content_type "ca_ad"} {-package_id} {-storage "all"} } { Returns a list of ns_sets of the attributes for one content type @param content_type This is the content type whose attributes we get - @param package_id Only the attributes belonging to this package is retrieved. + + @param package_id Only the attributes belonging to this package are retrieved. Defaults to current package. + @param storage Only the attributes who belong to this storage type are retrieved. Can be "type_specific", "generic", or "all". } { if {![exists_and_not_null package_id]} { set package_id [ad_conn package_id] } + set keyword_id [classified-ads::categories::get_package_keyword_id -package_id $package_id] + if {![string equal $storage "all"]} { set storage_stub "and storage = '$storage'" } else { Index: openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs.xql,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs.xql 30 Jul 2003 04:56:41 -0000 1.4 +++ openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs.xql 31 Jul 2003 01:24:31 -0000 1.5 @@ -51,29 +51,6 @@ - - - - select aa.attribute_id, - coalesce(aa.column_name, aa.attribute_name) as column_name, - aa.default_value, - coalesce(aa.table_name,at.table_name) as table_name, - aa.storage, - aa.datatype - from acs_attributes aa, - ca_attributes ca, - acs_object_types at - where aa.attribute_id = ca.attribute_id and - (ca.package_id = :package_id or - ca.sitewide_p = 't') and - aa.object_type = :content_type and - at.object_type = :content_type - $storage_stub - - - - - Index: openacs-4/contrib/packages/classified-ads/www/admin/fields.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/www/admin/fields.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/classified-ads/www/admin/fields.tcl 30 Jul 2003 04:56:41 -0000 1.2 +++ openacs-4/contrib/packages/classified-ads/www/admin/fields.tcl 31 Jul 2003 01:24:31 -0000 1.3 @@ -13,9 +13,9 @@ set package_id [ad_conn package_id] set content_type "ca_ad" -db_multirow -extend { category_heading } fields select_attributes {} { - set category_heading [classified-ads::categories::get_heading -keyword_id $keyword_id] -} +template::util::list_of_ns_sets_to_multirow \ + -rows [classified-ads::get_attributes] \ + -var_name fields ad_return_template Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/classified-ads/www/admin/fields.xql'. Fisheye: No comparison available. Pass `N' to diff?