You are here

skinr-ui-library-details.html.twig in Skinr 8.2

Default theme implementation for the skinr library page.

Displays a list of all available skins.

Available variables:

  • skin_infos: 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.

File

skinr_ui/templates/skinr-ui-library-details.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the skinr library page.
  5. *
  6. * Displays a list of all available skins.
  7. *
  8. * Available variables:
  9. * - skin_infos: Contains multiple module instances. Each module contains:
  10. * - attributes: Attributes on the row.
  11. * - checkbox: A checkbox for enabling the module.
  12. * - name: The human-readable name of the module.
  13. * - id: A unique identifier for interacting with the details element.
  14. * - enable_id: A unique identifier for interacting with the checkbox element.
  15. * - description: The description of the module.
  16. * - machine_name: The module's machine name.
  17. * - version: Information about the module version.
  18. * - requires: A list of modules that this module requires.
  19. * - required_by: A list of modules that require this module.
  20. * - links: A list of administration links provided by the module.
  21. *
  22. * @see template_preprocess_skinr_ui_library_details()
  23. *
  24. * @ingroup themeable
  25. */
  26. #}
  27. <table class="responsive-enabled" data-striping="1">
  28. <thead>
  29. <tr>
  30. <th class="checkbox visually-hidden">{{ 'Enabled'|t }}</th>
  31. <th class="name visually-hidden">{{ 'Name'|t }}</th>
  32. <th class="description visually-hidden priority-low">{{ 'Description'|t }}</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. {% for skin_info in skin_infos %}
  37. {% set zebra = cycle(['odd', 'even'], loop.index0) %}
  38. <tr{{ skin_info.attributes.addClass(zebra) }}>
  39. <td class="checkbox">
  40. {{ skin_info.checkbox }}
  41. </td>
  42. <td class="skin">
  43. <label id="{{ skin_info.id }}" for="{{ skin_info.enable_id }}" class="skin-name table-filter-text-source">{{ skin_info.name }}</label>
  44. </td>
  45. <td class="description expand priority-low">
  46. <details class="js-form-wrapper form-wrapper" id="{{ skin_info.enable_id }}-description">
  47. <summary aria-controls="{{ skin_info.enable_id }}-description" role="button" aria-expanded="false"><span class="text skin-description">{{ skin_info.description }}</span></summary>
  48. <div class="details-wrapper">
  49. <div class="details-description">
  50. <div class="requirements">
  51. {% if skin_info.version %}
  52. <div class="admin-requirements">{{ 'Version: @skin-version'|t({'@skin-version': skin_info.version }) }}</div>
  53. {% endif %}
  54. {% if skin_info.source %}
  55. <div class="admin-requirements">{{ 'Source: @skin-source'|t({'@skin-source': skin_info.source }) }}</div>
  56. {% endif %}
  57. {% if skin_info.theme_hooks %}
  58. <div class="admin-requirements">{{ 'Theme hooks: @skin-theme-hooks'|t({'@skin-theme-hooks': skin_info.theme_hooks }) }}</div>
  59. {% endif %}
  60. </div>
  61. </div>
  62. </div>
  63. </details>
  64. </td>
  65. </tr>
  66. {% endfor %}
  67. </tbody>
  68. </table>