Index: openacs-4/packages/contacts/contacts.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/contacts.info,v diff -u -r1.6 -r1.7 --- openacs-4/packages/contacts/contacts.info 25 May 2005 16:23:51 -0000 1.6 +++ openacs-4/packages/contacts/contacts.info 3 Jun 2005 19:58:15 -0000 1.7 @@ -1,4 +1,4 @@ - + @@ -7,18 +7,20 @@ f f - + Matthew Geddert This application lets you collaboratively view, edit and categorize contacts. 2005-05-21 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 - - + + + 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.6 -r1.7 --- openacs-4/packages/contacts/catalog/contacts.en_US.ISO-8859-1.xml 1 Jun 2005 01:27:00 -0000 1.6 +++ openacs-4/packages/contacts/catalog/contacts.en_US.ISO-8859-1.xml 3 Jun 2005 19:58:15 -0000 1.7 @@ -1,16 +1,20 @@ - + + -- select a group -- Action Add a Person Add an Organization Add Group Add Organization Add Person + Add Signature Add the selected contacts to a category Add to Category Admin + Administer Contacts Advanced Search + Advanced Searches All Answer Archive @@ -24,62 +28,19 @@ Comments Contact Contact Type - Create a Role - Current - Email Address - First Names - Groups - Help Text - Last Name - Limit Contacts to - Currently, the system is able to handle the following types of relationships: - Debugging Code - Only Visible to Site Wide Administrators - Define a new relationship type - Instance Permissions - Make sure you do not add the same attribute to multiple groups - Once ready for release this will be taken care of in code - The default group must have first_names and last_name for person objects and name for organization objects, both of them need email - Make Current - Make the checked contacts current - My Searches - Name - Number of Rows - of - Ordering - Organization - Person - Public Page - Read These - Relationships - Required - Roles - Search - Send an email message to the selected contacts - Send Email - Settings - Showing - Sort By - Status - View all roles - Widget - -- select a group -- - Add Group - Add Organization - Add Person - Add Signature - Admin - Administer Contacts - Advanced Search - Advanced Searches - Attributes - Comments Contacts Create a role Create project Create role + Current + Email Address even + First Names Groups + Help Text last + Last Name + Limit Contacts to Advanced searches are very powerful but in return they require very specific input... All searches are case insensitive, capitalization does not matter. If more than one contact match the search a list of results is returned. If only one contact meets the search criteria you are redirected to that contact. %comments.pretty_date% at %comments.pretty_time% - @@ -103,18 +64,33 @@ What role does %contact_name_one% have when %contact_name_two% is a %secondary_role_pretty%: You cannot add this contact to more groups. Mail Merge Results + Make Current + Make the checked contacts current mine- My Searches My Signatures + Name (none) Normal Searches + Number of Rows odd + of + Ordering + Organization Person PROJECT Public Page READ THESE Relationships + Required Roles + Search + Send an email message to the selected contacts + Send Email Settings + Showing + Sort By + Status View all roles + Widget Index: openacs-4/packages/contacts/tcl/contacts-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-install-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/contacts/tcl/contacts-install-procs.tcl 28 May 2005 15:44:06 -0000 1.2 +++ openacs-4/packages/contacts/tcl/contacts-install-procs.tcl 3 Jun 2005 19:58:15 -0000 1.3 @@ -1,15 +1,16 @@ ad_library { Contacts install library - + Procedures that deal with installing, instantiating, mounting. @creation-date 2005-05-26 @author Timo Hentschel (timo@timohentschel.de) @cvs-id $Id$ } -namespace contact::install +namespace eval contacts::install {} + ad_proc -public -callback contact::contact_form { {-package_id:required} {-form:required} @@ -25,101 +26,319 @@ } { } -ad_proc -public contact::install::register_attributes { +ad_proc -public contacts::install::package_instantiate { + {-package_id:required} +} { + + # We want to instantiate the contacts package so that registered + # users have some attributes mapped by default. This could be + # extended in custom packages. + + ams::widgets_init + set list_id [ams::list::new \ + -package_key "contacts" \ + -object_type "person" \ + -list_name "${package_id}__-2" \ + -pretty_name "Contacts-Person" \ + -description "" \ + -description_mime_type ""] + + set attribute_id [attribute::new \ - -object_type "person" \ - -attribute_name "last_name" \ - -datatype "string" \ - -pretty_name "#ams.person_last_name#" \ - -pretty_plural "#ams.person_last_name_plural#" \ - -table_name "" \ - -column_name "" \ - -default_value "" \ - -min_n_values "0" \ - -max_n_values "1" \ - -sort_order "1" \ - -storage "type_specific" \ - -static_p "f" \ - -if_does_not_exist] - - lang::message::register en_US ams person_last_name "First Names" + -object_type "person" \ + -attribute_name "first_names" \ + -datatype "string" \ + -pretty_name "#ams.person_first_names#" \ + -pretty_plural "#ams.person_first_names_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "0" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "type_specific" \ + -static_p "f" \ + -if_does_not_exist] + + lang::message::register en_US ams person_last_name "First Names" lang::message::register en_US ams person_last_name_plural "First Names" - - ams::attribute::new \ - -attribute_id $attribute_id \ - -widget "textbox" \ - -dynamic_p "f" - + + ams::attribute::new -attribute_id $attribute_id -widget "textbox" -dynamic_p "f" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "1" \ + -required_p "f" \ + -section_heading "" + set attribute_id [attribute::new \ - -object_type "person" \ - -attribute_name "first_names" \ - -datatype "string" \ - -pretty_name "#ams.person_first_names#" \ - -pretty_plural "#ams.person_first_names_plural#" \ - -table_name "" \ - -column_name "" \ - -default_value "" \ - -min_n_values "0" \ - -max_n_values "1" \ - -sort_order "1" \ - -storage "type_specific" \ - -static_p "f" \ - -if_does_not_exist] - - lang::message::register en_US ams person_first_names "Last Name" + -object_type "person" \ + -attribute_name "last_name" \ + -datatype "string" \ + -pretty_name "#ams.person_last_name#" \ + -pretty_plural "#ams.person_last_name_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "0" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "type_specific" \ + -static_p "f" \ + -if_does_not_exist] + + lang::message::register en_US ams person_first_names "Last Name" lang::message::register en_US ams person_first_names_plural "Last Names" - - ams::attribute::new \ - -attribute_id $attribute_id \ - -widget "textbox" \ - -dynamic_p "f" - + + ams::attribute::new -attribute_id $attribute_id -widget "textbox" -dynamic_p "f" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "2" \ + -required_p "f" \ + -section_heading "" + + set attribute_id [attribute::new \ - -object_type "party" \ - -attribute_name "email" \ - -datatype "string" \ - -pretty_name "#ams.party_email#" \ - -pretty_plural "#ams.party_email_plural#" \ - -table_name "" \ - -column_name "" \ - -default_value "" \ - -min_n_values "0" \ - -max_n_values "1" \ - -sort_order "1" \ - -storage "type_specific" \ - -static_p "f" \ - -if_does_not_exist] - + -object_type "party" \ + -attribute_name "email" \ + -datatype "string" \ + -pretty_name "#ams.party_email#" \ + -pretty_plural "#ams.party_email_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "0" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "type_specific" \ + -static_p "f" \ + -if_does_not_exist] + lang::message::register en_US ams party_email "Email Address" lang::message::register en_US ams party_email_plural "Email Addresses" - - ams::attribute::new \ - -attribute_id $attribute_id \ - -widget "email" \ - -dynamic_p "f" - + + ams::attribute::new -attribute_id $attribute_id -widget "email" -dynamic_p "f" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "3" \ + -required_p "f" \ + -section_heading "" + set attribute_id [attribute::new \ - -object_type "organization" \ - -attribute_name "name" \ - -datatype "string" \ - -pretty_name "#ams.organization_name#" \ - -pretty_plural "#ams.organization_name_plural#" \ - -table_name "" \ - -column_name "" \ - -default_value "" \ - -min_n_values "1" \ - -max_n_values "1" \ - -sort_order "1" \ - -storage "generic" \ - -static_p "f" \ - -if_does_not_exist] - + -object_type "person" \ + -attribute_name "home_address" \ + -datatype "string" \ + -pretty_name "#ams.person_address#" \ + -pretty_plural "#ams.person_address_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "1" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "generic" \ + -static_p "f" \ + -if_does_not_exist] + + lang::message::register en_US ams person_address "Home Address" + lang::message::register en_US ams person_address_plural "Home Address" + + ams::attribute::new -attribute_id $attribute_id -widget "postal_address" -dynamic_p "t" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "4" \ + -required_p "f" \ + -section_heading "" + + set attribute_id [attribute::new \ + -object_type "person" \ + -attribute_name "home_phone" \ + -datatype "string" \ + -pretty_name "#ams.home_phone#" \ + -pretty_plural "#ams.home_phone_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "1" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "generic" \ + -static_p "f" \ + -if_does_not_exist] + + lang::message::register en_US ams home_phone "Home Phone" + lang::message::register en_US ams home_phone_plural "Home Phone" + + ams::attribute::new -attribute_id $attribute_id -widget "telecom_number" -dynamic_p "t" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "5" \ + -required_p "f" \ + -section_heading "" + + set attribute_id [attribute::new \ + -object_type "person" \ + -attribute_name "mobile_phone" \ + -datatype "string" \ + -pretty_name "#ams.mobile_phone#" \ + -pretty_plural "#ams.mobile_phone_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "1" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "generic" \ + -static_p "f" \ + -if_does_not_exist] + + lang::message::register en_US ams mobile_phone "Mobile Phone" + lang::message::register en_US ams mobile_phone_plural "Mobile Phone" + + ams::attribute::new -attribute_id $attribute_id -widget "telecom_number" -dynamic_p "t" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "6" \ + -required_p "f" \ + -section_heading "" + + ################### + # + # ORGANIZATIONS + # + ################### + + set list_id [ams::list::new \ + -package_key "contacts" \ + -object_type "organization" \ + -list_name "${package_id}__-2" \ + -pretty_name "#contacts.Organization#" \ + -description "" \ + -description_mime_type ""] + + set attribute_id [attribute::new \ + -object_type "organization" \ + -attribute_name "name" \ + -datatype "string" \ + -pretty_name "#ams.organization_name#" \ + -pretty_plural "#ams.organization_name_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "1" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "generic" \ + -static_p "f" \ + -if_does_not_exist] + lang::message::register en_US ams organization_name "Organization Name" lang::message::register en_US ams organization_name_plural "Organization Names" + + ams::attribute::new -attribute_id $attribute_id -widget "textbox" -dynamic_p "t" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "1" \ + -required_p "f" \ + -section_heading "" + + set attribute_id [attribute::new \ + -object_type "person" \ + -attribute_name "organization_address" \ + -datatype "string" \ + -pretty_name "#ams.organization_address#" \ + -pretty_plural "#ams.organization_address_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "1" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "generic" \ + -static_p "f" \ + -if_does_not_exist] + + lang::message::register en_US ams organization_address "Address" + lang::message::register en_US ams organization_address_plural "Address" + + ams::attribute::new -attribute_id $attribute_id -widget "postal_address" -dynamic_p "t" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "2" \ + -required_p "f" \ + -section_heading "" + + set attribute_id [attribute::new \ + -object_type "person" \ + -attribute_name "organization_url" \ + -datatype "string" \ + -pretty_name "#ams.organization_url#" \ + -pretty_plural "#ams.organization_url_plural#" \ + -table_name "" \ + -column_name "" \ + -default_value "" \ + -min_n_values "1" \ + -max_n_values "1" \ + -sort_order "1" \ + -storage "generic" \ + -static_p "f" \ + -if_does_not_exist] + + lang::message::register en_US ams organization_url "Website" + lang::message::register en_US ams organization_url_plural "Website" + + ams::attribute::new -attribute_id $attribute_id -widget "url" -dynamic_p "t" + + ams::list::attribute::map \ + -list_id $list_id \ + -attribute_id $attribute_id \ + -sort_order "3" \ + -required_p "f" \ + -section_heading "" - ams::attribute::new \ - -attribute_id $attribute_id \ - -widget "textbox" \ - -dynamic_p "t" + # Make the registered users group mapped by default + contacts::insert_map -group_id "-2" -default_p "t" -package_id $package_id +} + +ad_proc -public contacts::insert_map { + {-group_id:required} + {-default_p:required} + {-package_id:required} +} { -} \ No newline at end of file + @author Malte Sussdorff (sussdorff@sussdorff.de) + @creation-date 2005-06-03 + + @param group_id + + @param default_p + + @param package_id + + @return + + @error +} { + + db_dml insert_map { + insert into contact_groups + (group_id,default_p,package_id) + values + (:group_id,:default_p,:package_id) + } +} Index: openacs-4/packages/contacts/www/contact.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/contacts/www/contact.adp 1 Jun 2005 05:14:11 -0000 1.7 +++ openacs-4/packages/contacts/www/contact.adp 3 Jun 2005 19:58:15 -0000 1.8 @@ -47,7 +47,7 @@

#contacts.PROJECT# - +

#contacts.lt_Last_updated_update_d#