attribution-1.0.x-dev/templates/attribution-html.html.twig
templates/attribution-html.html.twig
{#
/**
* @file
* Default theme implementation to display an attribution.
*
* Available variables:
* - source.name: The name of the source.
* - source.link: The link to the source.
* - author.name: The name of the author.
* - author.link: The link to the author.
* - license: The associated license.
* - license.id: The spdx license short code.
* - license.name: The spdx license name.
* - license.osiCertified: Is the license OSI certified?
* - license.deprecated: Is the license deprecated?
* - license.link: The link to the license.
*
* @ingroup themeable
*/
#}
{% if source or author or license %}
<div{{ attributes }}>
<dl class="attribution attribution--license-{{ license.id }}">
{% if source %}
<dt class="attribution--source-title">
{{ 'Source'|trans }}
</dt>
<dd class="attribution--source-name">
{% if source.link %}
<a href="{{ source.link }}">{{ source.name ? source.name : source.link }}</a>
{% else %}
{{ source.name }}
{% endif %}
</dd>
{% endif %}
{% if source %}
<dt class="attribution--author-title">
{{ 'Author'|trans }}
</dt>
<dd class="attribution--author-name">
{% if author.link %}
<a href="{{ author.link }}">{{ author.name ? author.name : author.link }}</a>
{% else %}
{{ author.name }}
{% endif %}
</dd>
{% endif %}
{% if license %}
<dt class="attribution--license-title">
{{ 'License'|trans }}
</dt>
<dd class="attribution--license-definition">
<ul>
<li class="attribution--license-link"><a href="{{ license.link }}">{{ license.name|trans }}</a></li>
<li class="attribution--license-osi-approved">{{ 'OSI approved:'|trans }} {{ license.osiCertified ? 'Yes' : 'No'|trans }}</li>
<li class="attribution--license-deprecated">{{ 'Deprecated:'|trans }} {{ license.deprecated ? 'Yes' : 'No'|trans }}</li>
</ul>
</dd>
{% endif %}
</dl>
</div>
{% endif %}
