Reputation:
Reputation:
Reputation:
<xf:if is="$resource.isDownloadable()">
<div class="p-title-pageAction">
<xf:if is="$resource.canDownload()">
<xf:button href="{{ link('resources/download', $resource) }}"
class="button--cta"
data-xf-click="{{ $resource.CurrentVersion.file_count > 1 ? 'overlay' : '' }}"
icon="download">{{ phrase('download') }}</xf:button>
<xf:else />
<span class="button is-disabled">{{ phrase('xfrm_no_permission_to_download') }}</span>
</xf:if>
</div>
<xf:elseif is="$resource.isExternalPurchasable()" />
<div class="p-title-pageAction">
<xf:if is="$resource.canDownload()">
<xf:button href="{$resource.external_purchase_url}" class="button--cta" icon="purchase">{{ phrase('xfrm_buy_for_x', {'price': $resource.price|currency($resource.currency)}) }}</xf:button>
<xf:else />
<span class="button is-disabled">{{ phrase('xfrm_no_permission_to_buy_price_x', {'price': $resource.price|currency($resource.currency)}) }}</span>
</xf:if>
</div>
</xf:if>