Commit a8b8b7a4 authored by Claus Due's avatar Claus Due Committed by Georg Ringer
Browse files

[BUGFIX] Fix page module button label and undefined variable access

Fixes a couple of issues:

* Missing button text for "new content" button
* Two cases of access to undefined variables
* Add missing f:format.raw in record footer
* Add missing paste-after icon

Resolves: #90506
Releases: master
Change-Id: I9facb46ecaf6dfb7ebc76a2733a4a8c6e2cb3c93
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63390


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Kevin Appelt's avatarKevin Appelt <kevin.appelt@icloud.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarChristian Eßl <indy.essl@gmail.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Kevin Appelt's avatarKevin Appelt <kevin.appelt@icloud.com>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
parent d7525b53
......@@ -308,7 +308,8 @@ class BackendLayout
}
$grid->addRow($rowObject);
}
$allowInconsistentLanguageHandling = (bool)(BackendUtility::getPagesTSconfig($this->id)['mod.']['web_layout.']['allowInconsistentLanguageHandling'] ?? false);
$pageId = $this->drawingConfiguration->getPageId();
$allowInconsistentLanguageHandling = (bool)(BackendUtility::getPagesTSconfig($pageId)['mod.']['web_layout.']['allowInconsistentLanguageHandling'] ?? false);
if (!$allowInconsistentLanguageHandling && $this->getLanguageModeIdentifier() === 'connected') {
$grid->setAllowNewContent(false);
}
......
......@@ -195,7 +195,7 @@ class GridColumnItem extends AbstractGridObject
public function isDelible(): bool
{
$backendUser = $this->getBackendUser();
if (!$backendUser->doesUserHaveAccess($this->pageinfo, Permission::CONTENT_EDIT)) {
if (!$backendUser->doesUserHaveAccess($this->backendLayout->getDrawingConfiguration()->getPageRecord(), Permission::CONTENT_EDIT)) {
return false;
}
return !(bool)($backendUser->getTSConfig()['options.']['disableDelete.']['tt_content'] ?? $backendUser->getTSConfig()['options.']['disableDelete'] ?? false);
......
......@@ -57,7 +57,7 @@
{f:if(condition: column.items, else: 't3-page-ce-empty')}">
<f:for each="{column.items}" as="item">
<f:if condition="{item.deletePlaceholder} == 0">
<f:render partial="PageLayout/Record" arguments="{item: item, grid: grid}" />
<f:render partial="PageLayout/Record" arguments="{_all}" />
</f:if>
</f:for>
</div>
......
......@@ -18,10 +18,12 @@
</div>
</div>
<f:if condition="{item.column.contentEditable} && {grid.allowNewContent}">
<a href="{item.newContentAfterUrl}" title="{item.newContentAfterLinkTitle}" data-title="{item.newContentAfterLinkTitle}" class="btn btn-default btn-sm t3js-toggle-new-content-element-wizard">
<core:icon identifier="actions-add" />
{item.newContentAfterTitle}
</a>
<div class="t3js-page-new-ce t3-page-ce-wrapper-new-ce" id="colpos-{item.column.columnNumber}-page-{item.column.backendLayout.drawingConfiguration.pageId}-{item.column.uniqueId}">
<a href="{item.newContentAfterUrl}" title="{item.newContentAfterLinkTitle}" data-title="{item.newContentAfterLinkTitle}" class="btn btn-default btn-sm t3js-toggle-new-content-element-wizard">
<core:icon identifier="actions-add" />
{item.newContentAfterTitle}
</a>
</div>
</f:if>
<div class="t3-page-ce-dropzone-available t3js-page-ce-dropzone-available"></div>
</div>
<div class="t3-page-ce-footer">
<div class="t3-page-ce-info">
<f:for each="{item.footerInfo}" as="infoLine" iteration="iteration">
{infoLine}<f:if condition="!{iteration.isLast}"><br /></f:if>
{infoLine -> f:format.raw()}<f:if condition="!{iteration.isLast}"><br /></f:if>
</f:for>
</div>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment