index.html.twig 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ parent() }} - {{article.title}}{% endblock %}
  3. {% block body %}
  4. <a href="{{ path('app_index')}}">Retour au blog</a>
  5. {% if not workflow_has_marked_place(article, 'published') %}
  6. <div class="unpublished">
  7. {{ article.state | trans }}
  8. </div>
  9. {% endif %}
  10. <div>
  11. <article class="article">
  12. <header class="titre-article">
  13. <h1>{{ article.title}}</h1>
  14. <p class="article-by">{{ article.publicationDate | format_date('long')}} - {{ article.author }}</p>
  15. <p class="article-by">
  16. {% for tag in article.tags %}
  17. <a href="{{ path('app_search', {'tag': tag.name}) }}"><span class="tag">{{ tag }}</span></a>
  18. {% if not loop.last %} {% endif %}
  19. {% endfor %}
  20. </p>
  21. </header>
  22. <section class="contenu">
  23. {{ article.content | markdown }}
  24. </section>
  25. <footer></footer>
  26. </article>
  27. </div>
  28. <a href="{{ path('app_index')}}">Retour au blog</a>
  29. {% if is_granted('edit', article) %}
  30. <a class="btn btn-blue" href="{{ path('app_article_edit', {'id': article.id}) }}">Modifier cet article</a>
  31. {% endif %}
  32. {% endblock %}