ui_patterns-8.x-1.4/modules/ui_patterns_library/templates/patterns-meta-information.html.twig

modules/ui_patterns_library/templates/patterns-meta-information.html.twig
{#
/**
 * @file
 * UI Pattern meta information.
 */
#}

{% if pattern is not empty %}

  {# Pattern name and description. #}
  <h3 class="pattern-preview__label">{{ pattern.label }}</h3>
  <p class="pattern-preview__description">{{ pattern.description }}</p>
  {% if pattern.tags %}
  <div class="pattern-preview__tags">
    {{ "Tags:"|t }}
    <ul>
    {% for tag in pattern.tags %}
       <li>{{ tag }}</li>
    {% endfor %}
    </ul>
  </div>
  {% endif %}

  {# Pattern fields descriptions. #}
  {% if pattern.fields or pattern.additional.settings %}
    <table class="pattern-preview__fields">
      <thead>
        <tr>
          <th>{{ "Type"|t }}</th>
          <th>{{ "Name"|t }}</th>
          <th>{{ "Label"|t }}</th>
          <th>{{ "Type"|t }}</th>
          <th>{{ "Description"|t }} / {{ "Options"|t }}</th>
        </tr>
      </thead>
      <tbody>
      {% for field in pattern.fields %}
        <tr>
          <td>{{ "Field"|t }}</td>
          <td><code>{{ field.name }}</code></td>
          <td>{{ field.label }}</td>
          <td><code>{{ field.type }}</code></td>
          <td>{{ field.description }}</td>
        </tr>
      {% endfor %}
      {% for name, setting in pattern.additional.settings %}
        <tr>
          <td>{{ "Setting"|t }}</td>
          <td><code>{{ name }}</code></td>
          <td>{{ setting.label }}</td>
          <td><code>{{ setting.type }}</code></td>
          <td>{{ setting.description }}
            {% if setting.options %}
              <ul>
                {% for key, label in setting.options %}
                  <li>{{ key }}: {{ label }}</li>
                {% endfor %}
              </ul>
            {% endif %}
          </td>
        </tr>
      {% endfor %}
      </tbody>
    </table>
  {% endif %}

{% endif %}

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

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