Index: openacs-4/packages/contacts/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/index.adp,v diff -u -r1.13 -r1.14 --- openacs-4/packages/contacts/www/index.adp 30 Aug 2005 15:24:32 -0000 1.13 +++ openacs-4/packages/contacts/www/index.adp 8 Sep 2005 18:15:49 -0000 1.14 @@ -5,7 +5,11 @@ - + Index: openacs-4/packages/contacts/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/index.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/contacts/www/index.tcl 29 Aug 2005 22:48:41 -0000 1.13 +++ openacs-4/packages/contacts/www/index.tcl 8 Sep 2005 18:15:49 -0000 1.14 @@ -14,6 +14,7 @@ {add_person:optional} {add_organization:optional} {aggregate_attribute_id ""} + {extend_values:optional ""} } if { [exists_and_not_null add_person] } { @@ -29,6 +30,11 @@ set aggregated_p 1 } +set extend_p 0 +if { [exists_and_not_null search_id] } { + set extend_p 1 +} + set user_id [ad_conn user_id] set package_id [ad_conn package_id] Index: openacs-4/packages/contacts/www/searches.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/searches.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/www/searches.adp 14 Jun 2005 06:08:28 -0000 1.1 +++ openacs-4/packages/contacts/www/searches.adp 8 Sep 2005 18:15:49 -0000 1.2 @@ -1,5 +1,5 @@ - +
Index: openacs-4/packages/contacts/www/admin/ext-search-options.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/admin/ext-search-options.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/www/admin/ext-search-options.adp 8 Sep 2005 18:15:49 -0000 1.1 @@ -0,0 +1,11 @@ + +@page_title;noquote@ +@context;noquote@ + + + +
+ +

#contacts.Stored_extended#:

+ +
\ No newline at end of file Index: openacs-4/packages/contacts/www/admin/ext-search-options.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/admin/ext-search-options.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/www/admin/ext-search-options.tcl 8 Sep 2005 18:15:49 -0000 1.1 @@ -0,0 +1,132 @@ +#packages/contacts/www/admin/ext-search-options.tcl +ad_page_contract { + UI to add edit or delete options for extended search. + @author Miguel Marin (miguelmarin@viaro.net) + @author Viaro Network www.viaro.net + @creation-date 2005-09-08 +} { + extend_id:optional + {edit_p "f"} + {delete_p "f"} + {orderby "var_name,asc"} +} + +set page_title [_ contacts.Extended_search_opt] +set context [list [_ contacts.Extended_search_opt]] + +if { $delete_p } { + contact::extend::delete -extend_id $extend_id + ad_returnredirect -message "[_ contacts.ext_del_message]" "ext-search-options" +} + +ad_form -name "add_option" -form { + extend_id:key(contact_extend_search_seq) +} +if { $edit_p } { + ad_form -extend -name "add_option" -form { + {var_name:text(text) + {label "[_ contacts.Var_name]:"} + {help_text "[_ contacts.var_name_help]"} + {mode display } + } + } +} else { + ad_form -extend -name "add_option" -form { + {var_name:text(text) + {label "[_ contacts.Var_name]:"} + {help_text "[_ contacts.var_name_help]"} + } + } +} + +ad_form -extend -name "add_option" -form { + {pretty_name:text(text) + {label "[_ contacts.Pretty_name]:"} + {help_text "[_ contacts.pretty_name_help]"} + } + {subquery:text(textarea),nospell + {label "[_ contacts.Subquery]:"} + {html {cols 40 rows 4}} + {help_text "[_ contacts.subquery_help]"} + } + {description:text(textarea),optional,nospell + {label "[_ contacts.Description]"} + {html {cols 40 rows 2}} + {help_text "[_ contacts.description_help]"} + } +} + +if { !$edit_p } { + ad_form -extend -name "add_option" -validate { + {var_name + {![contact::extend::var_name_check -var_name $var_name]} + "[_ contacts.this_var_name]" + } + } +} + +ad_form -extend -name "add_option" -new_data { + contact::extend::new \ + -extend_id $extend_id \ + -var_name $var_name \ + -pretty_name $pretty_name \ + -subquery $subquery \ + -description $description + +} -select_query { + select * from contact_extend_options where extend_id = :extend_id +} -edit_data { + contact::extend::update \ + -extend_id $extend_id \ + -var_name $var_name \ + -pretty_name $pretty_name \ + -subquery $subquery \ + -description $description +} -after_submit { + ad_returnredirect "ext-search-options" +} + +set edit_url "ext-search-options?extend_id=@ext_options.extend_id@&edit_p=t" +set delete_url "ext-search-options?extend_id=@ext_options.extend_id@&delete_p=t" + +template::list::create \ + -name ext_options \ + -multirow ext_options \ + -elements { + action_buttons { + display_template { + + + } + html { width 5% } + } + var_name { + label "[_ contacts.Var_name]" + html { width 10% } + } + pretty_name { + label "[_ contacts.Pretty_name]" + html { width 10% } + } + subquery { + label "[_ contacts.Subquery]" + html { width 45% } + } + description { + label "[_ contacts.Description]" + html { width 25% } + } + } -orderby { + var_name { + label "[_ contacts.Var_name]" + orderby_asc "var_name asc" + orderby_desc "var_name desc" + } + pretty_name { + label "[_ contacts.Pretty_name]" + orderby_asc "pretty_name asc" + orderby_desc "pretty_name desc" + } + } + +db_multirow ext_options ext_options " " Index: openacs-4/packages/contacts/www/admin/ext-search-options.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/admin/ext-search-options.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/www/admin/ext-search-options.xql 8 Sep 2005 18:15:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + select + * + from + contact_extend_options + [template::list::orderby_clause -orderby -name "ext_options"] + + + + \ No newline at end of file Index: openacs-4/packages/contacts/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/admin/index.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/contacts/www/admin/index.adp 31 Jul 2005 08:17:47 -0000 1.6 +++ openacs-4/packages/contacts/www/admin/index.adp 8 Sep 2005 18:15:49 -0000 1.7 @@ -7,6 +7,7 @@ #contacts.Add_Group# #contacts.lt_Instance_Permissions_# #acs-subsite.Parameters# +#contacts.Extended_search_opt#

#contacts.READ_THESE#