-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
220 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Evoweb\EwCollapsibleContainer\Xclass; | ||
|
||
/* | ||
* This file is part of TYPO3 CMS-based extension "container" by b13. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
*/ | ||
|
||
use B13\Container\Backend\Grid\ContainerGridColumnItem as BaseContainerGridColumnItem; | ||
use TYPO3\CMS\Backend\Routing\UriBuilder; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
|
||
class ContainerGridColumnItem extends BaseContainerGridColumnItem | ||
{ | ||
public function getNewContentAfterUrl(): string | ||
{ | ||
$urlParameters = [ | ||
'edit' => [ | ||
'tt_content' => [ | ||
-$this->record['uid'] => 'new', | ||
], | ||
], | ||
'defVals' => [ | ||
'tt_content' => [ | ||
'colPos' => $this->column->getColumnNumber(), | ||
'sys_language_uid' => $this->container->getLanguage(), | ||
'tx_container_parent' => $this->container->getUidOfLiveWorkspace(), | ||
'uid_pid' => -$this->record['uid'], | ||
], | ||
], | ||
'returnUrl' => $GLOBALS['TYPO3_REQUEST']->getAttribute('normalizedParams')->getRequestUri(), | ||
]; | ||
$routeName = 'record_edit'; | ||
|
||
$allowed = $this->column->getDefinition()['allowed'] ?? []; | ||
if (!empty($allowed)) { | ||
$cType = $allowed['CType'] ?? ''; | ||
if ($cType) { | ||
$urlParameters['defVals']['tt_content']['CType'] = $cType; | ||
} | ||
|
||
$listType = $allowed['list_type'] ?? ''; | ||
if ($listType) { | ||
$urlParameters['defVals']['tt_content']['list_type'] = $listType; | ||
} | ||
} | ||
|
||
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); | ||
return (string)$uriBuilder->buildUriFromRoute($routeName, $urlParameters); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{f:if(condition: '{item.disabled} && {item.context.drawingConfiguration.showHidden} == 0', then: 'height: 0; position: absolute;') -> f:variable(name: 'style')} | ||
<div class="t3-page-ce {item.wrapperClassName} t3js-page-ce t3js-page-ce-sortable" id="element-tt_content-{item.record.uid}" data-table="tt_content" data-uid="{item.record.uid}" data-language-uid="{item.record.sys_language_uid}" style="{style}"> | ||
<div class="t3-page-ce-element t3-page-ce-dragitem"> | ||
<f:render partial="PageLayout/Record/{item.record.CType}/Header" arguments="{_all}" optional="1"> | ||
<f:render partial="PageLayout/RecordDefault/Header" arguments="{_all}" /> | ||
</f:render> | ||
<f:spaceless> | ||
<div class="t3-page-ce-body"> | ||
<f:render partial="PageLayout/RecordDefault/Preview" arguments="{_all}" /> | ||
</div> | ||
</f:spaceless> | ||
<f:render partial="PageLayout/Record/{item.record.CType}/Footer" arguments="{_all}" optional="1"> | ||
<f:render partial="PageLayout/RecordDefault/Footer" arguments="{_all}" /> | ||
</f:render> | ||
<f:if condition="{item.inconsistentLanguage}"> | ||
<div class="t3-page-ce-footer"> | ||
<span class="badge badge-warning">{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.inconsistentLanguageWarning')}</span> | ||
</div> | ||
</f:if> | ||
</div> | ||
<f:if condition="{allowEditContent} && {item.column.contentEditable} && {column.context.allowNewContent} && {column.active}"> | ||
<div class="t3-page-ce-actions t3js-page-new-ce"> | ||
<f:if condition="{item.column.childAllowedTypesCount} == 1"> | ||
<f:then> | ||
<a href="{item.newContentAfterUrl}" title="{newContentTitle}" class="btn btn-default btn-sm"> | ||
<core:icon identifier="actions-add" /> | ||
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:content" /> | ||
</a> | ||
</f:then> | ||
<f:else> | ||
<typo3-backend-new-content-element-wizard-button class="btn btn-default btn-sm" url="{item.newContentAfterUrl}" subject="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:newContentElement')}"> | ||
<core:icon identifier="actions-plus" /> | ||
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:content" /> | ||
</typo3-backend-new-content-element-wizard-button> | ||
</f:else> | ||
</f:if> | ||
</div> | ||
</f:if> | ||
<div class="t3-page-ce-dropzone t3js-page-ce-dropzone-available"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" | ||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" | ||
data-namespace-typo3-fluid="true"> | ||
{f:if(condition: '{item.disabled} && {item.context.drawingConfiguration.showHidden} == 0', then: 'display: none;') -> f:variable(name: 'style')} | ||
<div class="t3-page-ce {item.wrapperClassName} t3js-page-ce t3js-page-ce-sortable" id="element-tt_content-{item.record.uid}" data-table="tt_content" data-uid="{item.record.uid}" data-language-uid="{item.record.sys_language_uid}" style="{style}"> | ||
<div class="t3-page-ce-element t3-page-ce-dragitem t3js-page-ce-dragitem" id="{item.uniqueId}"> | ||
<f:render partial="PageLayout/Record/{item.record.CType}/Header" arguments="{_all}" optional="1"> | ||
<f:render partial="PageLayout/RecordDefault/Header" arguments="{_all}" /> | ||
</f:render> | ||
<f:spaceless> | ||
<div class="t3-page-ce-body"> | ||
<f:render partial="PageLayout/RecordDefault/Preview" arguments="{_all}" /> | ||
</div> | ||
</f:spaceless> | ||
<f:render partial="PageLayout/Record/{item.record.CType}/Footer" arguments="{_all}" optional="1"> | ||
<f:render partial="PageLayout/RecordDefault/Footer" arguments="{_all}" /> | ||
</f:render> | ||
</div> | ||
<f:if condition="{allowEditContent} && {item.column.contentEditable} && {item.column.allowNewContent} && {column.active}"> | ||
<div class="t3-page-ce-actions t3js-page-new-ce" id="colpos-{item.column.columnNumber}-page-{item.context.pageId}-{item.column.uniqueId}"> | ||
<f:if condition="{item.column.childAllowedTypesCount} == 1"> | ||
<f:then> | ||
<a href="{item.newContentAfterUrl}" title="{newContentTitle}" class="btn btn-default btn-sm"> | ||
<core:icon identifier="actions-add" /> | ||
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:content" /> | ||
</a> | ||
</f:then> | ||
<f:else> | ||
<typo3-backend-new-content-element-wizard-button url="{item.newContentAfterUrl}" title="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:newContentElement')}"> | ||
<button type="button" class="btn btn-default btn-sm"> | ||
<core:icon identifier="actions-add" /> | ||
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:content" /> | ||
</button> | ||
</typo3-backend-new-content-element-wizard-button> | ||
</f:else> | ||
</f:if> | ||
</div> | ||
</f:if> | ||
<div class="t3-page-ce-dropzone t3js-page-ce-dropzone-available"></div> | ||
</div> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
'author_email' => '[email protected]', | ||
'author_company' => 'evoWeb', | ||
'state' => 'stable', | ||
'version' => '1.0.0', | ||
'version' => '1.3.0', | ||
'constraints' => [ | ||
'depends' => [ | ||
'typo3' => '11.5.0-12.4.99', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters