[WTF CVS] wtf/lib/WTF/Pages Reports.pm,1.7,1.8
Brought to you by:
gryphonshafer
|
From: Gryphon S. <gry...@us...> - 2006-11-28 21:58:43
|
Update of /cvsroot/wtf-tracker/wtf/lib/WTF/Pages In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22723/lib/WTF/Pages Modified Files: Reports.pm Log Message: Addition of support for an Email Team View to Me button on the Team View page Index: Reports.pm =================================================================== RCS file: /cvsroot/wtf-tracker/wtf/lib/WTF/Pages/Reports.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Reports.pm 20 Nov 2006 02:54:58 -0000 1.7 --- Reports.pm 28 Nov 2006 21:58:37 -0000 1.8 *************** *** 13,17 **** use WTF::Utils; ! use constant ROOT_URL => WTF::Config->get( 'links', 'root_url' ); # setup database and SQL statement handles --- 13,20 ---- use WTF::Utils; ! use constant { ! ROOT_URL => WTF::Config->get( 'links', 'root_url' ), ! EMAIL_SCRIPT => WTF::Config->get('weekly_status'), ! }; # setup database and SQL statement handles *************** *** 52,74 **** ); ! # if the user selected a download, then build and return the XLS file ! if ( defined $req->param('download') and $req->param('download') == 1 ) { ! if ( defined $req->param('team') and $req->param('team') eq 'extended' ) { ! # user requested an extended team report ! xls_team_view_build( ! $r, 'extended_team.xls', 'Extended Team', ! $date_start, $date_end, ! WTF::Utils::generate_team_ids( $r->pnotes('user_id') ), ! ); } ! else { ! # user requested a local team report ! xls_team_view_build( ! $r, 'team.xls', 'Team View', ! $date_start, $date_end, ! WTF::Utils::my_team_id( $r->pnotes('user_id') ), ! ); } - return; } --- 55,86 ---- ); ! # check to see if there's a special action we should perform ! if ( defined $req->param('special_action') ) { ! ! # if the user selected a download, then build and return the XLS file ! if ( $req->param('special_action') eq 'download' ) { ! if ( defined $req->param('team') and $req->param('team') eq 'extended' ) { ! # user requested an extended team report ! xls_team_view_build( ! $r, 'extended_team.xls', 'Extended Team', ! $date_start, $date_end, ! WTF::Utils::generate_team_ids( $r->pnotes('user_id') ), ! ); ! } ! else { ! # user requested a local team report ! xls_team_view_build( ! $r, 'team.xls', 'Team View', ! $date_start, $date_end, ! WTF::Utils::my_team_id( $r->pnotes('user_id') ), ! ); ! } ! return; } ! ! # if the user selected to get an email, send it to them ! elsif ( $req->param('special_action') eq 'email' ) { ! system( join( ' ', EMAIL_SCRIPT, $date_start, $date_end, $r->pnotes('user_id') ) ); } } *************** *** 182,185 **** --- 194,198 ---- 'date_end' => $date_end, 'notes_hide' => ($notes_view) ? 0 : 1, + 'username' => $r->pnotes('username'), 'login_as' => $r->pnotes('authz')->{'login_as'} || 0, 'team_summary' => $team_summary, |