Index: openacs-4/packages/contacts/contacts.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/contacts.info,v diff -u -r1.48 -r1.49 --- openacs-4/packages/contacts/contacts.info 11 Nov 2005 22:59:08 -0000 1.48 +++ openacs-4/packages/contacts/contacts.info 14 Nov 2005 22:55:44 -0000 1.49 @@ -5,16 +5,16 @@ Contacts Contacts f - t + f - + Matthew Geddert This application lets you collaboratively view, edit and categorize contacts. - 2005-11-11 + 2005-11-14 Contacts is an application for managing all those people and or organization you need to keep track of. It has a complete UI for storing and categorizing contacts. Each contact can have an arbitrary number of custom attributes associated with it, including other contacts (i.e. a certain contact "belongs" to a certain organization). It also functions as a service contract provider for attributes related to users in your system 0 - + @@ -24,8 +24,8 @@ - + Index: openacs-4/packages/contacts/catalog/contacts.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/catalog/contacts.de_DE.ISO-8859-1.xml,v diff -u -r1.16 -r1.17 --- openacs-4/packages/contacts/catalog/contacts.de_DE.ISO-8859-1.xml 21 Oct 2005 14:07:37 -0000 1.16 +++ openacs-4/packages/contacts/catalog/contacts.de_DE.ISO-8859-1.xml 14 Nov 2005 22:55:45 -0000 1.17 @@ -1,5 +1,5 @@ - + -- eine Gruppe markieren -- -- Neue Nachricht erstellen -- @@ -83,8 +83,8 @@ KOnfigurationsfehler Kontakt Kontakt -&gt; - KOntakt ist in -> - Kontajt ist nicht in -> + Kontakt ist in -> + Kontakt ist nicht in -> Kontakt Beziehung Kontakttyp Kontakttyp eins @@ -139,6 +139,7 @@ existieren mindestens existieren h�chstens Option erweitern # %extend_id% gel�scht. + Die Ergebnisliste um die folgende Attribute erweitern Erweiterte Suchoptionen falsch Datei @@ -345,6 +346,7 @@ Mailing Adresszusammenstellung Resultate der Mail Zusammenfassung (mail merge) + Dateien an Kontakt schicken aktuell machen ver�ffentlichen Die markierten Kontakte aktuell machen @@ -355,7 +357,6 @@ Mitteilungen mein- Modifiziert durch: - Mehr Meine Nachrichten: Meine Suchen Meine Signaturen Index: openacs-4/packages/contacts/catalog/contacts.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/catalog/contacts.en_US.ISO-8859-1.xml,v diff -u -r1.48 -r1.49 --- openacs-4/packages/contacts/catalog/contacts.en_US.ISO-8859-1.xml 10 Nov 2005 22:59:40 -0000 1.48 +++ openacs-4/packages/contacts/catalog/contacts.en_US.ISO-8859-1.xml 14 Nov 2005 22:55:45 -0000 1.49 @@ -1,5 +1,5 @@ - + -- select a group -- -- Create New Message -- @@ -38,7 +38,9 @@ Advanced Searches Aggregate Aggregate by + Aggregated aggregated by: + Set it to true if you want to use this extend in "Aggregated Result Page" All All / Edit All Contacts @@ -140,6 +142,7 @@ exists at most Extend Option # %extend_id% deleted. Extend result list by + extended by: Extended Search Options False File @@ -239,6 +242,7 @@ Contact Relationships Contact Rels Employment Contact updated in the last: <strong>%interval%</strong> + The contact was removed from the group %contacts@ were deleted country code is not -> created in the last -> @@ -346,6 +350,7 @@ Mail Mail Merge Mail Merge Results + Mail to contact Make Current Make Public Make the checked contacts current Index: openacs-4/packages/contacts/lib/contacts-aggregated.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contacts-aggregated.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/lib/contacts-aggregated.adp 29 Aug 2005 22:47:58 -0000 1.1 +++ openacs-4/packages/contacts/lib/contacts-aggregated.adp 14 Nov 2005 22:55:45 -0000 1.2 @@ -1,8 +1,21 @@
- -

+ + + + + + +
+ +    + +
+
@message;noquote@
#contacts.aggregated_by# @attr_name;noquote@ + +
#contacts.extended_by# @extend_pretty_name;noquote@ +


