Index: openacs-4/packages/ecommerce/www/admin/customer-service/picklists.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/picklists.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ecommerce/www/admin/customer-service/picklists.adp	24 Aug 2008 22:29:29 -0000	1.1
@@ -0,0 +1,14 @@
+<master>
+  <property name="doc(title)">@title;noquote@</property>
+  <property name="context">@context;noquote@</property>
+<h2>@title@</h2>
+
+<p>These items will appear in the pull-down menus for customer service data entry.
+These also determine which items are singled out in reports (items not in these
+lists will be grouped together under "all others").
+</p>
+<if @picklist_item_counter@ gt 0>
+  @picklist_list_html;noquote@
+</if><else>
+  <p>No items have been added.  @picklist_list_html;noquote@</p>
+</else>
Index: openacs-4/packages/ecommerce/www/admin/customer-service/picklists.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/picklists.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/ecommerce/www/admin/customer-service/picklists.tcl	18 Aug 2008 11:02:23 -0000	1.4
+++ openacs-4/packages/ecommerce/www/admin/customer-service/picklists.tcl	24 Aug 2008 22:29:29 -0000	1.5
@@ -1,5 +1,4 @@
 # picklists.tcl
-
 ad_page_contract {
     To add a new picklist, just add an element to picklist_list;
     all UI changes on this page will be taken care of automatically
@@ -9,79 +8,45 @@
     @author ported by Jerry Asher (jerry@theashergroup.com)
 } {
 }
-# 
+ 
 ad_require_permission [ad_conn package_id] admin
 
-append doc_body "[ad_admin_header "Picklist Management"]
-<h2>Picklist Management</h2>
+set title  "Picklist Management"
+set context [list [list index "Customer Service"] $title]
 
