update-version.html.twig 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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. * @ingroup themeable
  26. */
  27. #}
  28. <div class="{{ attributes.class }} project-update__version"{{ attributes|without('class') }}>
  29. <div class="clearfix">
  30. <div class="project-update__version-title layout-column layout-column--quarter">{{ title }}</div>
  31. <div class="project-update__version-details layout-column layout-column--quarter">
  32. <a href="{{ version.release_link }}">{{ version.version }}</a>
  33. <span class="project-update__version-date">({{ version.date|date('Y-M-d') }})</span>
  34. </div>
  35. <div class="layout-column layout-column--half">
  36. <ul class="project-update__version-links">
  37. {% if version.core_compatible is not defined or version.core_compatible %}
  38. <li class="project-update__download-link">
  39. <a href="{{ version.download_link }}">{{ 'Download'|t }}</a>
  40. </li>
  41. {% endif %}
  42. <li class="project-update__release-notes-link">
  43. <a href="{{ version.release_link }}">{{ 'Release notes'|t }}</a>
  44. </li>
  45. {% if core_compatibility_details %}
  46. <li class="project-update__compatibility-details">
  47. {{ core_compatibility_details }}
  48. </li>
  49. {% endif %}
  50. </ul>
  51. </div>
  52. </div>
  53. </div>