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.1 -r1.2
--- openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql 16 Jul 2003 04:52:32 -0000 1.1
+++ openacs-4/contrib/packages/classified-ads/tcl/classified-ads-procs-postgresql.xql 25 Jul 2003 23:53:19 -0000 1.2
@@ -222,4 +222,90 @@
+
+
+
+ create function ca_inline_0 ()
+ returns integer as '
+ declare
+ v_attribute_id ca_attributes.attribute_id%TYPE;
+ begin
+
+ v_attribute_id := ca_attributes__create_attribute (
+ ''ca_ad'', -- content_type
+ ''type'', -- attribute_name
+ ''integer'', -- datatype
+ ''Type'', -- pretty_name
+ ''Types'', -- pretty_plural
+ null, -- sort_order
+ ''0'', -- default_value
+ ''type_specific'', -- storage
+ ''cr_ca_ads'', -- table_name
+ ''integer'', -- column_spec
+ null -- package_id
+ );
+
+ PERFORM ca_attributes__register_widget (
+ v_attribute_id, -- attribute_name
+ ''radio'', -- widget
+ ''Type'', -- label
+ :main_keyword_id, -- keyword_id
+ null, -- html_options
+ null, -- extra_options
+ ''{{"For Sale" 0} {"Wanted to Buy" 1}}'', -- select_options
+ ''{type {![string equal $value 0] && ![string equal $value 1]} {"Invalid option selected, please select For Sale or Wanted to Buy"}}'', -- validate
+ ''f'', -- optional_p
+ ''t'' -- enabled_p
+ );
+
+ v_attribute_id := ca_attributes__create_attribute (
+ ''ca_ad'', -- content_type
+ ''expires_on'', -- attribute_name
+ ''date'', -- datatype
+ ''Expiry Date'', -- pretty_name
+ ''Expiry Dates'', -- pretty_plural
+ null, -- sort_order
+ null, -- default_value
+ ''type_specific'', -- storage
+ ''cr_ca_ads'', -- table_name
+ ''timestamp'', -- column_spec
+ null -- package_id
+ );
+
+ PERFORM ca_attributes__register_widget (
+ v_attribute_id, -- attribute_name
+ ''date'', -- widget
+ ''Ad expires on'', -- label
+ :main_keyword_id, -- keyword_id
+ null, -- html_options
+ '' -format "MONTH DD YYYY" -help'' -- extra_options
+ null, -- select_options
+ null, -- validate
+ ''t'', -- optional_p
+ ''t'' -- enabled_p
+ );
+
+ return NULL;
+ end;
+ ' language 'plpgsql';
+
+
+
+
+
+
+
+ SELECT ca_inline_0();
+
+
+
+
+
+
+
+ DROP FUNCTION ca_inline_0();
+
+
+
+