Index: openacs-4/packages/contacts/lib/contact-relationships-portlet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships-portlet.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/contacts/lib/contact-relationships-portlet.adp 28 Dec 2005 12:38:11 -0000 1.3
+++ openacs-4/packages/contacts/lib/contact-relationships-portlet.adp 28 Apr 2006 10:15:08 -0000 1.4
@@ -9,7 +9,7 @@
-
+
|
Index: openacs-4/packages/contacts/lib/contact-relationships-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships-portlet.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/contacts/lib/contact-relationships-portlet.tcl 20 Feb 2006 22:01:02 -0000 1.4
+++ openacs-4/packages/contacts/lib/contact-relationships-portlet.tcl 28 Apr 2006 10:15:08 -0000 1.5
@@ -2,3 +2,6 @@
set portlet_layout [parameter::get -parameter "DefaultPortletLayout"]
set relations_url "[contact::url -party_id $party_id]relationships"
+if {![exists_and_not_null sort_by_date_p]} {
+ set sort_by_date_p 0
+}
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.6 -r1.7
--- openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql 27 Apr 2006 06:37:21 -0000 1.6
+++ openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql 28 Apr 2006 10:15:08 -0000 1.7
@@ -18,7 +18,7 @@
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, upper(other_name)
+ order by upper(role_singular) asc, $sort_order
Index: openacs-4/packages/contacts/lib/contact-relationships.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/contacts/lib/contact-relationships.tcl 27 Apr 2006 06:37:21 -0000 1.9
+++ openacs-4/packages/contacts/lib/contact-relationships.tcl 28 Apr 2006 10:15:08 -0000 1.10
@@ -22,6 +22,17 @@
set package_id [ad_conn package_id]
}
+
+if {![exists_and_not_null sort_by_date_p]} {
+ set sort_by_date_p 0
+}
+
+if {$sort_by_date_p} {
+ set sort_order "creation_date desc"
+} else {
+ set sort_order upper(other_name)
+}
+
multirow create rels relationship relation_url contact contact_url attribute value creation_date
set groups_belonging_to [db_list get_party_groups { select group_id from group_distinct_member_map where member_id = :party_id and group_id > 0}]
Index: openacs-4/packages/contacts/www/contact.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact.adp,v
diff -u -r1.41 -r1.42
--- openacs-4/packages/contacts/www/contact.adp 4 Mar 2006 22:58:41 -0000 1.41
+++ openacs-4/packages/contacts/www/contact.adp 28 Apr 2006 10:15:08 -0000 1.42
@@ -3,7 +3,7 @@