Index: openacs-4/packages/ecommerce/www/admin/customer-service/interaction-summary.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/interaction-summary.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ecommerce/www/admin/customer-service/interaction-summary.adp	24 Aug 2008 11:12:48 -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><b>Customer:</b> @customer_html;noquote@</p>
+<p>
+<center>
+@interaction_summary_html;noquote@
+</center>
Index: openacs-4/packages/ecommerce/www/admin/customer-service/interaction-summary.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/interaction-summary.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/ecommerce/www/admin/customer-service/interaction-summary.tcl	9 Mar 2004 00:59:47 -0000	1.3
+++ openacs-4/packages/ecommerce/www/admin/customer-service/interaction-summary.tcl	24 Aug 2008 11:12:48 -0000	1.4
@@ -15,31 +15,17 @@
 
 ad_require_permission [ad_conn package_id] admin
 
-set page_title "Interaction Summary"
-append doc_body "[ad_admin_header $page_title]
-<h2>$page_title</h2>
+set title "Interaction Summary"
+set context [list [list index "Customer Service"] $title]
 
-[ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Service Administration"] $page_title]
-
-<hr>
-
-<b>Customer:</b> 
-"
-
-
-
+set customer_html ""
 if { [info exists user_id] } {
-    append doc_body "Registered user: <a href=\"[ec_acs_admin_url]users/one?user_id=$user_id\">[db_string get_full_name "select first_names || ' ' || last_name from cc_users where user_id=:user_id"]</a>"
+    append customer_html "Registered user: <a href=\"[ec_acs_admin_url]users/one?user_id=$user_id\">[db_string get_full_name "select first_names || ' ' || last_name from cc_users where user_id=:user_id"]</a>"
 } else {
-    append doc_body "[ec_user_identification_summary $user_identification_id]"
+    append customer_html "[ec_user_identification_summary $user_identification_id]"
 }
 
-append doc_body "<p>
-<center>
-"
-
 if { [info exists user_id] } {
-
     set sql "select a.issue_id, a.action_id, a.interaction_id, a.action_details, a.follow_up_required, i.customer_service_rep, i.interaction_date, to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date, i.interaction_originator, i.interaction_type, reps.first_names || ' ' || reps.last_name as rep_name
     from ec_customer_service_actions a, ec_customer_serv_interactions i, ec_user_identification id, users reps
     where a.interaction_id=i.interaction_id
@@ -59,57 +45,25 @@
 
 set old_interaction_id ""
 set action_counter 0
+set interaction_summary_html ""
 db_foreach get_interaction_summary $sql {
     incr action_counter
-    
-
     if { [string compare $interaction_id $old_interaction_id] != 0 } {
-	append doc_body "<p>
-	<table width=90% bgcolor=\"ececec\"><tr><td>
-
-	<b>[ec_formatted_full_date $full_interaction_date]</b><br>
-	<table>
+        append interaction_summary_html "<br><table width=90%>
+    <tr><td colspan="3" bgcolor=\"ececec\"><b>[ec_formatted_full_date $full_interaction_date]</b></td></tr>
 	<tr><td align=right><b>Rep</td><td><a href=\"[ec_acs_admin_url]users/one?user_id=$customer_service_rep\">$rep_name</a></td></tr>
 	<tr><td align=right><b>Originator</td><td>$interaction_originator</td></tr>
 	<tr><td align=right><b>Via</td><td>$interaction_type</td></tr>
-	</table>
-
-	</td></tr></table>
-	"
+   </table>"
     }
-
-    append doc_body "<p>
+    append interaction_summary_html "<br>
     <table width=90%>
     <tr bgcolor=\"ececec\"><td>Issue ID: <a href=\"issue?issue_id=$issue_id\">$issue_id</a></td></tr>
-    <tr><td>
-    <blockquote>
-    <b>Details:</b>
-    <blockquote>
-    [ec_display_as_html $action_details]
-    </blockquote>
-    </blockquote>
-    </td></tr>
-    "
+    <tr><td><p><b>Details:</b>[ec_display_as_html $action_details]</td></tr>\n"
     if { ![empty_string_p $follow_up_required] } {
-	append doc_body "<tr><td>
-	<blockquote>
-	<b>Follow-up Required</b>:
-	<blockquote>
-	[ec_display_as_html $follow_up_required]
-	</blockquote>
-	</blockquote>
-	</td></tr>
-	"
+        append interaction_summary_html "<tr><td><p><b>Follow-up Required</b>: [ec_display_as_html $follow_up_required]</p></td></tr>\n"
     }
-    append doc_body "</table>
-    "
-
+    append interaction_summary_html "</table>"
     set old_interaction_id $interaction_id
 }
 
-append doc_body "</center>
-[ad_admin_footer]
-"
-
-
-doc_return  200 text/html $doc_body
\ No newline at end of file