attribution-1.0.x-dev/templates/attribution-creative-commons.html.twig

templates/attribution-creative-commons.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
 */
#}
<div{{ attributes }}>
  {% if source or author or license %}
    {{ 'This work'|trans }}
    {% if source.link %}
      <a href="{{ source.link }}">{% if source.name %}{{ source.name }}{% else %}{{ source.link }}{% endif %}</a>
    {% elseif source.name %}
      "{{ source.name }}"
    {% endif %}

    {% if author.link %}
      {{ 'by'|trans }} <a href="{{ author.link }}">{% if author.name %}{{ author.name }}{% else %}{{ author.link }}{% endif %}</a>
    {% elseif author.name %}
      {{ 'by'|trans }} {{ author.name }}
    {% endif %}

    {{ 'is licensed under'|trans }} <a href="{{ license.link }}">{{ license.name }}</a>
  {% endif %}
</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc