Show different styles based on whether a user is in admin mode, or not. Fixes bug #12032.
This commit is contained in:
parent
5b07ab3113
commit
a0867dd45a
2 changed files with 7 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
7.10.9
|
||||
- fixed #12030: Calendar Feed Time Zone Issue
|
||||
- fixed: Permission on who can create a shortcut of an Asset.
|
||||
- fixed #12032: deleting forum posts
|
||||
|
||||
7.10.8
|
||||
- rfe #12016 for the top story as well
|
||||
|
|
|
|||
|
|
@ -117,7 +117,6 @@ sub renderBar {
|
|||
);
|
||||
$tt->process( \$template, \%vars, \my $content ) or die $tt->error;
|
||||
|
||||
my $console = WebGUI::AdminConsole->new( $session, $form->get('icon') );
|
||||
$style->setLink( $url->extras("Fork/ProgressBar.css"), { rel => 'stylesheet' } );
|
||||
$style->setScript( $url->extras("$_.js") )
|
||||
for ( (
|
||||
|
|
@ -134,7 +133,12 @@ sub renderBar {
|
|||
'Fork/poll',
|
||||
'Fork/redirect'
|
||||
);
|
||||
return $console->render( $content, encode_entities( $form->get('title') ) );
|
||||
##If the user does not have admin mode turned on, then render the content in the user function style.
|
||||
##Otherwise, use the AdminConsole.
|
||||
if ($session->var->isAdminOn) {
|
||||
return WebGUI::AdminConsole->new($session, $form->get('icon'))->render($content, encode_entities( $form->get('title') ));
|
||||
}
|
||||
return $session->style->userStyle($content);
|
||||
} ## end sub renderBar
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue