Index: openacs-4/packages/dotfolio/catalog/dotfolio.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/catalog/dotfolio.en_US.ISO-8859-1.xml,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/dotfolio/catalog/dotfolio.en_US.ISO-8859-1.xml	16 Sep 2005 03:10:22 -0000	1.9
+++ openacs-4/packages/dotfolio/catalog/dotfolio.en_US.ISO-8859-1.xml	16 Sep 2005 13:18:15 -0000	1.10
@@ -46,6 +46,7 @@
   <msg key="dotfolio_props_for">dotFOLIO properties for this user.</msg>
   <msg key="email">Email</msg>
   <msg key="return_to">Return to</msg>
+  <msg key="user_search">User Search</msg>
   <msg key="some_of_the_emails_failed">Some of the emails failed. Those users had random passwords generated for them, however. The best way to proceed is to have these users log in and ask them to click on 'I have forgotten my password'.</msg>
   <msg key="database_choked">&lt;p&gt;Database error while trying to create the last user in the list above!&lt;br&gt; The transaction has been aborted, no users have been entered, and no e-mail notifications have been sent.&lt;p&gt;</msg>
   <msg key="screen_name">Screen name</msg>
@@ -83,6 +84,9 @@
   <msg key="creating_user">Creating user</msg>
   <msg key="create_a_new_user">Create A New User</msg>
   <msg key="search_users">Search Users</msg>
+  <msg key="search">Search</msg>
+  <msg key="search_results">Search Results</msg>
+  <msg key="search_help_text">Search for users by entering a name or email.</msg>
   <msg key="bulk_upload">Bulk Upload</msg>
   <msg key="bulk_uploading">Bulk uploading in progress.</msg>
   <msg key="upload">Upload</msg>
@@ -93,6 +97,7 @@
   <msg key="create_several_users_at_once">Here you can create several users at once using a correctly formatted CSV (comma-separated values) file.  You can create a spreadsheet and save it as a CSV file to import here.</msg>
   <msg key="use_valid_email_address">Be sure to use valid email addresses since the process will send the new user's password to the given email address.</msg>
   <msg key="no_users">No Users</msg>
+  <msg key="no_users_found">No users found</msg>
   <msg key="fields">Fields</msg>
   <msg key="required">Required</msg>
   <msg key="upload_formatted_csv">Upload Formatted CSV File</msg>
