Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove edit button from grapes view as page #129

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8">
{if $canEdit}
<div style="position:absolute;top:50px;right:10px"><button onclick="window.location.href='{$editPageUrl|escape: 'html'}'">{translate text="Edit Page" isPublicFacing=false}</button></div>
{/if}
<title>{$title|escape: 'html'}</title>
</head>
<body>
Expand Down
2 changes: 2 additions & 0 deletions code/web/release_notes/24.10.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
// james - Nashville

// alexander - PTFS-E
## Web Builder - Grapes JS Updates
- Removed edit button from 'view as page' option for Grapes JS pages as the editor can be navigated to using the breadcrumbs which is inline with other areas of Aspen. (*AB*)

// chloe - PTFS-E
## Aspen Usage Data
Expand Down
7 changes: 0 additions & 7 deletions code/web/services/WebBuilder/GrapesPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ function launch() {
$title = $this->grapesPage->title;
$interface->assign('id', $this->grapesPage->id);
$interface->assign('contents', $this->grapesPage->getFormattedContents());
$editButton = $this->generateEditPageUrl();
$interface->assign('editPageUrl', $editButton);
$canEdit = UserAccount::userHasPermission( 'Administer All Grapes Pages',
'Administer Library Grapes Pages');
$interface->assign('canEdit', $canEdit);
Expand All @@ -66,11 +64,6 @@ function canView(): bool {
return true;
}

function generateEditPageUrl() {
$objectId = $this->grapesPage->id;
$templatesSelect - $this->grapesPage->templatesSelect;
return '/services/WebBuilder/GrapesJSEditor?objectAction=edit&id=' . $objectId . '&tempalteId=' . $templatesSelect;
}

function getBreadcrumbs(): array {
$breadcrumbs = [];
Expand Down