Index: openacs-4/packages/contacts/lib/search-contact.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/search-contact.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/contacts/lib/search-contact.adp 18 Dec 2005 12:30:20 -0000 1.1
@@ -0,0 +1,8 @@
+
+
+
+
+
+
Index: openacs-4/packages/contacts/lib/search-contact.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/search-contact.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/contacts/lib/search-contact.tcl 18 Dec 2005 12:30:20 -0000 1.1
@@ -0,0 +1,33 @@
+# /packages/project-manager/lib/search-jobid.tcl
+#
+# Include that searchs for the name of a contact
+# and redirects to the found project if it's just one or to
+# first one if there are various.
+#
+# @author Miguel Marin (miguelmarin@viaro.net)
+# @author Viaro Networks www.viaro.net
+#
+# Usage:
+# ADP File:
+#
+#
+# Expects:
+# keyword The keyword to search projects
+# return_url The return_url to return if no project is found. It would be the same page if empty.
+
+if { ![exists_and_not_null return_url] } {
+ set return_url [ad_return_url]
+}
+
+set focus_message "if(this.value=='[_ contacts.search_contact]')this.value='';"
+set blur_message "if(this.value=='')this.value='[_ contacts.search_contact]';"
+
+ad_form -name search_contact -form {
+ {keyword:text(text)
+ {html {size 20 onfocus "$focus_message" onblur "$blur_message" class search_contact}}
+ {value "[_ contacts.search_contact]"}
+ }
+ {return_url:text(hidden) {value $return_url}}
+} -on_submit {
+ ad_returnredirect [export_vars -base "/contacts/" -url {{query $keyword}}]
+}
\ No newline at end of file