story_details.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. {% extends '_layout.html' %}
  2. {% block title %}
  3. {{ story.name }}
  4. {% endblock %}
  5. {% block breadcrumb %}
  6. <li><a href="{% url 'index' %}">Accueil</a></li>
  7. {% if story.epic %}
  8. <li><a href="{% url 'epic_details' epic_id=story.epic.id %}">Epic #{{ story.epic.id }}</a></li>
  9. {% else %}
  10. <li><a href="{% url 'story_index' %}">Toutes les Stories</a></li>
  11. {% endif %}
  12. <li><a>Story #{{ story.id }}</a></li>
  13. {% endblock %}
  14. {% block main %}
  15. {% load martortags %}
  16. <header>
  17. <div class="flex-row">
  18. {% if story.epic %}
  19. <span class="annotation flex-extend">
  20. Epic: <a href="{% url 'epic_details' epic_id=story.epic.id %}">{{ story.epic.name }}</a>
  21. </span>
  22. {% endif %}
  23. <blockquote class="annotation">Créée par {{ story.author.get_full_name }}, le {{ story.created }}</blockquote>
  24. </div>
  25. <div class="flex-row title-bar">
  26. {% if story.weight %}
  27. <span style="margin-right: 10px;">{% include 'weight_svg.html' with weight=story.weight h=36 %}</span>
  28. {% endif %}
  29. {% if story.closed %}
  30. <h2 class="flex-extend" style="color: grey;">[Terminée] {{ story.name }}</h2>
  31. {% else %}
  32. <h2 class="flex-extend">{{ story.name }}</h2>
  33. {% endif %}
  34. <ul class="actions small">
  35. {% if story.closed %}
  36. <li><a class="button alt icon fa-folder-open tool-btn" href="{% url 'story_reopen' story_id=story.id %}" title="Ré-ouvrir">Ré-ouvrir</a></li>
  37. {% else %}
  38. <li><a class="button special icon fa-check tool-btn" href="{% url 'story_close' story_id=story.id %}" title="Marquer comme terminée">Cloturer</a></li>
  39. {% endif %}
  40. <li><a class="button special icon fa-edit tool-btn" href="{% url 'story_edit' story_id=story.id %}" title="Modifier"></a></li>
  41. <!-- <li><a class="button icon fa-trash tool-btn" href="{% url 'story_delete' story_id=story.id %}" title="Supprimer"></a></li> -->
  42. </ul>
  43. </div>
  44. </header>
  45. <hr>
  46. <div class="description">
  47. {% if story.description %}
  48. {{ story.description|safe_markdown }}
  49. {% else %}
  50. <i style="color:grey;">(Pas de description)</i>
  51. {% endif %}
  52. </div>
  53. <hr>
  54. <div class="flex-row">
  55. <h5>Assignée à</h5>
  56. <ul class="tags-list">
  57. {% for user in story.assignees.all %}
  58. <li>{{ user.get_full_name }}</li>
  59. {% empty %}
  60. <li>(Aucun)</li>
  61. {% endfor %}
  62. </ul>
  63. </div>
  64. <div class="flex-row">
  65. <h5>Sprints</h5>
  66. <ul class="tags-list">
  67. {% for sprint in story.sprints.all %}
  68. <li>{{ sprint }}</li>
  69. {% empty %}
  70. <li>(Aucun)</li>
  71. {% endfor %}
  72. </ul>
  73. </div>
  74. <hr>
  75. <div class="comment-section">
  76. <ul class="alt">
  77. {% for comment in story.comments.all %}
  78. <li class="flex-col">
  79. <div><h5><i class="fa fa-comment"></i> {{ comment.author }}, le {{ comment.created }}:</h5></b></div>
  80. <div class="comment-display">
  81. {{ comment.content|safe_markdown }}
  82. </div>
  83. </li>
  84. {% endfor %}
  85. </ul>
  86. <form action="{% url 'story_comment' story_id=story.id %}" method="post" accept-charset="utf-8">
  87. {% csrf_token %}
  88. {{ comment_form.as_p }}
  89. <div class="flex-row flex-end" style="margin-top: 10px;">
  90. <input type="submit">
  91. </div>
  92. </form>
  93. </div>
  94. {% endblock %}