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.3 -r1.4 --- openacs-4/packages/scholarship-fund/www/one-fund.adp 11 Aug 2005 01:10:49 -0000 1.3 +++ openacs-4/packages/scholarship-fund/www/one-fund.adp 22 Aug 2005 15:46:27 -0000 1.4 @@ -7,9 +7,6 @@
Edit Fund
- -DISABLED USER SIDE SCHOLARSHIP GRANTS

- \ No newline at end of file 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.5 -r1.6 --- openacs-4/packages/scholarship-fund/www/one-fund.tcl 11 Aug 2005 01:10:49 -0000 1.5 +++ openacs-4/packages/scholarship-fund/www/one-fund.tcl 22 Aug 2005 15:46:27 -0000 1.6 @@ -40,33 +40,39 @@ 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" } -# template::list::create \ -# -name grants \ -# -multirow grants \ -# -no_data "No grants from this fund" \ -# -actions [list Grant scholarship-grant?fund_id=$fund(fund_id) Grant] \ -# -elements { -# person__name { -# label "User" -# } -# grant_date { -# label "Date Granted" -# } -# grant_amount { -# label "Amount" -# } -# } +set actions "" -# db_multirow grants grants { -# select person__name(user_id), to_char(grant_date, 'Month dd, yyyy hh:miam') as grant_date, grant_amount -# from scholarship_fund_grants -# where fund_id in (select fund_id -# from scholarship_fundi -# where item_id = :item_id) -# group by person__name, grant_date, grant_amount -# order by scholarship_fund_grants.grant_date -# } +if {0} { + set actions [list Grant scholarship-grant?fund_id=$fund(fund_id) Grant] +} +template::list::create \ + -name grants \ + -multirow grants \ + -no_data "No grants from this fund" \ + -actions $actions \ + -elements { + person__name { + label "User" + } + grant_date { + label "Date Granted" + } + grant_amount { + label "Amount" + } + } + +db_multirow grants grants { + select person__name(user_id), to_char(grant_date, 'Month dd, yyyy hh:miam') as grant_date, grant_amount + from scholarship_fund_grants + where fund_id in (select fund_id + from scholarship_fundi + where item_id = :item_id) + group by person__name, grant_date, grant_amount + order by scholarship_fund_grants.grant_date +} + set page_title "One Scholarship Fund" set context [list $page_title] set header_stuff ""