Index: openacs-4/packages/dotfolio/www/admin/search-users-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/search-users-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/search-users-postgresql.xql	16 Sep 2005 13:18:15 -0000	1.1
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<queryset>
+  <rdbms><type>postgresql</type><version>7.1</version></rdbms>
+
+  <fullquery name="get_users">
+    <querytext>
+      SELECT DISTINCT user_id, username, first_names, last_name, email, pretty_type as user_type
+          FROM dotfolio_users
+          WHERE (lower(email) LIKE lower('%' || :q || '%') OR
+                 lower(first_names) LIKE lower('%' || :q || '%') OR
+                 lower(last_name) LIKE lower('%' || :q || '%') OR
+                 lower(username) LIKE lower('%' || :q || '%'))
+    </querytext>
+  </fullquery>
+</queryset>
\ No newline at end of file
Index: openacs-4/packages/dotfolio/www/admin/search-users.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/search-users.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/search-users.adp	16 Sep 2005 13:18:15 -0000	1.1
@@ -0,0 +1,62 @@
+<master src="dotfolio-admin-master">
+<property name="title">@title@</property>
+<property name="context_bar">@context_bar@</property>
+
+<center>
+<if @is_request@ ne 0>
+  <formtemplate id="search_users">
+    <table cellspacing="2" cellpadding="2" border="0">
+      <tr class="form-element">
+        <td class="form-label">#dotfolio.search#</td>
+        <td class="form-widget">
+          <formwidget id="q"></formwidget>
+          <div class="form-help-text">
+            <img src="/shared/images/info.gif" width="12" height="9" alt="[i]" title="Help text" border="0">
+            #dotfolio.search_help_text#
+          </div>
+        </td>
+      </tr>
+      <tr class="form-element">
+        <td align="left" colspan="2">
+          <input type="submit" name="formbutton:ok" value="       OK       " />
+        </td>
+      </tr>
+    </table>
+  </formtemplate>
+</if>
+<else>
+  <table class="list" cellpadding="3" cellspacing="3">
+    <tr class="list-header">
+      <th class="list">#dotfolio.name#</th>
+      <th class="list">#dotfolio.Username#</th>
+      <th class="list">#dotfolio.user_type#</th>
+    </tr>
+  <if @users:rowcount@ eq 0>
+    <tr class="list-odd last"><td colspan="3" align="center">#dotfolio.no_users_found#</td></tr>
+  </if>
+  <multiple name="users">
+    <if @users.rownum@ lt @users:rowcount@>
+      <if @users.rownum@ odd>
+        <tr class="list-odd">
+      </if>
+      <else>
+        <tr class="list-even">
+      </else>
+    </if>
+    <else>
+      <if @users.rownum@ odd>
+        <tr class="list-odd last">
+      </if>
+      <else>
+        <tr class="list-even last">
+      </else>
+    </else>
+      <td>@users.last_name;noquote@, @users.first_names;noquote@ (<a href="mailto:@users.email@">@users.email@</a>)</td>
+      <td>@users.username;noquote@</td>
+      <td>@users.user_type;noquote@</td>
+    </tr>
+    </if>
+  </multiple>
+  </table>
+</else>
+</center>
\ No newline at end of file
Index: openacs-4/packages/dotfolio/www/admin/search-users.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/search-users.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/search-users.tcl	16 Sep 2005 13:18:15 -0000	1.1
@@ -0,0 +1,51 @@
+#
+#  Copyright (C) 2005 Nick Carroll
+#
+#  This file is part of dotFOLIO.
+#
+#  dotFOLIO is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License as published by the
+#  Free Software Foundation; either version 2 of the License, or (at your 
+#  option) any later version.
+#
+#  dotFOLIO is distributed in the hope that it will be useful, but WITHOUT ANY
+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+#  details.
+#
+
+ad_page_contract {
+    Search for users.
+
+    @author Nick Carroll (ncarroll@ee.usyd.edu.au)
+    @creation-date 2005-09-16
+    @version $Id: search-users.tcl,v 1.1 2005/09/16 13:18:15 ncarroll Exp $
+}
+
+set title [_ dotfolio.search_users]
+set context_bar [list [_ dotfolio.user_search]]
+
+ad_form -name fred -form {
+    {query:text {label "hello"} {help_text "hello world this is help"} {html {size 30}}}
+}
+
+form create search_users
+
+element create search_users q \
+    -label "Search" \
+    -help_text "Search for a user based on a name or email." \
+    -html {size 40} \
+    -datatype text \
+    -widget text \
+    -optional
+
+set is_request [form is_request search_users]
+
+if {[form is_valid search_users]} {
+    set title [_ dotfolio.search_results]
+
+    form get_values search_users q
+    db_multirow users get_users {}
+}
+
+ad_return_template
Index: openacs-4/packages/dotfolio/www/admin/users.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/users.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotfolio/www/admin/users.adp	5 May 2005 08:51:32 -0000	1.1
+++ openacs-4/packages/dotfolio/www/admin/users.adp	16 Sep 2005 13:18:15 -0000	1.2
@@ -23,7 +23,7 @@
 [<small>
   <a href="user-add?referer=@referer@"><small>#dotfolio.create_a_new_user#</small></a> 
   |
-  <a href="users-search"><small>#dotfolio.search_users#</small></a>
+  <a href="search-users"><small>#dotfolio.search_users#</small></a>
   |
   <a href="users-bulk-upload"><small>#dotfolio.bulk_upload#</small></a>
 </small>]