yeti_theme-8.x-1.x-dev/templates/form/system-modules-details.html.twig

templates/form/system-modules-details.html.twig
{#
/**
 * @file
 * Yeti theme implementation for the modules listing page.
 *
 * Displays a list of all packages in a project.
 *
 * Available variables:
 * - modules: Contains multiple module instances. Each module contains:
 *   - attributes: Attributes on the row.
 *   - checkbox: A checkbox for enabling the module.
 *   - name: The human-readable name of the module.
 *   - id: A unique identifier for interacting with the details element.
 *   - enable_id: A unique identifier for interacting with the checkbox element.
 *   - description: The description of the module.
 *   - machine_name: The module's machine name.
 *   - version: Information about the module version.
 *   - requires: A list of modules that this module requires.
 *   - required_by: A list of modules that require this module.
 *   - links: A list of administration links provided by the module.
 *
 * @see template_preprocess_system_modules_details()
 *
 * @ingroup themeable
 */
#}
{{ attach_library('yeti/system_modules.details') }}
<div class="grid-x grid-padding-x">
  <table class="small-12 cell">
    <thead>
      <tr>
        <th class="checkbox show-for-sr">{{ 'Installed'|t }}</th>
        <th class="name show-for-sr">{{ 'Name'|t }}</th>
        <th class="description show-for-sr priority-low">{{ 'Description'|t }}</th>
      </tr>
    </thead>
    <tbody>
      {% for module in modules %}
        {% set zebra = cycle(['odd', 'even'], loop.index0) %}
        <tr{{ module.attributes.addClass(zebra) }}>
          <td class="checkbox">
            {{ module.checkbox }}
          </td>
          <td class="module">
            <label id="{{ module.id }}" for="{{ module.enable_id }}" class="module-name table-filter-text-source">{{ module.name }}</label>
          </td>
          <td class="description expand priority-low">
            <details class="js-form-wrapper form-wrapper" id="{{ module.enable_id }}-description">
              <summary aria-controls="{{ module.enable_id }}-description" role="button" aria-expanded="false"><span class="text module-description">{{ module.description }}</span></summary>
              <div class="details-wrapper">
                <div class="details-description">
                  <div class="requirements">
                    <div class="admin-requirements">{{ 'Machine name: <span dir="ltr" class="table-filter-text-source">@machine-name</span>'|t({'@machine-name': module.machine_name }) }}</div>
                    {% if module.version %}
                      <div class="admin-requirements">{{ 'Version: @module-version'|t({'@module-version': module.version }) }}</div>
                    {% endif %}
                    {% if module.requires %}
                      <div class="admin-requirements">{{ 'Requires: @module-list'|t({'@module-list': module.requires }) }}</div>
                    {% endif %}
                    {% if module.required_by %}
                      <div class="admin-requirements">{{ 'Required by: @module-list'|t({'@module-list': module.required_by }) }}</div>
                    {% endif %}
                  </div>
                  {% if module.links %}
                    <ul class="menu-links">
                      {% for link_type in ['help', 'permissions', 'configure'] %}
                        <li>{{ module.links[link_type] }}</li>
                      {% endfor %}
                    </ul>
                  {% endif %}
                </div>
              </div>
            </details>
          </td>
        </tr>
      {% endfor %}
    </tbody>
  </table>
</div>

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

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