From 31e10fa28e7c81fb013541d2db5532aac1d86ceb Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Tue, 24 Aug 2021 11:20:32 +0200 Subject: [PATCH] [TASK] Avoid using <f:link.external> This change favors native <a> tags for internal TYPO3 links in TYPO3 Backend where a ViewHelper is not needed. Resolves: #94975 Releases: master Change-Id: Ib068aee4bb54e45b158bf79d6e5f0c0d8a597341 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70736 Tested-by: Oliver Bartsch <bo@cedev.de> Tested-by: core-ci <typo3@b13.com> Tested-by: Oliver Hader <oliver.hader@typo3.org> Reviewed-by: Oliver Bartsch <bo@cedev.de> Reviewed-by: Oliver Hader <oliver.hader@typo3.org> --- .../ShortcutToolbarItem/Shortcut.html | 18 ++++++++--------- .../TemplateObjectBrowserModuleFunction.html | 20 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/typo3/sysext/backend/Resources/Private/Partials/ShortcutToolbarItem/Shortcut.html b/typo3/sysext/backend/Resources/Private/Partials/ShortcutToolbarItem/Shortcut.html index bfa749cc1937..a893c7e0cdc9 100644 --- a/typo3/sysext/backend/Resources/Private/Partials/ShortcutToolbarItem/Shortcut.html +++ b/typo3/sysext/backend/Resources/Private/Partials/ShortcutToolbarItem/Shortcut.html @@ -1,11 +1,11 @@ <div class="dropdown-table-row t3js-topbar-shortcut" data-shortcutid="{shortcut.raw.uid}" data-shortcutgroup="{group.id}"> <div class="dropdown-table-column dropdown-table-title"> - <f:link.external uri="#" class="dropdown-table-title-ellipsis" onclick="{shortcut.action} return false;" defaultScheme=""> + <a href="#" class="dropdown-table-title-ellipsis" onclick="{shortcut.action} return false;"> <span title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.shortcut')}"> <f:format.raw>{shortcut.icon}</f:format.raw> </span> {shortcut.label} - </f:link.external> + </a> </div> <div class="dropdown-table-column dropdown-table-actions"> <f:render section="Edit"/> @@ -14,17 +14,15 @@ </div> <f:section name="Edit"> - <f:link.external uri="#" class="dropdown-table-actions-btn dropdown-table-actions-btn-edit t3js-shortcut-edit" - title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarksEdit')}" - defaultScheme=""> + <a href="#" class="dropdown-table-actions-btn dropdown-table-actions-btn-edit t3js-shortcut-edit" + title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarksEdit')}"> <core:icon identifier="actions-open" alternativeMarkupIdentifier="inline"/> - </f:link.external> + </a> </f:section> <f:section name="Delete"> - <f:link.external uri="#" class="dropdown-table-actions-btn dropdown-table-actions-btn-delete t3js-shortcut-delete" - title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarksDelete')}" - defaultScheme=""> + <a href="#" class="dropdown-table-actions-btn dropdown-table-actions-btn-delete t3js-shortcut-delete" + title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarksDelete')}"> <core:icon identifier="actions-delete" alternativeMarkupIdentifier="inline"/> - </f:link.external> + </a> </f:section> diff --git a/typo3/sysext/tstemplate/Resources/Private/Templates/TemplateObjectBrowserModuleFunction.html b/typo3/sysext/tstemplate/Resources/Private/Templates/TemplateObjectBrowserModuleFunction.html index 67abdebe7097..f9bd9e00324d 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Templates/TemplateObjectBrowserModuleFunction.html +++ b/typo3/sysext/tstemplate/Resources/Private/Templates/TemplateObjectBrowserModuleFunction.html @@ -73,15 +73,15 @@ <f:if condition="{isNotInTopLevelKeyList}"> <f:then> <f:if condition="{hasProperties}"> - <f:link.external uri="{moduleUrlObjectListAction}" defaultScheme="" class="btn btn-default"> + <a href="{moduleUrlObjectListAction}" class="btn btn-default"> <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:addKey" arguments="{0:'{typoScriptPath}'}"/> - </f:link.external> + </a> </f:if> </f:then> <f:else> - <f:link.external uri="{moduleUrlObjectListAction}" defaultScheme="" class="btn btn-default"> + <a href="{moduleUrlObjectListAction}" class="btn btn-default"> <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:removeKey" arguments="{0:'{typoScriptPath}'}"/> - </f:link.external> + </al> </f:else> </f:if> </div> @@ -94,9 +94,9 @@ </f:if> <div class="row mt-3"> <div class="col-auto"> - <f:link.external uri="{moduleUrl}" defaultScheme="" class="btn btn-default"> + <a href="{moduleUrl}" class="btn btn-default"> <core:icon identifier="actions-chevron-left" /> <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:back"/> - </f:link.external> + </a> </div> </div> </f:then> @@ -202,9 +202,9 @@ <f:for each="{parseErrors}" as="parseError"> <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:severity.{parseError.1}"/> : {parseError.0} - <f:link.external uri="{showErrorDetailsUri}{parseError.2 + parseError.3}" defaultScheme="" class="text-warning"> + <a href="{showErrorDetailsUri}{parseError.2 + parseError.3}" class="text-warning"> <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:errorShowDetails"/> - </f:link.external> + </a> <br/> </f:for> </f:be.infobox> @@ -223,9 +223,9 @@ </f:if> <strong>{selectedKey}</strong> <f:if condition="{moduleUrlRemoveFromObjectList}"> - <f:link.external uri="{moduleUrlRemoveFromObjectList}" defaultScheme="" class="btn btn-default"> + <a href="{moduleUrlRemoveFromObjectList}" class="btn btn-default"> <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:removeKey" /> - </f:link.external> + </a> </f:if> </div> <div class="panel-body tstemplate-tsobjectbrowser-content"><f:format.raw>{tsTree}</f:format.raw></div> -- GitLab