You are here

update-version.html.twig in Composer Deploy 8

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

File

templates/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. * - version: A list of data about the latest released version, containing:
  10. * - version: The version number.
  11. * - date: The date of the release.
  12. * - download_link: The URL for the downloadable file.
  13. * - release_link: The URL for the release notes.
  14. */
  15. #}
  16. <div class="{{ attributes.class }} project-update__version"{{ attributes|without('class') }}>
  17. <div class="clearfix">
  18. <div class="project-update__version-title layout-column layout-column--quarter">{{ title }}</div>
  19. <div class="project-update__version-details layout-column layout-column--quarter">
  20. <a href="{{ version.release_link }}">{{ version.version }}</a>
  21. <span class="project-update__version-date">({{ version.date|date('Y-M-d') }})</span>
  22. </div>
  23. <div class="layout-column layout-column--half">
  24. <ul class="project-update__version-links">
  25. <li class="project-update__download-link">
  26. <a href="{{ version.download_link }}">{{ 'Download'|t }}</a>
  27. </li>
  28. <li class="project-update__release-notes-link">
  29. <a href="{{ version.release_link }}">{{ 'Release notes'|t }}</a>
  30. </li>
  31. {% if core_compatibility_details %}
  32. <li class="project-update__compatibility-details">
  33. {{ core_compatibility_details }}
  34. </li>
  35. {% endif %}
  36. {% if version.diff_link %}
  37. <li class="project-update__diff-link">
  38. <a href="{{ version.diff_link }}">{{ 'Diff'|t }}</a>
  39. </li>
  40. {% endif %}
  41. </ul>
  42. </div>
  43. </div>
  44. </div>