- fix: Asset menu
- fix: Event Manager - can't add event - fix: v6.99.1, security: Spectre listens to INADDR_ANY (profo) - fix: Manage groups in this group doesn't work - Fixed a problem where the not found page would not display. - fix: New page layout instead of not found
This commit is contained in:
parent
2e1de9d214
commit
16bd394434
8 changed files with 76 additions and 20 deletions
|
|
@ -54,6 +54,32 @@ These methods are available from this class:
|
|||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 addMissing ( url )
|
||||
|
||||
Displays a message to the admin that they have requested a non-existent page and give them an option to create it.
|
||||
|
||||
=head3 url
|
||||
|
||||
The missing URL.
|
||||
|
||||
=cut
|
||||
|
||||
sub addMissing {
|
||||
my $self = shift;
|
||||
my $assetUrl = shift;
|
||||
return undef unless ($self->session->var->isAdminOn);
|
||||
my $ac = $self->getAdminConsole;
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset");
|
||||
my $output = $i18n->get("missing page query");
|
||||
$output .= '<ul>
|
||||
<li><a href="'.$self->getUrl("func=add;class=WebGUI::Asset::Wobject::Layout;url=".$assetUrl).'">'.$i18n->get("add the missing page").'</a></li>
|
||||
<li><a href="'.$self->getUrl.'">'.$i18n->get("493","WebGUI").'</a></li>
|
||||
</ul>';
|
||||
return $ac->render($output);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 canAdd ( session, [userId, groupId] )
|
||||
|
|
@ -479,7 +505,6 @@ sub getContainer {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getDefault ( session )
|
||||
|
|
@ -916,18 +941,24 @@ sub getToolbar {
|
|||
my $output = '<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var contextMenu = new contextMenu_createWithImage("'.$self->getIcon(1).'","'.$self->getId.'","'.$self->getName.'");';
|
||||
if ($userUiLevel >= $uiLevels->{"lock"} && !$self->isLocked) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=lock").'","'.$i18n->get("lock").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"changeUrl"}) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=changeUrl").'","'.$i18n->get("change url").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"export"} && defined $self->session->config->get("exportPath")) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=export").'","'.$i18n->get("Export","Icon").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"editBranch"}) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=editBranch").'","'.$i18n->get("edit branch").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"revisions"}) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageRevisions").'","'.$i18n->get("revisions").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"view"}) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl.'","'.$i18n->get("view").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"lock"} && !$self->isLocked) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=lock").'","'.$i18n->get("lock").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"export"} && defined $self->session->config->get("exportPath")) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=export").'","'.$i18n->get("Export","Icon").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"promote"}) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=promote").'","'.$i18n->get("promote").'");';
|
||||
}
|
||||
|
|
@ -937,12 +968,6 @@ sub getToolbar {
|
|||
if ($userUiLevel >= $uiLevels->{"manage"}) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageAssets").'","'.$i18n->get("manage").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"revisions"}) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageRevisions").'","'.$i18n->get("revisions").'");';
|
||||
}
|
||||
if ($userUiLevel >= $uiLevels->{"view"}) {
|
||||
$output .= 'contextMenu.addLink("'.$self->getUrl.'","'.$i18n->get("view").'");';
|
||||
}
|
||||
$output .= 'contextMenu.print();
|
||||
//]]>
|
||||
</script>'.$toolbar;
|
||||
|
|
@ -1829,7 +1854,6 @@ sub www_add {
|
|||
return $newAsset->www_edit();
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_ajaxInlineView ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue