|
@@ -19,6 +19,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</header>
|
|
</header>
|
|
|
|
|
|
|
|
|
|
+ <div id="sprint-end">
|
|
|
{% if not next_sprint %}
|
|
{% if not next_sprint %}
|
|
|
<p class="error">Le sprint suivant n'existe pas!</p>
|
|
<p class="error">Le sprint suivant n'existe pas!</p>
|
|
|
{% else %}
|
|
{% else %}
|
|
@@ -27,7 +28,7 @@
|
|
|
<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" width="1%">
|
|
|
{% if story.closed %}
|
|
{% if story.closed %}
|
|
|
<a href="" class="story_close button special icon fa-check tool-btn already-checked"></a>
|
|
<a href="" class="story_close button special icon fa-check tool-btn already-checked"></a>
|
|
|
{% elif next_sprint in story.sprints.all %}
|
|
{% elif next_sprint in story.sprints.all %}
|
|
@@ -36,7 +37,7 @@
|
|
|
<a href="" class="story_close button special icon fa-check tool-btn" title="Clôre"></a>
|
|
<a href="" class="story_close button special icon fa-check tool-btn" title="Clôre"></a>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
</td>
|
|
</td>
|
|
|
- <td class="btn-cell-2">
|
|
|
|
|
|
|
+ <td class="btn-cell-2" width="1%">
|
|
|
{% if story.closed %}
|
|
{% if story.closed %}
|
|
|
<a class="button special icon fa-mail-forward tool-btn disabled"></a>
|
|
<a class="button special icon fa-mail-forward tool-btn disabled"></a>
|
|
|
{% elif next_sprint in story.sprints.all %}
|
|
{% elif next_sprint in story.sprints.all %}
|
|
@@ -63,95 +64,7 @@
|
|
|
<input type="submit" value="Enregistrer et clôre le sprint">
|
|
<input type="submit" value="Enregistrer et clôre le sprint">
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|
|
|
-
|
|
|
|
|
- <script>
|
|
|
|
|
- function csrfSafeMethod(method) {
|
|
|
|
|
- // these HTTP methods do not require CSRF protection
|
|
|
|
|
- return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
|
|
|
|
|
- }
|
|
|
|
|
- function getCookie(name) {
|
|
|
|
|
- var cookieValue = null;
|
|
|
|
|
- if (document.cookie && document.cookie !== '') {
|
|
|
|
|
- var cookies = document.cookie.split(';');
|
|
|
|
|
- for (var i = 0; i < cookies.length; i++) {
|
|
|
|
|
- var cookie = jQuery.trim(cookies[i]);
|
|
|
|
|
- // Does this cookie string begin with the name we want?
|
|
|
|
|
- if (cookie.substring(0, name.length + 1) === (name + '=')) {
|
|
|
|
|
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return cookieValue;
|
|
|
|
|
- }
|
|
|
|
|
- var csrftoken = getCookie('csrftoken');
|
|
|
|
|
-
|
|
|
|
|
- $(".story_close").click(function(event) {
|
|
|
|
|
- event.preventDefault();
|
|
|
|
|
- var story_tr = $(this).closest('tr');
|
|
|
|
|
- var story_id = story_tr.data('id');
|
|
|
|
|
-
|
|
|
|
|
- $.ajax({
|
|
|
|
|
- type: "POST",
|
|
|
|
|
- url: "/stories/close/" + 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 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) {
|
|
|
|
|
- alert(response.responseText);
|
|
|
|
|
- },
|
|
|
|
|
- error: function (response) {
|
|
|
|
|
- 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/reaffect/" + 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>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ </div>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endblock %}
|
|
{% endblock %}
|