Commit 17c56a13 authored by Thomas Löffler's avatar Thomas Löffler

Merge branch '445-move-buttons-to-partial' into 'develop'

Create partial for external link buttons on ext. detail page

Closes #445

See merge request !480
parents 703293d3 60159a7c
Pipeline #8782 passed with stages
in 8 minutes and 47 seconds
......@@ -583,6 +583,11 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
$this->composerName = $composerName;
}
public function getPackagistPage()
{
return 'https://packagist.org/packages/' . $this->composerName;
}
/**
* @return int
*/
......
<f:if condition="{externalLink}">
<f:link.external class="btn {f:if(condition: '{btnStyle}', then: btnStyle, else: 'btn-secondary')} btn-block" rel="nofollow" uri="{externalLink}" target="_blank">
<i class="fa {icon}"></i> {label}
</f:link.external>
</f:if>
\ No newline at end of file
......@@ -146,16 +146,10 @@
</f:if>
<f:if condition="{extension.externalManual}">
<f:then>
<f:link.external class="btn btn-info btn-block" rel="nofollow" uri="{extension.externalManual}" target="_blank">
<i class="fa fa-book"></i> External Manual
</f:link.external>
<f:render partial="ExternalButtonLink" arguments="{externalLink: extension.externalManual, icon: 'fa-book', label: 'Extension Manual', btnStyle: 'btn-info'}"/>
</f:then>
<f:else>
<f:if condition="{documentationLink}">
<f:link.external class="btn btn-info btn-block" uri="{documentationLink}" target="_blank">
<i class="fa fa-book"></i> Extension Manual
</f:link.external>
</f:if>
<f:render partial="ExternalButtonLink" arguments="{externalLink: documentationLink, icon: 'fa-book', label: 'Extension Manual', btnStyle: 'btn-info'}"/>
</f:else>
</f:if>
<f:security.ifAuthenticated>
......@@ -172,26 +166,10 @@
</f:else>
</f:if>
</f:security.ifAuthenticated>
<f:if condition="{extension.forgeLink}">
<f:link.external class="btn btn-secondary btn-block" rel="nofollow" uri="{extension.forgeLink}" target="_blank">
<i class="fa fa-hand-o-right"></i> Found an Issue?
</f:link.external>
</f:if>
<f:if condition="{extension.repositoryUrl}">
<f:link.external class="btn btn-secondary btn-block" rel="nofollow" uri="{extension.repositoryUrl}" target="_blank">
<i class="fa fa-code-fork"></i> Code Insights
</f:link.external>
</f:if>
<f:if condition="{extension.composerName}">
<f:link.external class="btn btn-secondary btn-block" rel="nofollow" uri="https://packagist.org/packages/{extension.composerName}" target="_blank">
<i class="fa fa-cube"></i> Packagist.org
</f:link.external>
</f:if>
<f:if condition="{extension.paypalUrl}">
<f:link.external class="btn btn-secondary btn-block" rel="nofollow" uri="{extension.paypalUrl}" target="_blank">
<i class="fa fa-thumbs-o-up"></i> Donate and Give Kudos
</f:link.external>
</f:if>
<f:render partial="ExternalButtonLink" arguments="{externalLink: extension.forgeLink, icon: 'fa-hand-o-right', label: 'Found an Issue?'}"/>
<f:render partial="ExternalButtonLink" arguments="{externalLink: extension.repositoryUrl, icon: 'fa-code-fork', label: 'Code Insights'}"/>
<f:render partial="ExternalButtonLink" arguments="{externalLink: extension.packagistPage, icon: 'fa-cube', label: 'Packagist.org'}"/>
<f:render partial="ExternalButtonLink" arguments="{externalLink: extension.paypalUrl, icon: 'fa-thumbs-o-up', label: 'Donate and Give Kudos'}"/>
<div class="alert alert-secondary">
<f:render partial="ExtensionSingleInfo" arguments="{extension:extension, settings:settings, owner:owner, flattrUrl:flattrUrl, documentationLink:documentationLink, qualityLinkNotBroken:qualityLinkNotBroken, urlToQualityServer:urlToQualityServer}" />
......
Markdown is supported
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