Update of /cvsroot/openinteract/OpenInteract2/pkg/base_page/OpenInteract2/Action
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22552/OpenInteract2/Action
Modified Files:
Page.pm
Log Message:
OIN-60: parse out the box declarations for a page into add/remove
Index: Page.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_page/OpenInteract2/Action/Page.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Page.pm 2 Oct 2004 22:38:34 -0000 1.20
--- Page.pm 2 Oct 2004 23:15:11 -0000 1.21
***************
*** 750,757 ****
# Use page metadata to modify display
! my @boxes = grep { $_ } map { s/^\s+// }
! split( /\s+/, $page->{boxes} );
! my %params = ( boxes => \@boxes, page => $page );
# Grab content we're actually going to show
--- 750,773 ----
# Use page metadata to modify display
! $page->{boxes} ||= [];
! my @box_add = ();
! my @box_remove = ();
! foreach ( @{ $page->{boxes} } ) {
! s/^\s+//;
! s/\s+$//;
! if ( /^\-/ ) {
! push @box_remove, $_;
! }
! else {
! s/^\+//;
! push @box_add, $_;
! }
! }
! my %params = (
! box_add => \@box_add,
! box_remove => \@box_remove,
! page => $page,
! );
# Grab content we're actually going to show
|