Index: openacs-4/packages/contacts/contacts.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/contacts.info,v
diff -u -r1.73 -r1.74
--- openacs-4/packages/contacts/contacts.info 11 May 2006 14:48:37 -0000 1.73
+++ openacs-4/packages/contacts/contacts.info 18 May 2006 18:02:59 -0000 1.74
@@ -7,14 +7,14 @@
f
f
-
+
Matthew Geddert
This application lets you collaboratively view, edit and categorize contacts.
2006-03-31
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/bin/convert.sh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/bin/Attic/convert.sh,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/contacts/bin/convert.sh 11 May 2006 13:49:02 -0000 1.4
+++ openacs-4/packages/contacts/bin/convert.sh 18 May 2006 18:02:59 -0000 1.5
@@ -4,4 +4,4 @@
# which is running on the display port. This could either be VNC or something else.
export HOME=/home/malte
-/etc/openoffice.org-2.0/program/soffice.bin -writer -headless -pt pdfconv $1 -display lektor2:1.0
\ No newline at end of file
+/etc/openoffice.org-2.0/program/soffice.bin -writer -headless -pt pdfconv $1 -display lektor:1.0
\ No newline at end of file
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.27 -r1.28
--- openacs-4/packages/contacts/catalog/contacts.de_DE.ISO-8859-1.xml 11 May 2006 14:48:37 -0000 1.27
+++ openacs-4/packages/contacts/catalog/contacts.de_DE.ISO-8859-1.xml 18 May 2006 18:02:59 -0000 1.28
@@ -1,5 +1,5 @@
-
+
-- eine Gruppe markieren --
-- Reihe hinzuf�gen --
@@ -178,6 +178,7 @@
erweitert um:
Erweiterte Suchoptionen
falsch
+ Fax
Datei
Dateien
Dateien
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.79 -r1.80
--- openacs-4/packages/contacts/catalog/contacts.en_US.ISO-8859-1.xml 11 May 2006 14:48:37 -0000 1.79
+++ openacs-4/packages/contacts/catalog/contacts.en_US.ISO-8859-1.xml 18 May 2006 18:02:59 -0000 1.80
@@ -1,5 +1,5 @@
-
+
-- select a group --
-- add column --
@@ -178,6 +178,7 @@
extended by:
Extended Search Options
False
+ Fax
File
Files
files
Index: openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql 4 May 2006 12:01:47 -0000 1.9
+++ openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql 18 May 2006 18:02:59 -0000 1.10
@@ -4,21 +4,39 @@
select rel_id, other_name, other_party_id, role_singular, rel_type, creation_date
- from ( select CASE WHEN object_id_one = :party_id THEN contact__name(object_id_two,'t') ELSE contact__name(object_id_one,'t') END as other_name,
- CASE WHEN object_id_one = :party_id THEN object_id_two ELSE object_id_one END as other_party_id,
- CASE WHEN object_id_one = :party_id THEN role_two ELSE role_one END as role,
- CASE WHEN object_id_one = :party_id THEN acs_rel_type__role_pretty_name(role_two) ELSE acs_rel_type__role_pretty_name(role_one) END as role_singular,
+ from ( select contact__name(object_id_two,'t') as other_name,
+ object_id_two as other_party_id,
+ role_two as role,
+ pretty_name as role_singular,
acs_rels.rel_id, acs_rels.rel_type
- from acs_rels,
- acs_rel_types
+ from acs_rels,
+ acs_rel_types,
+ acs_rel_roles,
+ group_distinct_member_map
where acs_rels.rel_type = acs_rel_types.rel_type
- and acs_objects.object_id = acs_rels.rel_id
- and ( object_id_one = :party_id or object_id_two = :party_id )
+ and object_id_one = :party_id
+ and acs_rel_types.role_two = acs_rel_roles.role
+ and object_id_two = group_distinct_member_map.member_id
+ and group_distinct_member_map.group_id in ('-2')
and acs_rels.rel_type in ( select object_type from acs_object_types where supertype = 'contact_rel')
- ) rels_temp, acs_objects, group_distinct_member_map
- where rels_temp.rel_id = acs_objects.object_id
- and rels_temp.other_party_id = group_distinct_member_map.member_id
- and group_distinct_member_map.group_id in ([template::util::tcl_to_sql_list [contacts::default_groups]])
+ union
+ select contact__name(object_id_one,'t') as other_name,
+ object_id_one as other_party_id,
+ role_one as role,
+ pretty_name as role_singular,
+ acs_rels.rel_id, acs_rels.rel_type
+ from acs_rels,
+ acs_rel_types,
+ acs_rel_roles,
+ group_distinct_member_map
+ where acs_rels.rel_type = acs_rel_types.rel_type
+ and object_id_two = :party_id
+ and acs_rel_types.role_one = acs_rel_roles.role
+ and object_id_one = group_distinct_member_map.member_id
+ and group_distinct_member_map.group_id in ('-2')
+ and acs_rels.rel_type in ( select object_type from acs_object_types where supertype = 'contact_rel')
+ ) rels_temp, acs_objects
+where rels_temp.rel_id = acs_objects.object_id
order by upper(role_singular) asc, $sort_order
Index: openacs-4/packages/contacts/lib/email.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/email.tcl,v
diff -u -r1.26 -r1.27
--- openacs-4/packages/contacts/lib/email.tcl 18 May 2006 13:37:58 -0000 1.26
+++ openacs-4/packages/contacts/lib/email.tcl 18 May 2006 18:02:59 -0000 1.27
@@ -25,6 +25,11 @@
set no_callback_p f
}
+if {[exists_and_not_null context_id]} {
+ set object_id $context_id
+}
+
+ns_log Notice "MY CONTEXT:: $context_id MY OBJECT $object_id"
# Somehow when the form is submited the party_ids values became
# only one element of a list, this avoid that problem
@@ -162,6 +167,7 @@
{upload_file:file(file),optional
{label "[_ contacts.Upload_file]"}
}
+ {object_id:integer(hidden),optional}
}
if { [exists_and_not_null item_id] } {
@@ -292,7 +298,7 @@
-mime_type $mime_type \
-object_id $object_id \
-no_callback_p $no_callback_p \
- -single_email
+ -single_email
# Link the files to all parties
if {[exists_and_not_null revision_id]} {
Index: openacs-4/packages/contacts/sql/postgresql/contacts-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/contacts-package-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/contacts/sql/postgresql/contacts-package-create.sql 29 Jan 2006 16:11:29 -0000 1.6
+++ openacs-4/packages/contacts/sql/postgresql/contacts-package-create.sql 18 May 2006 18:02:59 -0000 1.7
@@ -185,26 +185,29 @@
declare
p_party_id alias for $1;
p_recursive_p alias for $2;
- v_first_names varchar;
- v_last_name varchar;
- v_organization varchar;
v_name varchar;
begin
- select first_names, last_name
- into v_first_names, v_last_name
- from persons where person_id = p_party_id;
-
select name
- into v_organization
+ into v_name
from organizations where organization_id = p_party_id;
- v_name := contact__name(v_first_names,v_last_name,v_organization,p_recursive_p);
+ if v_name is null then
+ if p_recursive_p = ''t'' then
+ select last_name || '', '' || first_names
+ into v_name
+ from persons where person_id = p_party_id;
+ else
+ select first_names || '' '' || last_name
+ into v_name
+ from persons where person_id = p_party_id;
+ end if;
+
+ end if;
return v_name;
end;' language 'plpgsql';
-
create or replace function contact_group__member_count (
integer -- group_id
) returns integer
Index: openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.2b11-1.2b12.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.2b11-1.2b12.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.2b11-1.2b12.sql 18 May 2006 18:03:00 -0000 1.1
@@ -0,0 +1,30 @@
+create or replace function contact__name (
+ integer, -- party_id
+ boolean -- recursive_p
+) returns varchar
+as '
+declare
+ p_party_id alias for $1;
+ p_recursive_p alias for $2;
+ v_name varchar;
+begin
+
+ select name
+ into v_name
+ from organizations where organization_id = p_party_id;
+
+ if v_name is null then
+
+ if p_recursive_p = ''t'' then
+ select last_name || '', '' || first_names
+ into v_name
+ from persons where person_id = p_party_id;
+ else
+ select first_names || '' '' || last_name
+ into v_name
+ from persons where person_id = p_party_id;
+ end if;
+
+ end if;
+ return v_name;
+end;' language 'plpgsql';
Index: openacs-4/packages/contacts/www/message.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/message.adp,v
diff -u -r1.23 -r1.24
--- openacs-4/packages/contacts/www/message.adp 16 May 2006 12:33:43 -0000 1.23
+++ openacs-4/packages/contacts/www/message.adp 18 May 2006 18:03:00 -0000 1.24
@@ -38,6 +38,8 @@
title=@title@
cc=@cc@
bcc=@bcc@
+ context_id=@context_id@
+ object_od=@object_id@
>
Index: openacs-4/packages/contacts/www/message.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/message.tcl,v
diff -u -r1.31 -r1.32
--- openacs-4/packages/contacts/www/message.tcl 16 May 2006 12:33:43 -0000 1.31
+++ openacs-4/packages/contacts/www/message.tcl 18 May 2006 18:03:00 -0000 1.32
@@ -190,6 +190,8 @@
}
}
}
+} else {
+ set object_id ""
}
if {[exists_and_not_null file_list]} {
@@ -201,6 +203,8 @@
party_ids:text(hidden)
return_url:text(hidden)
folder_id:text(hidden)
+ object_id:text(hidden)
+ context_id:text(hidden)
{to_name:text(inform),optional {label "[_ contacts.Recipients]"} {value $recipients}}
}