Index: openacs-4/packages/contacts/lib/contacts-aggregated.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contacts-aggregated.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/contacts/lib/contacts-aggregated.tcl 14 Nov 2005 20:42:03 -0000 1.4 +++ openacs-4/packages/contacts/lib/contacts-aggregated.tcl 14 Nov 2005 22:55:45 -0000 1.5 @@ -1,5 +1,5 @@ set required_param_list [list attr_id search_id] -set optional_param_list [list base_url] +set optional_param_list [list base_url extend_id] set optional_unset_list [list] foreach required_param $required_param_list { @@ -23,7 +23,6 @@ # Get the search message set message [contact::search_pretty -search_id $search_id] - switch '$attr_id' { '-1' { # Search for the country in home_address @@ -57,24 +56,45 @@ -party_id "parties.party_id" \ -revision_id "revision_id"] +set extend_pretty_name "" +if { [exists_and_not_null extend_id] } { + set extend_info [db_list_of_lists get_extend_name { }] + set extend_pretty_name [lindex [lindex $extend_info 0] 0] + set extend_var_name [lindex [lindex $extend_info 0] 1] + set extend_subquery [lindex [lindex $extend_info 0] 2] + set elements [list \ + option [list \ + label "$attr_name"] \ + result [list \ + display_template { + @contacts.result@ + }] \ + $extend_var_name [list \ + label "$extend_pretty_name" \ + display_template { + "Query Result TODO" + }]] +} else { + set elements [list \ + option [list \ + label "$attr_name"] \ + result [list \ + display_template { + @contacts.result@ + } + ]] +} + + template::list::create \ -name "contacts" \ -multirow contacts \ -row_pretty_plural "" \ -actions "" \ -bulk_actions "" \ - -elements { - option { - label "$attr_name" - } - result { - display_template { - @contacts.result@ - } - } - } + -elements $elements -db_multirow -extend { result } contacts $query_name { } { +db_multirow -extend { result } contacts $query_name " " { # We get the value_id here and not in the options query since # the value_id is only present when one attribute is associated # to one option, and we want to see every option. @@ -100,6 +120,9 @@ {search_id:integer(hidden) {value $search_id} } + {aggregate_extend_id:text(hidden) + {value $extend_id} + } {aggregate_attribute_id:integer(select) {label "[_ contacts.Aggregate_by]" } {value $attr_id} @@ -108,4 +131,26 @@ } } +set extend_options [db_list_of_lists get_extend_options { }] +if { [string equal [llength $extend_options] 0] } { + set extend_id "" +} + +set extend_options [linsert $extend_options 0 [list "- - - - - - " ""]] + +ad_form -name extend -has_submit "1" -form { + {search_id:integer(hidden) + {value $search_id} + } + {aggregate_attribute_id:integer(hidden) + {value $attr_id} + } + {aggregate_extend_id:text(select) + {label "[_ contacts.Extend_result_list_by]" } + {options $extend_options} + {html { onChange document.extend.submit();}} + {value $extend_id} + } +} + Index: openacs-4/packages/contacts/lib/contacts-aggregated.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contacts-aggregated.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/contacts/lib/contacts-aggregated.xql 14 Nov 2005 20:42:03 -0000 1.3 +++ openacs-4/packages/contacts/lib/contacts-aggregated.xql 14 Nov 2005 22:55:45 -0000 1.4 @@ -146,4 +146,32 @@ + + + select + ceo.pretty_name, + ceo.extend_id + from + contact_extend_options ceo, + contact_search_extend_map csem + where + ceo.aggregated_p = 't' + and csem.extend_id = ceo.extend_id + and csem.search_id = :search_id + + + + + + select + pretty_name, + var_name, + subquery + from + contact_extend_options + where + extend_id = :extend_id + + + Index: openacs-4/packages/contacts/sql/postgresql/contacts-search-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/contacts-search-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/contacts/sql/postgresql/contacts-search-create.sql 11 Nov 2005 22:58:10 -0000 1.8 +++ openacs-4/packages/contacts/sql/postgresql/contacts-search-create.sql 14 Nov 2005 22:55:45 -0000 1.9 @@ -156,6 +156,7 @@ var_name varchar(100) unique not null, pretty_name varchar(100) not null, subquery varchar(5000) not null, + aggregated_p char default 'f' constraint check_aggregate_p check (aggregated_p in ('t','f')), description varchar(500) ); Index: openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.1d3-1.1d4.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.1d3-1.1d4.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.1d3-1.1d4.sql 14 Nov 2005 22:55:45 -0000 1.1 @@ -0,0 +1,6 @@ +ALTER TABLE contact_extend_options ADD COLUMN aggregated_p char; +ALTER TABLE contact_extend_options ALTER COLUMN aggregated_p SET DEFAULT 'f'; +ALTER TABLE contact_extend_options ADD CONSTRAINT check_aggregated_p CHECK (aggregated_p in ('t','f')); + + + Index: openacs-4/packages/contacts/tcl/contact-extend-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contact-extend-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/tcl/contact-extend-procs-postgresql.xql 8 Sep 2005 18:05:19 -0000 1.1 +++ openacs-4/packages/contacts/tcl/contact-extend-procs-postgresql.xql 14 Nov 2005 22:55:45 -0000 1.2 @@ -12,15 +12,19 @@ - insert into contact_extend_options (extend_id,var_name,pretty_name,subquery,description) - values (:extend_id,:var_name,:pretty_name,:subquery,:description) + insert into contact_extend_options (extend_id,var_name,pretty_name,subquery,description,aggregated_p) + values (:extend_id,:var_name,:pretty_name,:subquery,:description,:aggregated_p) update contact_extend_options - set var_name = :var_name, pretty_name = :pretty_name, subquery = :subquery, description = :description + set var_name = :var_name, + pretty_name = :pretty_name, + subquery = :subquery, + description = :description, + aggregated_p = :aggregated_p where extend_id = :extend_id Index: openacs-4/packages/contacts/tcl/contact-extend-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contact-extend-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/contacts/tcl/contact-extend-procs.tcl 9 Sep 2005 22:18:49 -0000 1.2 +++ openacs-4/packages/contacts/tcl/contact-extend-procs.tcl 14 Nov 2005 22:55:45 -0000 1.3 @@ -22,6 +22,7 @@ -pretty_name:required -subquery:required {-description ""} + {-aggregated_p "f"} } { Creates a new contact extend option } { @@ -36,6 +37,7 @@ -pretty_name:required -subquery:required {-description ""} + {-aggregated_p "f"} } { Updates one contact extend option } { Index: openacs-4/packages/contacts/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/index.adp,v diff -u -r1.17 -r1.18 --- openacs-4/packages/contacts/www/index.adp 20 Oct 2005 23:08:01 -0000 1.17 +++ openacs-4/packages/contacts/www/index.adp 14 Nov 2005 22:55:45 -0000 1.18 @@ -2,7 +2,12 @@

- + #contacts.Remove_default_options#: + #contacts.Go_to_search_results# -#contacts.Go_to_search_results# \ 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 -r1.3 -r1.4 --- openacs-4/packages/contacts/www/admin/ext-search-options.tcl 11 Nov 2005 22:57:08 -0000 1.3 +++ openacs-4/packages/contacts/www/admin/ext-search-options.tcl 14 Nov 2005 22:55:46 -0000 1.4 @@ -10,6 +10,7 @@ {delete_p "f"} {orderby "var_name,asc"} {search_id:multiple ""} + {aggregated_p "f"} } set page_title [_ contacts.Extended_search_opt] @@ -50,6 +51,12 @@ {html {cols 40 rows 4}} {help_text "[_ contacts.subquery_help]"} } + {aggregated_p:text(radio) + {label "Aggregated:"} + {options { {[_ contacts.True] t} {[_ contacts.False] f}}} + {value $aggregated_p} + {help_text "[_ contacts.aggregated_help]"} + } {description:text(textarea),optional,nospell {label "[_ contacts.Description]"} {html {cols 40 rows 2}} @@ -72,7 +79,8 @@ -var_name $var_name \ -pretty_name $pretty_name \ -subquery $subquery \ - -description $description + -description $description \ + -aggregated_p $aggregated_p } -select_query { select * from contact_extend_options where extend_id = :extend_id @@ -82,7 +90,8 @@ -var_name $var_name \ -pretty_name $pretty_name \ -subquery $subquery \ - -description $description + -description $description \ + -aggregated_p $aggregated_p } -after_submit { ad_returnredirect "ext-search-options" } @@ -107,6 +116,7 @@ var_name [list] \ pretty_name [list] \ subquery [list] \ + aggregated_p [list] \ description [list] template::list::create \ @@ -137,8 +147,11 @@ } subquery { label "[_ contacts.Subquery]" - html { width 45% } + html { width 35% } } + aggregated_p { + label "[_ contacts.Aggregated]" + } description { label "[_ contacts.Description]" html { width 25% } @@ -198,8 +211,11 @@ } subquery { label "[_ contacts.Subquery]" - html { width 45% } + html { width 35% } } + aggregated_p { + label "[_ contacts.Aggregated]" + } description { label "[_ contacts.Description]" html { width 25% }