show.html.twig 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Article{% endblock %}
  3. {% block body %}
  4. <h1>Article</h1>
  5. <table class="table">
  6. <tbody>
  7. <tr>
  8. <th>Id</th>
  9. <td>{{ article.id }}</td>
  10. </tr>
  11. <tr>
  12. <th>Titre</th>
  13. <td>{{ article.title }}</td>
  14. </tr>
  15. <tr>
  16. <th>Permalien</th>
  17. <td>{{ url('app_view', {slug: article.slug}) }}</td>
  18. </tr>
  19. <tr>
  20. <th>Tags</th>
  21. <td>
  22. {% for tag in article.tags %}
  23. <span class="tag">{{ tag }}</span>
  24. {% if not loop.last %} {% endif %}
  25. {% endfor %}
  26. </td>
  27. </tr>
  28. <tr>
  29. <th>Date de publication</th>
  30. <td>{{ article.publicationDate ? article.publicationDate|date('Y-m-d H:i:s') : '' }}</td>
  31. </tr>
  32. <tr>
  33. <th>Etat</th>
  34. <td><span class="badge badge-{{ article.state }}">{{ article.state | trans }}</span></td>
  35. </tr>
  36. <tr>
  37. <th>Contenu</th>
  38. <td>
  39. {{ article.content | markdown }}
  40. </td>
  41. </tr>
  42. </tbody>
  43. </table>
  44. <a href="{{ path('app_article_index') }}">Retour à la liste</a>
  45. <a href="{{ path('app_article_edit', {'id': article.id}) }}" class="btn btn-blue">Editer</a>
  46. <a href="{{ path('app_view', {'slug': article.slug}) }}" class="btn btn-green">Aperçu</a>
  47. {{ include('article/_delete_form.html.twig') }}
  48. {{ include('article/_bouton_agrandir.html.twig') }}
  49. {% endblock %}