Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 7 Jul 2005 18:17:23 -0000 1.9
+++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 8 Jul 2005 11:06:50 -0000 1.10
@@ -302,7 +302,7 @@
actions {
label ""
display_template {
-
+
[_ dotlrn-ecommerce.add_to_cart]
@@ -315,8 +315,11 @@
- (application pending)
+ [_ dotlrn-ecommerce.application_pending]
+
+ [_ dotlrn-ecommerce.awaiting_approval]
+
}
html { width 40% nowrap }
}
@@ -342,7 +345,7 @@
set grade_tree_id [parameter::get -package_id [ad_conn package_id] -parameter GradeCategoryTree -default 0]
-db_multirow -extend { category_name community_url course_edit_url section_add_url section_edit_url course_grades section_grades sections_url member_p sessions instructors prices shopping_cart_add_url attendees available_slots pending_p } course_list get_courses { } {
+db_multirow -extend { category_name community_url course_edit_url section_add_url section_edit_url course_grades section_grades sections_url member_p sessions instructors prices shopping_cart_add_url attendees available_slots pending_p waiting_p } course_list get_courses { } {
# set mapped [category::get_mapped_categories $course_id]
# foreach element $mapped {
@@ -448,4 +451,15 @@
set prices ""
}
}
+
+ set waiting_p [db_string awaiting_approval {
+ select 1
+ where exists (select *
+ from acs_rels r,
+ membership_rels m
+ where r.rel_id = m.rel_id
+ and r.object_id_one = :community_id
+ and r.object_id_two = :user_id
+ and m.member_state = 'request approval')
+ } -default 0]
}