-[ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Service Administration"] "Picklist Management"]
-
-<hr>
-These items will appear in the pull-down menus for customer service data entry.
-These also determine which items are singled out in reports (items not in these
-lists will be grouped together under \"all others\").
-
-<blockquote>
-"
-
-
-
 set picklist_list [list [list issue_type "Issue Type"] [list info_used "Information used to respond to inquiry"] [list interaction_type "Inquired Via"]]
 
 set picklist_counter 0
+set picklist_list_html ""
 foreach picklist $picklist_list {
     if { $picklist_counter != 0 } {
-	append doc_body "</table>
-	</blockquote>
-	"
+        append picklist_list_html "</table>\n"
     }
-    append doc_body "<h3>[lindex $picklist 1]</h3>
-    <blockquote>
-    <table>
-    "
+    append picklist_list_html "<h3>[lindex $picklist 1]</h3><table>\n"
     set picklist_name [lindex $picklist 0]
     set sql "select picklist_item_id, picklist_item, picklist_name, sort_key
-    from ec_picklist_items
-    where picklist_name=:picklist_name
-    order by sort_key"
-    
+     from ec_picklist_items
+     where picklist_name=:picklist_name
+     order by sort_key"
     set picklist_item_counter 0
     set old_picklist_item_id ""
     set old_picklist_sort_key ""
-
     db_foreach get_picklists $sql {
-	incr picklist_item_counter
-	
-	if { ![empty_string_p $old_picklist_item_id] } {
-	    append doc_body "<td> &nbsp;&nbsp;<font face=\"MS Sans Serif, arial,helvetica\"  size=1><a href=\"picklist-item-add?prev_sort_key=$old_sort_key&next_sort_key=$sort_key&picklist_name=[ns_urlencode [lindex $picklist 0]]\">insert after</a> &nbsp;&nbsp; <a href=\"picklist-item-swap?picklist_item_id=$old_picklist_item_id&next_picklist_item_id=$picklist_item_id&sort_key=$old_sort_key&next_sort_key=$sort_key\">swap with next</a></font></td></tr>"
-	}
-	set old_picklist_item_id $picklist_item_id
-	set old_sort_key $sort_key
-	append doc_body "<tr><td>$picklist_item_counter. $picklist_item</td>
-	<td><font face=\"MS Sans Serif, arial,helvetica\"  size=1><a href=\"picklist-item-delete?picklist_item_id=$picklist_item_id\">delete</a></font></td>\n"
-
+        incr picklist_item_counter
+        if { ![empty_string_p $old_picklist_item_id] } {
+            append picklist_list_html "<td> &nbsp; <a href=\"picklist-item-add?prev_sort_key=$old_sort_key&next_sort_key=$sort_key&picklist_name=[ns_urlencode [lindex $picklist 0]]\">insert after</a> &nbsp;&nbsp; <a href=\"picklist-item-swap?picklist_item_id=$old_picklist_item_id&next_picklist_item_id=$picklist_item_id&sort_key=$old_sort_key&next_sort_key=$sort_key\">swap with next</a></td></tr>"
+        }
+        set old_picklist_item_id $picklist_item_id
+        set old_sort_key $sort_key
+        append picklist_list_html "<tr><td>$picklist_item_counter. $picklist_item</td><td><a href=\"picklist-item-delete?picklist_item_id=$picklist_item_id\">delete</a></td>"
     }
-    
     if { $picklist_item_counter != 0 } {
-	append doc_body "<td> &nbsp;&nbsp;<font face=\"MS Sans Serif, arial,helvetica\"  size=1><a href=\"picklist-item-add?prev_sort_key=$old_sort_key&next_sort_key=[expr $old_sort_key + 512]&picklist_name=[ns_urlencode [lindex $picklist 0]]\">insert after</a></font></td></tr>
-	"
-    } else {
-	append doc_body "You haven't added any items.  <a href=\"picklist-item-add?prev_sort_key=1&next_sort_key=512&picklist_name=[ns_urlencode [lindex $picklist 0]]\">Add a picklist item.</a>\n"
-    }
-
+        append picklist_list_html "<td> &nbsp; <a href=\"picklist-item-add?prev_sort_key=$old_sort_key&next_sort_key=[expr $old_sort_key + 512]&picklist_name=[ns_urlencode [lindex $picklist 0]]\">insert after</a></td></tr>\n"
+    } 
     incr picklist_counter
 }
+append picklist_list_html "</table>\n"
 
-if { $picklist_counter != 0 } {
-    append doc_body "</table>
-    </blockquote>
-    "
+if { $picklist_counter == 0 } {
+    set picklist_list_html "<a href=\"picklist-item-add?prev_sort_key=1&next_sort_key=512&picklist_name=[ns_urlencode [lindex $picklist 0]]\">Add a picklist item.</a>"
 }
-
-append doc_body "</blockquote>
-[ad_admin_footer]
-"
-
-
-doc_return  200 text/html $doc_body
Index: openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-match.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-match.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-match.adp	24 Aug 2008 22:38:54 -0000	1.1
@@ -0,0 +1,10 @@
+<master>
+  <property name="doc(title)">@title;noquote@</property>
+  <property name="context">@context;noquote@</property>
+<h2>@title@</h2>
+
+<p>Please confirm that you want to permanently make this match.  <b>This cannot be undone.</b></p>
+<form method=post action=user-identification-match-2>
+ @export_form_vars_html;noquote@
+ <input type=submit value="Confirm">
+</form>
Index: openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-match.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-match.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-match.tcl	9 Mar 2004 00:59:47 -0000	1.3
+++ openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-match.tcl	24 Aug 2008 22:38:54 -0000	1.4
@@ -1,5 +1,4 @@
 # user-identification-match.tcl
-
 ad_page_contract {
     @param  user_identification_id
     @param d_user_id
@@ -20,31 +19,15 @@
 
 if { ![info exists d_user_id] || [empty_string_p $d_user_id] } {
     incr exception_count
-    append exception_text "<li>You forgot to pick a registered user to match up this unregistered user with."
+    append exception_text "<li>You forgot to pick a registered user to match up this unregistered user with.</li>"
 }
 
 if { $exception_count > 0 } {
     ad_return_complaint $exception_count $exception_text
     return
 }
 
+set title "Confirm Permanent Match"
+set context [list [list index "Customer Service"] $title]
 
-set page_title "Confirm Match"
-append doc_body "[ad_admin_header $page_title]
-<h2>$page_title</h2>
-
-[ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Service Administration"] $page_title]
-
-<hr>
-
-Please confirm that you want to make this match.  This cannot be undone.
-<center>
-<form method=post action=user-identification-match-2>
-[export_form_vars d_user_id user_identification_id]
-<input type=submit value=\"Confirm\">
-</form>
-</center>
-[ad_admin_footer]
-"
-
-doc_return  200 text/html $doc_body
+set export_form_vars_html [export_form_vars d_user_id user_identification_id]
Index: openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-search.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-search.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-search.adp	24 Aug 2008 22:38:54 -0000	1.1
@@ -0,0 +1,12 @@
+<master>
+  <property name="doc(title)">@title;noquote@</property>
+  <property name="context">@context;noquote@</property>
+<h2>@title@</h2>
+
+<if @user_counter@ gt 0>
+ <ul>
+  @users_like_kw_html;noquote@
+ </ul>
+</if><else>
+ <p>No users matching '@keyword@' found.</p>
+</else>
Index: openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-search.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-search.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-search.tcl	9 Mar 2004 00:59:47 -0000	1.5
+++ openacs-4/packages/ecommerce/www/admin/customer-service/user-identification-search.tcl	24 Aug 2008 22:38:54 -0000	1.6
@@ -1,5 +1,4 @@
 # user-identification-search.tcl
-
 ad_page_contract {
     @param keyword
     @author
@@ -12,45 +11,19 @@
 
 ad_require_permission [ad_conn package_id] admin
 
-set page_title "Unregistered User Search"
+set title "Unregistered User Search"
+set context [list [list index "Customer Service"] $title]
 
-
-append doc_body "[ad_admin_header $page_title]
-<h2>$page_title</h2>
-
-[ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Service Administration"] $page_title]
-
-<hr>
-<ul>
-"
-
-
-
 # keyword can refer to email, first_names, last_name, postal_code, or other_id_info
 set keyword [string tolower $keyword]
 set sql "select user_identification_id from ec_user_identification
 where (email like :keyword or lower(first_names || ' ' || last_name) like :keyword or lower(postal_code) like :keyword or lower(other_id_info) like :keyword)
-and user_id is null
-"
+and user_id is null"
 
 set user_counter 0
+set users_like_kw_html ""
 db_foreach search_for_users_like_kw  $sql {
     incr user_counter
-    
-    append doc_body "<li>[ec_user_identification_summary_sub $user_identification_id]"
+    append users_like_kw_html "<li>[ec_user_identification_summary_sub $user_identification_id]</li>"
 }
 
-if { $user_counter == 0 } {
-    append doc_body "No users found."
-}
-
-append doc_body "</ul>
-[ad_admin_footer]
-"
-
-
-
-doc_return  200 text/html $doc_body
-
-
-