Index: openacs-4/packages/ecommerce/www/admin/mailing-lists/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/mailing-lists/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/mailing-lists/index.adp 19 Aug 2008 11:29:03 -0000 1.1 @@ -0,0 +1,13 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

Mailing Lists with Users

+ @mailing_list_widget_html;noquote@ + +

All Mailing Lists

+
+ @category_widget_html;noquote@ + +
Index: openacs-4/packages/ecommerce/www/admin/mailing-lists/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/mailing-lists/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/mailing-lists/index.tcl 9 Mar 2004 00:59:49 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/mailing-lists/index.tcl 19 Aug 2008 11:29:03 -0000 1.4 @@ -6,32 +6,9 @@ ad_require_permission [ad_conn package_id] admin -set page_html "[ad_admin_header "Mailing Lists"] +set title "Mailing Lists" +set context [list $title] -

Mailing Lists

+set mailing_list_widget_html "[ec_mailing_list_widget "f"]" -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] "Mailing Lists"] - -
- -

Mailing Lists with Users

-" - - - -append page_html "[ec_mailing_list_widget "f"] - -

All Mailing Lists

- -
-
- -[ec_category_widget] - -
- -
- -[ad_admin_footer] -" -doc_return 200 text/html $page_html +set category_widget_html "[ec_category_widget]" Index: openacs-4/packages/ecommerce/www/admin/mailing-lists/member-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/mailing-lists/member-add.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/mailing-lists/member-add.adp 19 Aug 2008 11:29:03 -0000 1.1 @@ -0,0 +1,19 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ + +

Users whose last name contains '@last_name@':

+
+

Users whose email contains '@email@':

+
+ +
    + @user_info_html;noquote@ +
+

Click on a name to add user to the mailing list.

+
+

No users found.

+
+ Index: openacs-4/packages/ecommerce/www/admin/mailing-lists/member-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/mailing-lists/member-add.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/admin/mailing-lists/member-add.tcl 9 Mar 2004 00:59:49 -0000 1.4 +++ openacs-4/packages/ecommerce/www/admin/mailing-lists/member-add.tcl 19 Aug 2008 11:29:04 -0000 1.5 @@ -1,4 +1,3 @@ - ad_page_contract { @param category_id the category of the item @param subcategory_id the id of the subcategory @@ -18,49 +17,26 @@ ad_require_permission [ad_conn package_id] admin -set page_html "[ad_admin_header "Add Member to this Mailing List"] +set title "Add Member to this Mailing List" +set context [list [list index "Mailing Lists"] $title] -

Add Member to this Mailing List

- -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Mailing Lists"] "Add Member" ] - -
-" - - if { [info exists last_name] } { set u_last_name %[string toupper $last_name]% - append page_html "

Users whose last name contains '$last_name':

\n" set last_bit_of_query "upper(last_name) like :u_last_name" + set last_name_p 1 } else { set l_email %[string tolower $email]% - append page_html "

Users whose email contains '$email':

\n" set last_bit_of_query "email like :l_email" + set last_name_p 0 } -append page_html "\n" -} else { - append page_html "\n

Click on a name to add them to the mailing list.\n" -} - db_release_unused_handles - -append page_html "[ad_admin_footer] -" -doc_return 200 text/html $page_html - Index: openacs-4/packages/ecommerce/www/admin/mailing-lists/member-remove.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/mailing-lists/member-remove.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/mailing-lists/member-remove.adp 19 Aug 2008 11:29:04 -0000 1.1 @@ -0,0 +1,13 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

Are you sure you want to remove this user from this mailing list?

+ +
+ @export_form_vars_html;noquote@ +
+ +
+
Index: openacs-4/packages/ecommerce/www/admin/mailing-lists/member-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/mailing-lists/member-remove.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/mailing-lists/member-remove.tcl 9 Mar 2004 00:59:49 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/mailing-lists/member-remove.tcl 19 Aug 2008 11:29:04 -0000 1.4 @@ -1,5 +1,4 @@ # member-remove.tcl - ad_page_contract { @param category_id @param subcategory_id:optional @@ -19,28 +18,7 @@ ad_require_permission [ad_conn package_id] admin -append doc_body "[ad_admin_header "Confirm Removal"] +set title "Confirm Removal" +set context [list [list index "Mailing Lists"] $title] -

Confirm Removal

- -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Mailing Lists"] "Confirm Removal"] - -
- -Please confirm that you wish to remove this user from this mailing list. - -
-[export_form_vars category_id subcategory_id subsubcategory_id user_id] -
- -
-
- -[ad_admin_footer] -" - - - -doc_return 200 text/html $doc_body - - +set export_form_vars_html [export_form_vars category_id subcategory_id subsubcategory_id user_id] Index: openacs-4/packages/ecommerce/www/admin/mailing-lists/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/mailing-lists/one.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/mailing-lists/one.adp 19 Aug 2008 11:29:04 -0000 1.1 @@ -0,0 +1,26 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

Members

+ +
    + @user_info_html;noquote@ +
+
+

None.

+
+
+

Add a Member

+
+@export_form_vars_html;noquote@ +

By last name: +

+
+ +
+@export_form_vars_html;noquote@ +

By email address: +

+
Index: openacs-4/packages/ecommerce/www/admin/mailing-lists/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/mailing-lists/one.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/mailing-lists/one.tcl 9 Mar 2004 00:59:49 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/mailing-lists/one.tcl 19 Aug 2008 11:29:04 -0000 1.4 @@ -1,5 +1,4 @@ # one.tcl - ad_page_contract { @author @creation-date @@ -33,25 +32,14 @@ set subsubcategory_id "" } - set mailing_list_name [ec_full_categorization_display $category_id $subcategory_id $subsubcategory_id] +set title "List ${mailing_list_name}" +set context [list [list index "Mailing Lists"] $title] -append doc_body "[ad_admin_header "$mailing_list_name"] - -

$mailing_list_name

- -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Mailing Lists"] "One Mailing List"] - -
-

Members

-
    -" - set user_query "select u.user_id, first_names, last_name from cc_users u, ec_cat_mailing_lists m - where u.user_id=m.user_id - " + where u.user_id=m.user_id" if { ![empty_string_p $subsubcategory_id] } { append user_query "and m.subsubcategory_id=$subsubcategory_id" @@ -66,36 +54,12 @@ } set sql $user_query - +set users_count 0 +set user_info_html db_foreach get_user_info $sql { - - append doc_body "
  • $first_names $last_name \[remove\]" -} if_no_rows { - append doc_body "None" -} + incr users_count + append user_info_html "
  • $first_names $last_name \[remove\]
  • " +} +set export_form_vars_html [export_form_vars category_id subcategory_id subsubcategory_id] db_release_unused_handles - -append doc_body "
- -

Add a Member

- -
-[export_form_vars category_id subcategory_id subsubcategory_id] -By last name: - -
- -
-[export_form_vars category_id subcategory_id subsubcategory_id] -By email address: - -
- -[ad_admin_footer] -" - - - -doc_return 200 text/html $doc_body -