Index: openacs-4/packages/ecommerce/www/admin/customer-service/actions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/actions.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/admin/customer-service/actions.tcl 9 Mar 2004 00:59:47 -0000 1.4 +++ openacs-4/packages/ecommerce/www/admin/customer-service/actions.tcl 20 Aug 2008 20:34:33 -0000 1.5 @@ -31,55 +31,26 @@ set order_by "a.action_id" } +set title "Actions" +set context [list [list index "Customer Service"] $title] +set export_form_vars_html [export_form_vars view_interaction_date] -append doc_body "[ad_admin_header "Customer Service Actions"] - -

Customer Service Actions

- -[ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Service Administration"] "Actions"] - -
- -
-[export_form_vars view_interaction_date] - - - - - - - - - - -
Info UsedRepInteraction Date
- - - -" - set interaction_date_list [list [list last_24 "last 24 hrs"] [list last_week "last week"] [list last_month "last month"] [list all all]] set linked_interaction_date_list [list] - foreach interaction_date $interaction_date_list { if {$view_interaction_date == [lindex $interaction_date 0]} { - lappend linked_interaction_date_list "[lindex $interaction_date 1]" + lappend linked_interaction_date_list "[lindex $interaction_date 1]" } else { - lappend linked_interaction_date_list "[lindex $interaction_date 1]" + lappend linked_interaction_date_list "[lindex $interaction_date 1]" } } -append doc_body "\[ [join $linked_interaction_date_list " | "] \] +set set interaction_date_list_html "\[ [join $linked_interaction_date_list " | "] \]" -
- -
-
-" - if { $view_rep == "all" } { set rep_query_bit "" } else { @@ -164,10 +123,10 @@ # " } elseif { $view_info_used == "all others" } { if { [llength $important_info_used_list] > 0 } { - set safe_important_info_used_list [DoubleApos $important_info_used_list] - set info_used_query_bit "and map.info_used not in ('[join $safe_important_info_used_list "', '"]')" + set safe_important_info_used_list [DoubleApos $important_info_used_list] + set info_used_query_bit "and map.info_used not in ('[join $safe_important_info_used_list "', '"]')" } else { - set info_used_query_bit "" + set info_used_query_bit "" } set sql_query [db_map all_others_sql] @@ -215,8 +174,7 @@ set link_beginning "actions.tcl?[export_url_vars view_info_used view_rep view_interaction_date]" -set table_header " - +set table_header " @@ -225,64 +183,36 @@ - -" +" set sql $sql_query - set row_counter 0 +set interaction_info_maybe_rep_html "" db_foreach get_interaction_info_maybe_rep $sql { - if { $row_counter == 0 } { - append doc_body $table_header + append interaction_info_maybe_rep_html $table_header } elseif { $row_counter == 20 } { - append doc_body "
Action ID Interaction ID Issue IDRep Originator Interaction Type
-

- $table_header - " - set row_counter 1 + append interaction_info_maybe_rep_html "
${table_header}" + set row_counter 1 } # even rows are white, odd are grey if { [expr floor($row_counter/2.)] == [expr $row_counter/2.] } { - set bgcolor "white" + set bgcolor "#ffffff" } else { - set bgcolor "ececec" + set bgcolor "#ececec" } - - append doc_body " - - - - " + append interaction_info_maybe_rep_html "" if { [empty_string_p $customer_user_id] } { - append doc_body "" + append interaction_info_maybe_rep_html "" } else { - append doc_body "" + append interaction_info_maybe_rep_html "" } - if { ![empty_string_p $customer_service_rep] } { - append doc_body "" + append interaction_info_maybe_rep_html "" } else { - append doc_body "" + append interaction_info_maybe_rep_html "" } - - append doc_body " - - - " + append interaction_info_maybe_rep_html "\n" incr row_counter } -if { $row_counter != 0 } { - append doc_body "
$action_id$interaction_id$issue_id[ec_formatted_full_date $full_interaction_date]
$action_id$interaction_id$issue_id[ec_formatted_full_date $full_interaction_date]unregistered user $user_identification_idunregistered user $user_identification_id$customer_last_name, $customer_first_names$customer_last_name, $customer_first_names$rep_last_name, $rep_first_names$rep_last_name, $rep_first_names  $interaction_originator$interaction_type
$interaction_originator$interaction_type
" -} else { - append doc_body "

None Found
" -} - -append doc_body " -
-[ad_admin_footer] -" - - -doc_return 200 text/html $doc_body