Update of /cvs/scoop/scoop/lib/Scoop
In directory lithium.sabren.com:/tmp/cvs-serv4270/lib/Scoop
Modified Files:
Admin.pm Stories.pm
Log Message:
Move story posting form into blocks. Also moves the part of the poll form where it makes sense into blocks, since it's part of story
posting. Adds an "edit_own_stories" perm that you can enable for users if you want them to be able to edit their own stuff after posting.
And finally changes admin tools semantics to allow multiple perms per admin tool. The admin tools box right now only respects the first
perm listed when it makes the tools list, to preserve the traditional behavior of that box. In the long run, this will need to be
fixed. Also, it may be advantageous eventually to add an "edit" perm category to sections, to enable editing of some sections but not
others.
--rusty
Index: Stories.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Stories.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** Stories.pm 21 Jan 2005 14:14:30 -0000 1.46
--- Stories.pm 3 Feb 2005 15:48:30 -0000 1.47
***************
*** 265,269 ****
# Set the page title
! $S->{UI}->{BLOCKS}->{subtitle} = 'Submit New Story';
$S->{UI}->{BLOCKS}->{STORY} = qq|
--- 265,269 ----
# Set the page title
! $S->{UI}->{BLOCKS}->{subtitle} = $S->{UI}->{BLOCKS}->{submit_page_title};
$S->{UI}->{BLOCKS}->{STORY} = qq|
***************
*** 315,319 ****
$S->{UI}->{BLOCKS}->{CONTENT} .= qq|
<TR>
! <TD BGCOLOR="%%title_bgcolor%%">%%title_font%%<B>Submit New Story</B>%%title_font_end%%</TD>
</TR>
<TR>
--- 315,319 ----
$S->{UI}->{BLOCKS}->{CONTENT} .= qq|
<TR>
! <TD BGCOLOR="%%title_bgcolor%%">%%title_font%%<B>$S->{UI}->{BLOCKS}->{submit_page_title}</B>%%title_font_end%%</TD>
</TR>
<TR>
***************
*** 326,330 ****
$S->{UI}->{BLOCKS}->{CONTENT} .= qq|
<TR>
! <TD BGCOLOR="%%title_bgcolor%%">%%title_font%%<B>Submit New Story</B>%%title_font_end%%</TD>
</TR>|;
$S->{UI}->{BLOCKS}->{CONTENT} .= qq|
--- 326,330 ----
$S->{UI}->{BLOCKS}->{CONTENT} .= qq|
<TR>
! <TD BGCOLOR="%%title_bgcolor%%">%%title_font%%<B>$S->{UI}->{BLOCKS}->{submit_page_title}</B>%%title_font_end%%</TD>
</TR>|;
$S->{UI}->{BLOCKS}->{CONTENT} .= qq|
Index: Admin.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Admin.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Admin.pm 12 Jun 2002 05:13:22 -0000 1.16
--- Admin.pm 3 Feb 2005 15:48:30 -0000 1.17
***************
*** 16,20 ****
# see if the requested admin tool even exists
my $t = $S->{ADMIN_TOOLS}->{$tool};
! if ($t && $S->have_perm($t->{perm})) {
# find out what type of tool it is and run it the appropriate way
if ($t->{is_box}) {
--- 16,33 ----
# see if the requested admin tool even exists
my $t = $S->{ADMIN_TOOLS}->{$tool};
!
! # Check for multi-perm tools
! my $have_perm = 0;
! if ($t->{perm} =~ /,/) {
! my @perms = split /\s*,\s*/, $t->{perm};
! foreach my $p (@perms) {
! $have_perm = $S->have_perm($p);
! last if $have_perm;
! }
! } else {
! $have_perm = $S->have_perm($t->{perm});
! }
!
! if ($t && $have_perm) {
# find out what type of tool it is and run it the appropriate way
if ($t->{is_box}) {