Index: openacs-4/packages/contacts/contacts.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/contacts.info,v diff -u -r1.40 -r1.41 --- openacs-4/packages/contacts/contacts.info 19 Oct 2005 16:59:27 -0000 1.40 +++ openacs-4/packages/contacts/contacts.info 20 Oct 2005 16:05:31 -0000 1.41 @@ -43,7 +43,7 @@ " section_name="Templates"/> - + 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.14 -r1.15 --- openacs-4/packages/contacts/catalog/contacts.de_DE.ISO-8859-1.xml 4 Oct 2005 08:48:36 -0000 1.14 +++ openacs-4/packages/contacts/catalog/contacts.de_DE.ISO-8859-1.xml 20 Oct 2005 16:05:33 -0000 1.15 @@ -1,5 +1,5 @@ - + -- eine Gruppe markieren -- -- Neue Nachricht erstellen -- @@ -75,6 +75,7 @@ Was ist der Status der Beschwerde Kurze Bezeichnung, um die Beschwerde zu identifizieren Umsatz, der mit dem Kunden im Bezug auf diese Beschwerde gemacht wurde + Beschwerden/Reklamationen: KOnfigurationsfehler Kontakt Kontakt -> @@ -114,7 +115,7 @@ enth�lt nicht -> existiert nicht Erledigt - �ndern + Bearbeiten Eine Signatur ver�ndern Beschwerde ver�ndern Details �ndern @@ -142,6 +143,7 @@ Fu�zeile Von Lade + Glossare Suche Zu den Suchergebnissen gehen Gruppe @@ -156,7 +158,7 @@ Historie Suchen in der Suche - ung�ltig + Unberechtigt ung�ltiger Objekttyp irrelevant ist -> @@ -362,6 +364,7 @@ object_id ungerade von + Angebote Offen oder Reihenfolge @@ -395,6 +398,7 @@ Prozesse PROJEKT Projekt: + Projekte �ffentlicher �ffentliche Nachrichten �ffentliche Seite @@ -458,9 +462,9 @@ Betreff muss ausgef�llt werden (Unter)Abfrage Die (Unter)Abfrage, die durchgef�hrt wird, um das Ergebnis zu holen. - Zusammenfassung + �bersicht �berblick - Freelancer: + Bearbeiter: Tabelle Aufgaben Die spezifizierte Aktion ist ung�ltig @@ -476,10 +480,10 @@ Dieser "Variablen Name" existiert schon Zeiten Titel - Titel: + Grund: zu richtig - Umsatz: + Auftragswert: Typ Update Update Dateinamen @@ -488,7 +492,7 @@ Datei hochladen Mehrere Dateien uploaden Informationen zu dem User Account - G�ltig + Berechtigt Variablen Name Name der Variable, die in der erweiterten Suche verwendent werden soll. Alle Rollen ansehen Index: openacs-4/packages/contacts/lib/contact-complaint-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-complaint-form.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/contacts/lib/contact-complaint-form.tcl 16 Oct 2005 12:43:54 -0000 1.13 +++ openacs-4/packages/contacts/lib/contact-complaint-form.tcl 20 Oct 2005 16:05:33 -0000 1.14 @@ -47,7 +47,7 @@ set emp_options [list] lappend emp_options [list "- - - - - -" ""] set employee_list [contact::util::get_employees -organization_id $customer_id] - foreach employee_id $employee_list { + foreach emp_id $employee_list { set emp_name [contact::name -party_id $emp_id] append emp_name " ([contact::email -party_id $emp_id])" lappend emp_options [list $emp_name $emp_id] Index: openacs-4/packages/contacts/lib/mail-tracking-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/mail-tracking-portlet.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/lib/mail-tracking-portlet.adp 19 Oct 2005 17:01:38 -0000 1.1 +++ openacs-4/packages/contacts/lib/mail-tracking-portlet.adp 20 Oct 2005 16:05:33 -0000 1.2 @@ -9,7 +9,7 @@ Index: openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl 19 Oct 2005 18:06:35 -0000 1.16 +++ openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl 20 Oct 2005 16:05:34 -0000 1.17 @@ -157,12 +157,23 @@ @error } { set community_id [dotlrn_community::get_community_id] - - set contact_organizations [application_data_link::get_linked -from_object_id $community_id -to_object_type "organization"] - - set contact_list "" - foreach party_id $contact_organizations { - set contact_list [concat $contact_list [contact::util::get_employees -organization_id $party_id]] + set project_id [wieners::process::project_from_project_folder -folder_id $folder_id] + + if {[empty_string_p $project_id]} { + # no project -> mail to all organization contacts + set contact_organizations [application_data_link::get_linked -from_object_id $community_id -to_object_type "organization"] + set contact_list "" + foreach party_id $contact_organizations { + set contact_list [concat $contact_list [contact::util::get_employees -organization_id $party_id]] + } + } else { + # project -> mail to project contact + db_1row get_project_contact { + select p.contact_id as contact_list + from pm_projects p, cr_items i + where i.latest_revision = p.project_id + and i.item_id = :project_id + } } if {[exists_and_not_null contact_list]} { @@ -171,9 +182,15 @@ upvar party_ids contact_ids_loc set contact_ids_loc $contact_list upvar return_url return_loc - set return_loc "/contacts/$party_id" + # set return_loc "/contacts/$party_id" lappend local_var "Mail to contact" "/contacts/message" "Mail to contact" lappend local_list "party_ids" + + if {![empty_string_p $project_id]} { + lappend local_list "context_id" + upvar context_id context_id + set context_id $project_id + } } } Index: openacs-4/packages/contacts/www/mail-tracking.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/mail-tracking.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/www/mail-tracking.adp 19 Oct 2005 17:01:38 -0000 1.1 +++ openacs-4/packages/contacts/www/mail-tracking.adp 20 Oct 2005 16:05:34 -0000 1.2 @@ -1,2 +1,3 @@ + @party_id@ - \ No newline at end of file + \ No newline at end of file Index: openacs-4/packages/contacts/www/mail-tracking.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/mail-tracking.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/www/mail-tracking.tcl 19 Oct 2005 17:01:38 -0000 1.1 +++ openacs-4/packages/contacts/www/mail-tracking.tcl 20 Oct 2005 16:05:34 -0000 1.2 @@ -3,14 +3,17 @@ @author Al-Faisal El-Dajani (faisal.dajani@gmail.com) @creation-date 2005-10-18 } { - {party_id:integer} + {party_id ""} +} -} -validate { - contact_exists -requires {party_id} { - if {![contact::exists_p -party_id $party_id]} { - ad_complain "[_ contacts.lt_The_contact_specified]" - } +foreach optional_param {sender_id recipient_id page page_size page_flush_p orderby object_id} { + if {![info exists $optional_param]} { + set $optional_param {} } } -#?? + +if {![exists_and_not_null party_id]} { + set party_id $sender_id +} + ad_return_template \ No newline at end of file