|
@@ -1,13 +1,13 @@
|
|
|
{% extends '_layout.html' %}
|
|
{% extends '_layout.html' %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
{% block title %}
|
|
|
- Clotûre de sprint
|
|
|
|
|
|
|
+ Clotûre de {{ sprint }}
|
|
|
{% endblock %}
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|
{% block breadcrumb %}
|
|
{% block breadcrumb %}
|
|
|
<li><a href="{% url 'index' %}">Accueil</a></li>
|
|
<li><a href="{% url 'index' %}">Accueil</a></li>
|
|
|
- <li><a>Clotûre de sprint</a></li>
|
|
|
|
|
|
|
+ <li><a>Clotûre du {{ sprint }}</a></li>
|
|
|
{% endblock %}
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block main %}
|
|
{% block main %}
|
|
@@ -19,35 +19,43 @@
|
|
|
</div>
|
|
</div>
|
|
|
</header>
|
|
</header>
|
|
|
|
|
|
|
|
- <h5>Clore les stories</h5>
|
|
|
|
|
|
|
+ <h4>Clore les stories</h4>
|
|
|
<table>
|
|
<table>
|
|
|
{% for story in sprint.stories.all|dictsort:"id" %}
|
|
{% for story in sprint.stories.all|dictsort:"id" %}
|
|
|
<tr data-id="{{ story.id }}">
|
|
<tr data-id="{{ story.id }}">
|
|
|
<td class="btn-cell">
|
|
<td class="btn-cell">
|
|
|
{% if story.closed %}
|
|
{% if story.closed %}
|
|
|
- <a class="button special icon fa-check tool-btn" style="color: green !important; background: none !important;"></a>
|
|
|
|
|
|
|
+ <a href="" class="story_close button special icon fa-check tool-btn already-checked"></a>
|
|
|
{% else %}
|
|
{% else %}
|
|
|
- <a href="" class="story_close button special icon fa-check tool-btn"></a>
|
|
|
|
|
|
|
+ <a href="" class="story_close button special icon fa-check tool-btn" title="Clôre"></a>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
</td>
|
|
</td>
|
|
|
- <td>{{ story.name }}</td>
|
|
|
|
|
|
|
+ <td class="btn-cell-2">
|
|
|
|
|
+ {% if story.closed %}
|
|
|
|
|
+ <a class="button special icon fa-mail-forward tool-btn disabled"></a>
|
|
|
|
|
+ {% else %}
|
|
|
|
|
+ <a href="" class="story_reaffect button special icon fa-mail-forward tool-btn" title="Ré-affecter à {{ next_sprint }}"></a>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ </td>
|
|
|
|
|
+
|
|
|
|
|
+ <td><a href="{% url 'story_details' story_id=story.id %}">{{ story.name }}</a></td>
|
|
|
|
|
+
|
|
|
<td width="1%">{% if story.weight %}<span>{% include 'weight_svg.html' with weight=story.weight h=20 %}</span>{% endif %}</td>
|
|
<td width="1%">{% if story.weight %}<span>{% include 'weight_svg.html' with weight=story.weight h=20 %}</span>{% endif %}</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
</table>
|
|
</table>
|
|
|
|
|
|
|
|
- <h5>Rétrospective</h5>
|
|
|
|
|
- <form action="." method="post" enctype="multipart/form-data">
|
|
|
|
|
|
|
+ <h4>Rétrospective</h4>
|
|
|
|
|
+ <form id="retro-section" action="." method="post" enctype="multipart/form-data">
|
|
|
{% csrf_token %}
|
|
{% csrf_token %}
|
|
|
|
|
|
|
|
{{ form.retro }}
|
|
{{ form.retro }}
|
|
|
|
|
|
|
|
<div class="flex-row flex-end" style="margin-top: 10px;">
|
|
<div class="flex-row flex-end" style="margin-top: 10px;">
|
|
|
- <input type="submit" value="Enregistrer">
|
|
|
|
|
|
|
+ <input type="submit" value="Enregistrer et clôre le sprint">
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<script>
|
|
<script>
|
|
|
function csrfSafeMethod(method) {
|
|
function csrfSafeMethod(method) {
|
|
|
// these HTTP methods do not require CSRF protection
|
|
// these HTTP methods do not require CSRF protection
|
|
@@ -87,7 +95,8 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
success: function (response) {
|
|
success: function (response) {
|
|
|
- story_tr.find('.btn-cell').html('<a class="button special icon fa-check tool-btn" style="color: green !important; background: none !important;"></a>');
|
|
|
|
|
|
|
+ story_tr.find('.btn-cell').html('<a class="button special icon fa-check tool-btn already-checked"></a>');
|
|
|
|
|
+ story_tr.find('.btn-cell-2').html('<a class="button special icon fa-mail-forward tool-btn disabled"></a>');
|
|
|
},
|
|
},
|
|
|
failure: function (response) {
|
|
failure: function (response) {
|
|
|
alert(response.responseText);
|
|
alert(response.responseText);
|
|
@@ -96,7 +105,41 @@
|
|
|
alert(response.responseText);
|
|
alert(response.responseText);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $(".story_reaffect").click(function(event) {
|
|
|
|
|
+ event.preventDefault();
|
|
|
|
|
+ var story_tr = $(this).closest('tr');
|
|
|
|
|
+ var story_id = story_tr.data('id');
|
|
|
|
|
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ type: "POST",
|
|
|
|
|
+ url: "/stories/axreaffect/" + story_id + "/",
|
|
|
|
|
+ data: '{story_id:' + story_id + '}',
|
|
|
|
|
+ contentType: "application/json; charset=utf-8",
|
|
|
|
|
+ dataType: "json",
|
|
|
|
|
+ beforeSend: function(xhr, settings) {
|
|
|
|
|
+ if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
|
|
|
|
|
+ xhr.setRequestHeader("X-CSRFToken", csrftoken);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function (response) {
|
|
|
|
|
+ story_tr.find('.btn-cell').html('<a class="button special icon fa-check tool-btn disabled"></a>');
|
|
|
|
|
+ story_tr.find('.btn-cell-2').html('<a class="button special icon fa-mail-forward tool-btn already-checked"></a>');
|
|
|
|
|
+ },
|
|
|
|
|
+ failure: function (response) {
|
|
|
|
|
+ alert(response.responseText);
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function (response) {
|
|
|
|
|
+ alert(response.responseText);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $(".retro-section input").click(function (event) {
|
|
|
|
|
+ if (confirm('Le sprint courant va être marqué comme terminé, continuer?')) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|