Index: openacs-4/packages/scholarship-fund/www/export-sch.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/export-sch.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/scholarship-fund/www/export-sch.tcl 14 Aug 2005 12:38:52 -0000 1.1 +++ openacs-4/packages/scholarship-fund/www/export-sch.tcl 22 Aug 2005 17:37:37 -0000 1.2 @@ -32,7 +32,7 @@ -formats { csv { output csv } } -elements { - sch_fund { + fund_id { label "Fund" } account_code { @@ -41,12 +41,27 @@ description { label "Description" } + name { + label "Name" + } + grant_date { + label "Grant Date" + } + grant_amount { + label "Grant Amount" + } } # build the multirow -set query "select fund_id, description, account_code, export_p from scholarship_fundx where export_p = false" - +#set query "select fund_id, description, account_code, export_p from scholarship_fundx where export_p = false" +set query "select f.fund_id, person__name(g.user_id) as name, to_char(g.grant_date, 'Month dd, yyyy hh:miam') as grant_date, g.grant_amount, + f.account_code, f.description + from scholarship_fund_grants g, + scholarship_fundi f + where g.fund_id=f.fund_id + group by person__name(g.user_id), g.grant_date, g.grant_amount, f.fund_id, f.account_code, f.description + order by g.grant_date" # Save for Later in case we want # to bring back selective exports @@ -66,7 +81,7 @@ db_multirow scholarship_funds get_sch_funds $query { } if { $mark == 1 } { - db_dml "mark_exported" "update scholarship_fund set exported_p = 't'" + db_dml "mark_exported" "update scholarship_fund set export_p = 't'" } # change headers to output csv Index: openacs-4/packages/scholarship-fund/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/index.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/scholarship-fund/www/index.tcl 14 Aug 2005 12:38:52 -0000 1.5 +++ openacs-4/packages/scholarship-fund/www/index.tcl 22 Aug 2005 17:37:37 -0000 1.6 @@ -47,6 +47,7 @@ -elements { title { label "Title" link_url_col one_url } description { label "Description" } + export_p { label "Exported?" display_eval {[_ [ad_decode $export_p t "acs-kernel.common_Yes" "acs-kernel.common_No"]]}} actions { label "Actions" display_template { Index: openacs-4/packages/scholarship-fund/www/one-fund.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/one-fund.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/scholarship-fund/www/one-fund.adp 22 Aug 2005 15:46:27 -0000 1.4 +++ openacs-4/packages/scholarship-fund/www/one-fund.adp 22 Aug 2005 17:37:37 -0000 1.5 @@ -7,6 +7,6 @@
Edit Fund
-

+

Grants

Index: openacs-4/packages/scholarship-fund/www/one-fund.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/one-fund.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/scholarship-fund/www/one-fund.tcl 22 Aug 2005 15:46:27 -0000 1.6 +++ openacs-4/packages/scholarship-fund/www/one-fund.tcl 22 Aug 2005 17:37:37 -0000 1.7 @@ -36,8 +36,10 @@ {title:text {label "Fund Title"}} {description:text(textarea) {label "Description"}} {account_code:text {label "Account Code"}} + {export_inform:text(inform) {label "Exported?"}} } -on_request { - db_1row get_fund "select sf.title, sf.description, sf.account_code, sf.amount from scholarship_fundi sf, cr_items ci where sf.revision_id=ci.live_revision and sf.item_id=:item_id" + db_1row get_fund "select sf.export_p, sf.title, sf.description, sf.account_code, sf.amount from scholarship_fundi sf, cr_items ci where sf.revision_id=ci.live_revision and sf.item_id=:item_id" + set export_inform [_ [ad_decode $export_p t "acs-kernel.common_Yes" "acs-kernel.common_No"]] } set actions ""