update-version.html.twig

Same filename in this branch
  1. 9 core/themes/claro/templates/admin/update-version.html.twig
  2. 9 core/themes/stable/templates/admin/update-version.html.twig
  3. 9 core/modules/update/templates/update-version.html.twig
Same filename in other branches
  1. 8.9.x core/themes/claro/templates/admin/update-version.html.twig
  2. 8.9.x core/themes/stable/templates/admin/update-version.html.twig
  3. 8.9.x core/modules/update/templates/update-version.html.twig
  4. 10 core/themes/stable9/templates/admin/update-version.html.twig
  5. 10 core/themes/claro/templates/admin/update-version.html.twig
  6. 10 core/modules/update/templates/update-version.html.twig
  7. 11.x core/themes/stable9/templates/admin/update-version.html.twig
  8. 11.x core/themes/claro/templates/admin/update-version.html.twig
  9. 11.x core/modules/update/templates/update-version.html.twig

Theme override for the version display of a project.

Available variables:

  • attributes: HTML attributes suitable for a container element.
  • title: The title of the project.
  • core_compatibility_details: Render array of core compatibility details.
  • version: A list of data about the latest released version, containing:
    • version: The version number.
    • date: The date of the release.
    • download_link: The URL for the downloadable file.
    • release_link: The URL for the release notes.
    • core_compatible: A flag indicating whether the project is compatible with the currently installed version of Drupal core. This flag is not set for the Drupal core project itself.
    • core_compatibility_message: A message indicating the versions of Drupal core with which this project is compatible. This message is also contained within the 'core_compatibility_details' variable documented above. This message is not set for the Drupal core project itself.

See also

template_preprocess_update_version()

1 theme call to update-version.html.twig
template_preprocess_update_project_status in core/modules/update/update.report.inc
Prepares variables for update project status templates.

File

core/themes/stable9/templates/admin/update-version.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for the version display of a project.
  5. *
  6. * Available variables:
  7. * - attributes: HTML attributes suitable for a container element.
  8. * - title: The title of the project.
  9. * - core_compatibility_details: Render array of core compatibility details.
  10. * - version: A list of data about the latest released version, containing:
  11. * - version: The version number.
  12. * - date: The date of the release.
  13. * - download_link: The URL for the downloadable file.
  14. * - release_link: The URL for the release notes.
  15. * - core_compatible: A flag indicating whether the project is compatible
  16. * with the currently installed version of Drupal core. This flag is not
  17. * set for the Drupal core project itself.
  18. * - core_compatibility_message: A message indicating the versions of Drupal
  19. * core with which this project is compatible. This message is also
  20. * contained within the 'core_compatibility_details' variable documented
  21. * above. This message is not set for the Drupal core project itself.
  22. *
  23. * @see template_preprocess_update_version()
  24. */
  25. #}
  26. <div class="{{ attributes.class }} project-update__version"{{ attributes|without('class') }}>
  27. <div class="clearfix">
  28. <div class="project-update__version-title layout-column layout-column--quarter">{{ title }}</div>
  29. <div class="project-update__version-details layout-column layout-column--quarter">
  30. <a href="{{ version.release_link }}">{{ version.version }}</a>
  31. <span class="project-update__version-date">({{ version.date|date('Y-M-d') }})</span>
  32. </div>
  33. <div class="layout-column layout-column--half">
  34. <ul class="project-update__version-links">
  35. {% if version.core_compatible is not defined or version.core_compatible %}
  36. <li class="project-update__download-link">
  37. <a href="{{ version.download_link }}">{{ 'Download'|t }}</a>
  38. </li>
  39. {% endif %}
  40. <li class="project-update__release-notes-link">
  41. <a href="{{ version.release_link }}">{{ 'Release notes'|t }}</a>
  42. </li>
  43. {% if core_compatibility_details %}
  44. <li class="project-update__compatibility-details">
  45. {{ core_compatibility_details }}
  46. </li>
  47. {% endif %}
  48. </ul>
  49. </div>
  50. </div>
  51. </div>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.