diff --git a/typo3/sysext/dashboard/Resources/Private/Partials/Widget/Button.html b/typo3/sysext/dashboard/Resources/Private/Partials/Widget/Button.html new file mode 100644 index 0000000000000000000000000000000000000000..7de7f52b7a394199c06145a73a3bde331eefd296 --- /dev/null +++ b/typo3/sysext/dashboard/Resources/Private/Partials/Widget/Button.html @@ -0,0 +1,5 @@ +<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> +<f:if condition="{button}"> + <a href="{button.link}" class="widget-cta"{f:if(condition: '{button.target}', then: ' target="{button.target}"')}{f:if(condition: '{button.target} == "_blank"', then: ' rel="noreferrer"')}>{f:translate(id: button.title, default: button.title)}</a> +</f:if> +</html> diff --git a/typo3/sysext/dashboard/Resources/Private/Templates/Widget/ChartWidget.html b/typo3/sysext/dashboard/Resources/Private/Templates/Widget/ChartWidget.html index e446cdfe702ab08e4119c0a5cd6d31dd55d757ba..0bbe2baf003480eb127383fb0f91b6e442a1a857 100644 --- a/typo3/sysext/dashboard/Resources/Private/Templates/Widget/ChartWidget.html +++ b/typo3/sysext/dashboard/Resources/Private/Templates/Widget/ChartWidget.html @@ -8,10 +8,6 @@ </f:section> <f:section name="footer"> - - <f:if condition="{button}"> - <a href="{button.link}" target="{button.target}" class="widget-cta">{f:translate(id: button.title, default: button.title)}</a> - </f:if> - + <f:render partial="Widget/Button" arguments="{button: button}"/> </f:section> </html> diff --git a/typo3/sysext/dashboard/Resources/Private/Templates/Widget/CtaWidget.html b/typo3/sysext/dashboard/Resources/Private/Templates/Widget/CtaWidget.html index 226397f55559146d0c1b08e8ac597f8a18015d05..2b3e42d02f59c8bab373c8f0ca742cdae5d5a44b 100644 --- a/typo3/sysext/dashboard/Resources/Private/Templates/Widget/CtaWidget.html +++ b/typo3/sysext/dashboard/Resources/Private/Templates/Widget/CtaWidget.html @@ -1,4 +1,4 @@ -<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"> +<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <f:layout name="Widget/Widget"/> <f:section name="main"> @@ -8,8 +8,6 @@ </f:section> <f:section name="footer"> - <f:if condition="{button}"> - <a href="{button.link}" target="{button.target}" class="widget-cta">{f:translate(id: button.title, default: button.title)}</a> - </f:if> + <f:render partial="Widget/Button" arguments="{button: button}"/> </f:section> </html> diff --git a/typo3/sysext/dashboard/Resources/Private/Templates/Widget/ListWidget.html b/typo3/sysext/dashboard/Resources/Private/Templates/Widget/ListWidget.html index d0d4cdf9fc8194773194ea15e8a7203971e33e5b..a0c809d38d91d4841942d6141c8f86ab7b269d6a 100644 --- a/typo3/sysext/dashboard/Resources/Private/Templates/Widget/ListWidget.html +++ b/typo3/sysext/dashboard/Resources/Private/Templates/Widget/ListWidget.html @@ -1,4 +1,4 @@ -<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"> +<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <f:layout name="Widget/Widget" /> <f:section name="main"> @@ -12,8 +12,6 @@ </f:section> <f:section name="footer"> - <f:if condition="{button}"> - <a href="{button.link}" target="{button.target}" class="widget-cta">{f:translate(id: button.title, default: button.title)}</a> - </f:if> + <f:render partial="Widget/Button" arguments="{button: button}"/> </f:section> </html> diff --git a/typo3/sysext/dashboard/Resources/Private/Templates/Widget/RssWidget.html b/typo3/sysext/dashboard/Resources/Private/Templates/Widget/RssWidget.html index 0e3e5459660723e3a9e0357908f3264e9fd91f0b..3875ec5b7343c191f6129f7a65e55fe3cdaea14d 100644 --- a/typo3/sysext/dashboard/Resources/Private/Templates/Widget/RssWidget.html +++ b/typo3/sysext/dashboard/Resources/Private/Templates/Widget/RssWidget.html @@ -1,4 +1,4 @@ -<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"> +<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <f:layout name="Widget/Widget" /> <f:section name="main"> @@ -7,7 +7,7 @@ <f:for each="{items}" as="item"> <tr> <td> - <f:link.external uri="{item.link}" target="_blank"><strong>{item.title}</strong></f:link.external> + <f:link.external uri="{item.link}" target="_blank" rel="noreferrer"><strong>{item.title}</strong></f:link.external> <small><time datetime="{item.pubDate -> f:format.date(format: '%Y-%m-%d')}">{item.pubDate -> f:format.date()}</time></small> <p>{item.description -> f:format.crop(maxCharacters: 180)}</p> </td> @@ -18,8 +18,6 @@ </f:section> <f:section name="footer"> - <f:if condition="{button}"> - <a href="{button.link}" target="{button.target}" class="widget-cta">{f:translate(id: button.title, default: button.title)}</a> - </f:if> + <f:render partial="Widget/Button" arguments="{button: button}"/> </f:section> </html>