Index: openacs-4/packages/dotlrn-ecommerce/www/admin/application-approve.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/application-approve.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-ecommerce/www/admin/application-approve.tcl 23 Jun 2005 15:40:11 -0000 1.1
@@ -0,0 +1,21 @@
+# packages/dotlrn-ecommerce/www/admin/application-approve.tcl
+
+ad_page_contract {
+
+
+
+ @author Roel Canicula (roelmc@pldtdsl.net)
+ @creation-date 2005-06-23
+ @arch-tag: 93f47ba6-c04e-419a-bcd6-60bb95553236
+ @cvs-id $Id: application-approve.tcl,v 1.1 2005/06/23 15:40:11 roelc Exp $
+} {
+ community_id:integer,notnull
+ user_id:integer,notnull
+} -properties {
+} -validate {
+} -errors {
+}
+
+dotlrn_community::membership_approve -community_id $community_id -user_id $user_id
+
+ad_returnredirect applications
Index: openacs-4/packages/dotlrn-ecommerce/www/admin/applications.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/applications.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-ecommerce/www/admin/applications.tcl 23 Jun 2005 12:30:30 -0000 1.1
+++ openacs-4/packages/dotlrn-ecommerce/www/admin/applications.tcl 23 Jun 2005 15:40:11 -0000 1.2
@@ -18,6 +18,7 @@
template::list::create \
-name "applications" \
-multirow "applications" \
+ -no_data "No pending applications" \
-elements {
community_name {
label "Section"
@@ -32,19 +33,22 @@
label "Application"
display_template {
<link to asessment result>
+
Open in new window
}
}
actions {
label ""
display_template {
- Approve
+ Approve
}
}
}
-db_multirow -extend { } applications applications {
- select pretty_name as community_name, person__name(user_id) as person_name, member_state
+db_multirow -extend { approve_url } applications applications {
+ select pretty_name as community_name, person__name(user_id) as person_name, member_state, c.community_id, user_id
from dotlrn_member_rels_full r, dotlrn_communities_all c
where r.community_id = c.community_id
and member_state = 'needs approval'
+} {
+ set approve_url [export_vars -base application-approve { community_id user_id }]
}
\ No newline at end of file