Index: openacs-4/packages/ecommerce/www/admin/customer-reviews/index-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-reviews/index-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/customer-reviews/index-2.adp 18 Aug 2008 11:41:43 -0000 1.1 @@ -0,0 +1,12 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ + + + +

No reviews found.

+
Index: openacs-4/packages/ecommerce/www/admin/customer-reviews/index-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-reviews/index-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/customer-reviews/index-2.tcl 9 Mar 2004 00:59:46 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/customer-reviews/index-2.tcl 18 Aug 2008 11:41:43 -0000 1.4 @@ -1,5 +1,4 @@ # index-2.tcl - ad_page_contract { @param approved_p:optional @param product_id:optional @@ -15,48 +14,36 @@ ad_require_permission [ad_conn package_id] admin -set page_title "" -set navbar "" +set page_title "Customer Reviews" + set query_end "" if { [info exists approved_p] } { if { $approved_p == "null" } { - set review_status "Not Yet Approved/Disapproved" - set query_end "and approved_p is null" + set review_status "Not Yet Approved/Disapproved" + set query_end "and approved_p is null" } elseif { $approved_p == "t" } { - set review_status "Approved" - set query_end "and approved_p='t'" + set review_status "Approved" + set query_end "and approved_p='t'" } elseif { $approved_p == "f" } { - set review_status "Disapproved" - set query_end "and approved_p='f'" + set review_status "Disapproved" + set query_end "and approved_p='f'" } else { - set review_status "" - set query_end "" + set review_status "" + set query_end "" } - set page_title "$review_status Reviews" - set navbar [ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Reviews"] "$review_status Reviews"] + set title "$review_status Reviews" + set context [list [list index "Customer Reviews"] $title] set return_url "index-2.tcl?[export_url_vars approved_p]" } elseif { [info exists product_id] } { set product_name [ec_product_name $product_id] - set page_title $product_name - set navbar [ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "../products/index.tcl" "Products"] [list "../products/one.tcl?product_id=$product_id" "One"] "Customer Reviews"] + set title $product_name + set context [list [list "../products/index.tcl" "Products"] [list "../products/one.tcl?product_id=$product_id" "One"] [list index "Customer Reviews"] $title] set query_end "and p.product_id=:product_id" set return_url "index-2.tcl?[export_url_vars product_id]" -} +} - -append doc_body "[ad_admin_header $page_title] - -

$page_title

- -$navbar - -
- - - -[ad_admin_footer] -" - -doc_return 200 text/html $doc_body Index: openacs-4/packages/ecommerce/www/admin/customer-reviews/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-reviews/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/customer-reviews/index.adp 18 Aug 2008 11:41:43 -0000 1.1 @@ -0,0 +1,19 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ + +

Comments must be approved before they will appear on the web site.

+
+

The ecommerce system is set up so that user's comments about products automatically appear +on the web site, unless you specifically Disapprove them. Even though +it is not necessary, you may also wish to specifically Approve comments +so that you can distinguish them from comments that you have not yet +looked at.

+
+ + Index: openacs-4/packages/ecommerce/www/admin/customer-reviews/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-reviews/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/admin/customer-reviews/index.tcl 9 Mar 2004 00:59:46 -0000 1.4 +++ openacs-4/packages/ecommerce/www/admin/customer-reviews/index.tcl 18 Aug 2008 11:41:43 -0000 1.5 @@ -1,5 +1,4 @@ -# index.tcl<2> - +# index.tcl ad_page_contract { @author @creation-date @@ -10,64 +9,36 @@ ad_require_permission [ad_conn package_id] admin -append doc_body "[ad_admin_header "Customer Reviews"] +set title "Customer Reviews" +set context [list $title] -

Customer Reviews

+set requires_approval [parameter::get -package_id [ec_id] -parameter ProductCommentsNeedApprovalP -default 1] -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] "Customer Reviews"] - -
-" - -if {[ad_parameter -package_id [ec_id] ProductCommentsNeedApprovalP ecommerce]} { - append doc_body "Comments must be approved before they will appear on the web site." -} else { - append doc_body "Your ecommerce system is set up so that comments automatically appear on the web site, unless you specifically Disapprove them. Even though it's not necessary, you may also wish to specifically Approve comments so that you can distinguish them from comments that you have not yet looked at." -} - -append doc_body " - - -[ad_admin_footer] -" - - -doc_return 200 text/html $doc_body +db_release_unused_handles Index: openacs-4/packages/ecommerce/www/admin/customer-reviews/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-reviews/one.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/customer-reviews/one.adp 18 Aug 2008 11:41:43 -0000 1.1 @@ -0,0 +1,13 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

+On @comment_date_html;noquote@
+about: @product_link_html;noquote@
+by: @user_link_html;noquote@
+rating: @rating_html;noquote@
+summary: @one_line_summary@
+comments: @user_comment@

+

@doc_body;noquote@

Index: openacs-4/packages/ecommerce/www/admin/customer-reviews/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-reviews/one.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/customer-reviews/one.tcl 9 Mar 2004 00:59:46 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/customer-reviews/one.tcl 18 Aug 2008 11:41:43 -0000 1.4 @@ -12,17 +12,9 @@ ad_require_permission [ad_conn package_id] admin -append doc_body "[ad_admin_header "One Review"] +set title "One Review" +set context [list [list index "Customer Reviews"] $title] -

One Review

- -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Reviews"] "One Review"] - -
-
-" - - if { ![db_0or1row get_product_info "select c.product_id, c.user_id, c.user_comment, c.one_line_summary, c.rating, p.product_name, u.email, c.comment_date, c.approved_p from ec_product_comments c, ec_products p, cc_users u where c.product_id = p.product_id @@ -31,32 +23,21 @@ ad_return_complaint 1 "Invalid Comment ID passed in" } +set comment_date_html [util_AnsiDatetoPrettyDate $comment_date] +set product_link_html "$product_name" +set user_link_html "$email" +set rating_html "[ec_display_rating $rating]" - -append doc_body "[util_AnsiDatetoPrettyDate $comment_date]
-$product_name
-$email [ec_display_rating $rating]
-$one_line_summary
-$user_comment -
-" - +set doc_body "" if { [info exists product_id] } { # then we don't know a priori whether this is an approved review append doc_body "Review Status: " if { $approved_p == "t" } { - append doc_body "Approved
" + append doc_body "Approved
" } elseif { $approved_p == "f" } { - append doc_body "Disapproved
" + append doc_body "Disapproved
" } else { - append doc_body "Not yet Approved/Disapproved
" + append doc_body "Not yet Approved/Disapproved
" } } - -append doc_body "\[Approve | Disapprove\] - -
-[ad_admin_footer] -" - -doc_return 200 text/html $doc_body +append doc_body "\[Approve | Disapprove\]"