Index: openacs-4/packages/contacts/lib/contacts.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contacts.tcl,v
diff -u -r1.37 -r1.38
--- openacs-4/packages/contacts/lib/contacts.tcl 14 Dec 2005 17:26:53 -0000 1.37
+++ openacs-4/packages/contacts/lib/contacts.tcl 31 Dec 2005 07:39:39 -0000 1.38
@@ -93,22 +93,32 @@
}
+set last_modified_join ""
+set last_modified_clause ""
+
switch $orderby {
"first_names,asc" {
- set name_label "[_ contacts.Sort_by]: [_ contacts.First_Names] | [_ contacts.Last_Name] | [_ contacts.Organization]"
+ set name_label "[_ contacts.Sort_by]: [_ contacts.First_Names] | [_ contacts.Last_Name] | [_ contacts.Organization] | [_ contacts.Last_Modified]"
set left_join "left join persons on (parties.party_id = persons.person_id)"
set sort_item "lower(first_names)"
}
"last_name,asc" {
- set name_label "[_ contacts.Sort_by] [_ contacts.First_Names] | [_ contacts.Last_Name] | [_ contacts.Organization]"
+ set name_label "[_ contacts.Sort_by] [_ contacts.First_Names] | [_ contacts.Last_Name] | [_ contacts.Organization] | [_ contacts.Last_Modified]"
set left_join "left join persons on (parties.party_id = persons.person_id)"
set sort_item "lower(last_name)"
}
"organization,asc" {
- set name_label "[_ contacts.Sort_by] [_ contacts.First_Names] | [_ contacts.Last_Name] | [_ contacts.Organization]"
+ set name_label "[_ contacts.Sort_by] [_ contacts.First_Names] | [_ contacts.Last_Name] | [_ contacts.Organization] | [_ contacts.Last_Modified]"
set left_join "left join organizations on (parties.party_id = organizations.organization_id)"
set sort_item "lower(organizations.name)"
}
+ "last_modified,desc" {
+ set name_label "[_ contacts.Sort_by] [_ contacts.First_Names] | [_ contacts.Last_Name] | [_ contacts.Organization] | [_ contacts.Last_Modified]"
+ set left_join "left join organizations on (parties.party_id = organizations.organization_id)"
+ set sort_item "acs_objects.last_modified"
+ set last_modified_join "acs_objects, "
+ set last_modified_clause "and parties.party_id = acs_objects.object_id"
+ }
}
append name_label " [_ contacts.Show]: "
@@ -282,18 +292,23 @@
first_names {
label "[_ contacts.First_Name]"
orderby_asc "lower(first_names) asc"
- orderby_desc "lower(first_names) asc"
+ orderby_desc "lower(first_names) desc"
}
last_name {
label "[_ contacts.Last_Name]"
orderby_asc "lower(last_name) asc"
- orderby_desc "lower(last_name) asc"
+ orderby_desc "lower(last_name) desc"
}
organization {
- label "[_ contacts.Last_Name]"
+ label "[_ contacts.Organization]"
orderby_asc "lower(organizations.name) asc"
- orderby_desc "lower(organizations.name) asc"
+ orderby_desc "lower(organizations.name) desc"
}
+ last_modified {
+ label "[_ contacts.Last_Modified]"
+ orderby_asc "acs_objects.last_modified asc"
+ orderby_desc "acs_objects.last_modified desc"
+ }
default_value first_names,asc
} -formats {