visualn-8.x-1.x-dev/modules/visualn_embed/templates/visualn-embed-drawing.html.twig

modules/visualn_embed/templates/visualn-embed-drawing.html.twig
{% set attributes = create_attribute() %}

{% set align,width,height = properties.align, properties.width, properties.height %}
{% if align %}
  {% set attributes = attributes.addClass('align-' ~ align) %}
{% endif %}


{% set style = '' %}
{% if width %}
  {% set style = style ~ 'width:' ~ width ~ 'px;' %}
{% endif %}
{% if height %}
  {% set style = style ~ 'height:' ~ height ~ 'px;' %}
{% endif %}
{% if style %}
  {% set attributes = attributes.setAttribute('style', style) %}
{% endif %}


<div {{ attributes.addClass('visualn-ckeditor-drawing-img') }}>

{% if id %}
  {% if has_access %}
    <div>{{ 'Drawing name'|t }}: {{ label }}</div>
    <div>{{ 'Drawing type'|t }}: {{ type }}</div>
  {% else %}
    <div>{{ 'You don\'t have permissions to view the drawing'|t }}</div>
  {% endif %}
  <div>
    {{ 'Drawing id'|t }}: {{ id }}
  </div>
{#
  <div>
    Fetcher field: {{ id }}
  </div>
  <div>
    Fetcher plugin: {{ id }}
  </div>
#}
{% else %}
  <div>
    Drawing not found
  </div>
{% endif %}
</div>

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

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