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.15 -r1.16
--- openacs-4/packages/contacts/lib/contact-complaint-form.tcl 20 Feb 2006 22:01:02 -0000 1.15
+++ openacs-4/packages/contacts/lib/contact-complaint-form.tcl 8 Nov 2006 18:36:33 -0000 1.16
@@ -3,6 +3,11 @@
# If supplier_id equals "-100" then a null value is inserted
# project_id. Alternative for the customer_id, if you know the project_id
+# 2006/11/03 cognovis/nfl: project_id was never used - it seems to be just the remark above :-)
+# now, if a project_id was given, the title gets the value of the project title (content::item::get_title)
+# note: the project_id is an item_id
+
+
if { ![info exist return_url] } {
set return_url [get_referrer]
}
@@ -20,11 +25,17 @@
set complaint_rev_id $complaint_id
}
+set title_default_value ""
+if { [info exist project_id] } {
+ set title_default_value [lang::util::localize [content::item::get_title -item_id $project_id]]
+}
+
ad_form -mode $mode -name complaint_form -form {
complaint_id:key
{title:text(text)
{label "[_ contacts.Title_1]"}
{help_text "[_ contacts.complaint_title_help]"}
+ {value $title_default_value}
}
{return_url:text(hidden)
{value $return_url}
Index: openacs-4/packages/contacts/lib/contacts.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contacts.tcl,v
diff -u -r1.69 -r1.70
--- openacs-4/packages/contacts/lib/contacts.tcl 8 Sep 2006 12:10:18 -0000 1.69
+++ openacs-4/packages/contacts/lib/contacts.tcl 8 Nov 2006 18:36:33 -0000 1.70
@@ -281,7 +281,7 @@
}
append name_label [join $page_size_list " | "]
-if { [string is true [parameter::get -parameter "DisableCSV" -default "0"]] } {
+if { [string is true [parameter::get -parameter "DisableCSV" -default "0"]] || ![acs_user::site_wide_admin_p] } {
set format normal
} else {
append name_label " [_ contacts.Get]: [_ contacts.CSV]"
Index: openacs-4/packages/contacts/www/complaint-ae.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/complaint-ae.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/contacts/www/complaint-ae.adp 5 Oct 2005 22:14:17 -0000 1.3
+++ openacs-4/packages/contacts/www/complaint-ae.adp 8 Nov 2006 18:36:33 -0000 1.4
@@ -2,5 +2,4 @@
@supplier_id@
-
+supplier_id="@supplier_id@" customer_id="@customer_id@" complaint_object_id ="@object_id@" project_id="@project_id@">