2021-07-20 13:04:47 +02:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
{{ form_start(form) }}
|
|
|
|
<h1 class="page-header">
|
|
|
|
{% if mode=="update" %}
|
|
|
|
Modification SCRUM
|
|
|
|
{% elseif mode=="submit" %}
|
|
|
|
Création SCRUM
|
|
|
|
{% endif %}
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
{{ form_widget(form.submit) }}
|
|
|
|
|
|
|
|
<a class="btn btn-secondary" href={{ path('app_scrum') }}>Annuler</a>
|
|
|
|
|
|
|
|
{% if mode=="update" %}
|
|
|
|
<a href="{{ path('app_scrum_delete',{'id':scrum.id}) }}"
|
|
|
|
class="btn btn-danger float-right"
|
|
|
|
data-method="delete"
|
|
|
|
data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?">
|
|
|
|
Supprimer
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<br><br>
|
|
|
|
|
|
|
|
{% if app.session.flashbag.has('error') %}
|
|
|
|
<div class='alert alert-danger' style='margin: 5px 0px'>
|
|
|
|
<strong>Erreur</strong><br>
|
|
|
|
{% for flashMessage in app.session.flashbag.get('error') %}
|
|
|
|
{{ flashMessage }}<br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if app.session.flashbag.has('notice') %}
|
|
|
|
<div class='alert alert-info' style='margin: 5px 0px'>
|
|
|
|
<strong>Information</strong><br>
|
|
|
|
{% for flashMessage in app.session.flashbag.get('notice') %}
|
|
|
|
{{ flashMessage }}<br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
2024-02-15 18:59:09 +01:00
|
|
|
<div class="card mb-3">
|
2021-07-20 13:04:47 +02:00
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
2022-01-22 11:18:42 +01:00
|
|
|
{{ form_row(form.category) }}
|
2021-07-20 13:04:47 +02:00
|
|
|
{{ form_row(form.name) }}
|
|
|
|
{{ form_row(form.giteaid) }}
|
|
|
|
{{ form_row(form.users) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-15 18:59:09 +01:00
|
|
|
|
|
|
|
{% if mode=="update" %}
|
|
|
|
<div class="card mb-3">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-pencil-alt fa-fw"></i> Sprints
|
|
|
|
<button id="addsprint" type="button" class="btn float-right fa fa-plus"></button>
|
2024-04-12 16:30:36 +02:00
|
|
|
|
|
|
|
<div class="custom-control custom-switch float-right">
|
|
|
|
<input type="checkbox" class="custom-control-input" id="viewsprintclosed">
|
|
|
|
<label class="custom-control-label" for="viewsprintclosed">Afficher les sprint clos</label>
|
|
|
|
</div>
|
2024-02-15 18:59:09 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="scrumsprints" class="card-body">
|
|
|
|
<ol id="scrumsprints" class="list-group list-group-numbered">
|
|
|
|
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-07-20 13:04:47 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if mode=="update" %}
|
|
|
|
<div class="col-md-6">
|
2022-01-28 16:54:46 +01:00
|
|
|
<div class="card mb-3">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-pencil-alt fa-fw"></i> Equipes
|
|
|
|
<button id="addteam" type="button" class="btn float-right fa fa-plus"></button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="scrumteams" class="card-body">
|
|
|
|
<ol id="scrumteams" class="list-group list-group-numbered">
|
|
|
|
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-08-30 11:15:33 +02:00
|
|
|
<div class="card mb-3">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-pencil-alt fa-fw"></i> Types
|
|
|
|
<button id="addtype" type="button" class="btn float-right fa fa-plus"></button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="scrumtypes" class="card-body">
|
|
|
|
<ol id="scrumtypes" class="list-group list-group-numbered">
|
|
|
|
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-02-03 17:26:35 +01:00
|
|
|
<div class="card mb-3">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-pencil-alt fa-fw"></i> Priorités
|
|
|
|
<button id="addpriority" type="button" class="btn float-right fa fa-plus"></button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="scrumprioritys" class="card-body">
|
|
|
|
<ol id="scrumprioritys" class="list-group list-group-numbered">
|
|
|
|
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-07-20 13:04:47 +02:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-pencil-alt fa-fw"></i> Colonnes
|
|
|
|
<button id="addcolumn" type="button" class="btn float-right fa fa-plus"></button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="scrumcolumns" class="card-body">
|
|
|
|
<ol id="scrumcolumns" class="list-group list-group-numbered">
|
|
|
|
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{{ form_end(form) }}
|
|
|
|
|
2022-01-28 16:54:46 +01:00
|
|
|
<div id="mymodalcolumn" class="modal" role="dialog">
|
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title"></h4>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
<iframe frameborder=0 width="100%" height="600px"></iframe>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="mymodalteam" class="modal" role="dialog">
|
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title"></h4>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
<iframe frameborder=0 width="100%" height="600px"></iframe>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-02-03 17:26:35 +01:00
|
|
|
<div id="mymodalpriority" class="modal" role="dialog">
|
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title"></h4>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
<iframe frameborder=0 width="100%" height="600px"></iframe>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-08-30 11:15:33 +02:00
|
|
|
<div id="mymodaltype" class="modal" role="dialog">
|
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title"></h4>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
<iframe frameborder=0 width="100%" height="600px"></iframe>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-02-15 18:59:09 +01:00
|
|
|
<div id="mymodalsprint" class="modal" role="dialog">
|
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title"></h4>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
<iframe frameborder=0 width="100%" height="600px"></iframe>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-07-20 13:04:47 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block localjavascript %}
|
|
|
|
$(document).ready(function() {
|
2022-01-22 11:18:42 +01:00
|
|
|
$("#scrum_giteaid").select2();
|
2021-07-20 13:04:47 +02:00
|
|
|
$("#scrum_name").focus();
|
|
|
|
{% if mode=="update" %}
|
|
|
|
loadscrumcolumns();
|
2022-01-28 16:54:46 +01:00
|
|
|
loadscrumteams();
|
2022-02-03 17:26:35 +01:00
|
|
|
loadscrumprioritys();
|
2023-08-30 11:15:33 +02:00
|
|
|
loadscrumtypes();
|
2024-02-15 18:59:09 +01:00
|
|
|
loadscrumsprints();
|
2021-07-20 13:04:47 +02:00
|
|
|
{%endif%}
|
|
|
|
});
|
|
|
|
|
|
|
|
{% if mode=="update" %}
|
|
|
|
$("#addcolumn").click(function() {
|
2022-01-28 16:54:46 +01:00
|
|
|
ModalLoad('mymodalcolumn','Ajouter une colonne','{{path('app_scrumcolumn_submit',{scrumid:scrum.id})}}');
|
2021-07-20 13:04:47 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#scrumcolumns').on('click', '.modcolumn', function(event) {
|
|
|
|
url="{{path('app_scrumcolumn_update',{id:'xxx'})}}";
|
|
|
|
url=url.replace("xxx",$(this).data("id"));
|
2022-01-28 16:54:46 +01:00
|
|
|
ModalLoad('mymodalcolumn','Modifier une colonne',url);
|
2021-07-20 13:04:47 +02:00
|
|
|
});
|
|
|
|
|
2022-01-28 16:54:46 +01:00
|
|
|
$('#mymodalcolumn').on('hidden.bs.modal', function () {
|
2021-07-20 13:04:47 +02:00
|
|
|
loadscrumcolumns();
|
|
|
|
});
|
|
|
|
|
|
|
|
function loadscrumcolumns() {
|
|
|
|
$("#scrumcolumns").empty();
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumcolumn_select",{scrumid:scrum.id})}}",
|
|
|
|
success: function(datas, dataType)
|
|
|
|
{
|
|
|
|
|
|
|
|
jQuery.each(datas, function(i, wid) {
|
|
|
|
html ='<li data-id="'+wid.id+'" class="list-group-item d-flex justify-content-between">';
|
|
|
|
html+='<div>';
|
|
|
|
html+='<div class="mr-3 p-2 d-inline-block"><i class="fas fa-arrows-alt-v fa-2x"></i></div>';
|
|
|
|
html+='<div class="d-inline-block">';
|
|
|
|
html+=wid.name;
|
|
|
|
html+='</div>';
|
|
|
|
html+='</div>';
|
|
|
|
html+='<button type="button" data-id="'+wid.id+'" class="modcolumn btn float-right fa fa-file"></button>';
|
|
|
|
html+='</li>';
|
|
|
|
$("#scrumcolumns").append(html);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$( "#scrumcolumns" ).sortable({
|
|
|
|
axis: "y",
|
|
|
|
handle: ".fa-arrows-alt-v",
|
|
|
|
update: function( event, ui ) {
|
|
|
|
lstordered="";
|
|
|
|
$( "#scrumcolumns li" ).each(function( index ) {
|
|
|
|
if(index==0) lstordered=$(this).data("id");
|
|
|
|
else lstordered=lstordered+","+$(this).data("id");
|
|
|
|
});
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumcolumn_order",{scrumid:scrum.id})}}",
|
|
|
|
data: {
|
|
|
|
lstordered:lstordered
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
2022-01-28 16:54:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
$("#addteam").click(function() {
|
|
|
|
ModalLoad('mymodalteam','Ajouter une colonne','{{path('app_scrumteam_submit',{scrumid:scrum.id})}}');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#scrumteams').on('click', '.modteam', function(event) {
|
|
|
|
url="{{path('app_scrumteam_update',{id:'xxx'})}}";
|
|
|
|
url=url.replace("xxx",$(this).data("id"));
|
|
|
|
ModalLoad('mymodalteam','Modifier une team',url);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#mymodalteam').on('hidden.bs.modal', function () {
|
|
|
|
loadscrumteams();
|
|
|
|
});
|
|
|
|
|
|
|
|
function loadscrumteams() {
|
|
|
|
$("#scrumteams").empty();
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumteam_select",{scrumid:scrum.id})}}",
|
|
|
|
success: function(datas, dataType)
|
|
|
|
{
|
|
|
|
|
|
|
|
jQuery.each(datas, function(i, wid) {
|
|
|
|
html ='<li data-id="'+wid.id+'" class="list-group-item d-flex justify-content-between">';
|
|
|
|
html+='<div>';
|
|
|
|
html+='<div class="mr-3 p-2 d-inline-block"><i class="fas fa-arrows-alt-v fa-2x"></i></div>';
|
|
|
|
html+='<div class="d-inline-block">';
|
|
|
|
html+=wid.name;
|
|
|
|
html+='</div>';
|
|
|
|
html+='</div>';
|
|
|
|
html+='<button type="button" data-id="'+wid.id+'" class="modteam btn float-right fa fa-file"></button>';
|
|
|
|
html+='</li>';
|
|
|
|
$("#scrumteams").append(html);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$( "#scrumteams" ).sortable({
|
|
|
|
axis: "y",
|
|
|
|
handle: ".fa-arrows-alt-v",
|
|
|
|
update: function( event, ui ) {
|
|
|
|
lstordered="";
|
|
|
|
$( "#scrumteams li" ).each(function( index ) {
|
|
|
|
if(index==0) lstordered=$(this).data("id");
|
|
|
|
else lstordered=lstordered+","+$(this).data("id");
|
|
|
|
});
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumteam_order",{scrumid:scrum.id})}}",
|
|
|
|
data: {
|
|
|
|
lstordered:lstordered
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
2022-02-03 17:26:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$("#addpriority").click(function() {
|
|
|
|
ModalLoad('mymodalpriority','Ajouter une colonne','{{path('app_scrumpriority_submit',{scrumid:scrum.id})}}');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#scrumprioritys').on('click', '.modpriority', function(event) {
|
|
|
|
url="{{path('app_scrumpriority_update',{id:'xxx'})}}";
|
|
|
|
url=url.replace("xxx",$(this).data("id"));
|
|
|
|
ModalLoad('mymodalpriority','Modifier une priority',url);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#mymodalpriority').on('hidden.bs.modal', function () {
|
|
|
|
loadscrumprioritys();
|
|
|
|
});
|
|
|
|
|
|
|
|
function loadscrumprioritys() {
|
|
|
|
$("#scrumprioritys").empty();
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumpriority_select",{scrumid:scrum.id})}}",
|
|
|
|
success: function(datas, dataType)
|
|
|
|
{
|
|
|
|
|
|
|
|
jQuery.each(datas, function(i, wid) {
|
|
|
|
html ='<li data-id="'+wid.id+'" class="list-group-item d-flex justify-content-between">';
|
|
|
|
html+='<div>';
|
|
|
|
html+='<div class="mr-3 p-2 d-inline-block"><i class="fas fa-arrows-alt-v fa-2x"></i></div>';
|
|
|
|
html+='<div class="d-inline-block">';
|
|
|
|
html+=wid.name;
|
|
|
|
html+='</div>';
|
|
|
|
html+='</div>';
|
|
|
|
html+='<button type="button" data-id="'+wid.id+'" class="modpriority btn float-right fa fa-file"></button>';
|
|
|
|
html+='</li>';
|
|
|
|
$("#scrumprioritys").append(html);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$( "#scrumprioritys" ).sortable({
|
|
|
|
axis: "y",
|
|
|
|
handle: ".fa-arrows-alt-v",
|
|
|
|
update: function( event, ui ) {
|
|
|
|
lstordered="";
|
|
|
|
$( "#scrumprioritys li" ).each(function( index ) {
|
|
|
|
if(index==0) lstordered=$(this).data("id");
|
|
|
|
else lstordered=lstordered+","+$(this).data("id");
|
|
|
|
});
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumpriority_order",{scrumid:scrum.id})}}",
|
|
|
|
data: {
|
|
|
|
lstordered:lstordered
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
2023-08-30 11:15:33 +02:00
|
|
|
}
|
2024-02-15 18:59:09 +01:00
|
|
|
|
|
|
|
$("#addsprint").click(function() {
|
|
|
|
ModalLoad('mymodalsprint','Ajouter un sprint','{{path('app_scrumsprint_submit',{scrumid:scrum.id})}}');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#scrumsprints').on('click', '.modsprint', function(event) {
|
|
|
|
url="{{path('app_scrumsprint_update',{id:'xxx'})}}";
|
|
|
|
url=url.replace("xxx",$(this).data("id"));
|
|
|
|
ModalLoad('mymodalsprint','Modifier un sprint',url);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#mymodalsprint').on('hidden.bs.modal', function () {
|
|
|
|
loadscrumsprints();
|
|
|
|
});
|
|
|
|
|
2024-04-12 16:30:36 +02:00
|
|
|
$('#viewsprintclosed').change(function() {
|
|
|
|
if(this.checked) {
|
|
|
|
$(".sprintclosed").removeClass("hidden");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$(".sprintclosed").addClass("hidden");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2024-02-15 18:59:09 +01:00
|
|
|
function loadscrumsprints() {
|
|
|
|
$("#scrumsprints").empty();
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumsprint_select",{scrumid:scrum.id})}}",
|
|
|
|
success: function(datas, dataType)
|
|
|
|
{
|
|
|
|
jQuery.each(datas, function(i, wid) {
|
2024-04-12 16:30:36 +02:00
|
|
|
style='';
|
|
|
|
classname='';
|
|
|
|
if(wid.closed) {
|
|
|
|
style='background-color:#cdcdcd;';
|
|
|
|
classname='sprintclosed';
|
|
|
|
if(!$("#viewsprintclosed").is(':checked')) {
|
|
|
|
classname+=' hidden';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
html ='<li data-id="'+wid.id+'" class="list-group-item d-flex justify-content-between '+classname+'" style="'+style+'">';
|
2024-02-15 18:59:09 +01:00
|
|
|
html+='<div>';
|
|
|
|
html+='<div class="mr-3 p-2 d-inline-block"><i class="fas fa-arrows-alt-v fa-2x"></i></div>';
|
|
|
|
html+='<div class="d-inline-block">';
|
|
|
|
html+=wid.name;
|
|
|
|
html+='</div>';
|
|
|
|
html+='</div>';
|
|
|
|
html+='<button type="button" data-id="'+wid.id+'" class="modsprint btn float-right fa fa-file"></button>';
|
|
|
|
html+='</li>';
|
|
|
|
$("#scrumsprints").append(html);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$( "#scrumsprints" ).sortable({
|
|
|
|
axis: "y",
|
|
|
|
handle: ".fa-arrows-alt-v",
|
|
|
|
update: function( event, ui ) {
|
|
|
|
lstordered="";
|
|
|
|
$( "#scrumsprints li" ).each(function( index ) {
|
|
|
|
if(index==0) lstordered=$(this).data("id");
|
|
|
|
else lstordered=lstordered+","+$(this).data("id");
|
|
|
|
});
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumsprint_order",{scrumid:scrum.id})}}",
|
|
|
|
data: {
|
|
|
|
lstordered:lstordered
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-30 11:15:33 +02:00
|
|
|
$("#addtype").click(function() {
|
|
|
|
ModalLoad('mymodaltype','Ajouter une colonne','{{path('app_scrumtype_submit',{scrumid:scrum.id})}}');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#scrumtypes').on('click', '.modtype', function(event) {
|
|
|
|
url="{{path('app_scrumtype_update',{id:'xxx'})}}";
|
|
|
|
url=url.replace("xxx",$(this).data("id"));
|
|
|
|
ModalLoad('mymodaltype','Modifier un type',url);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#mymodaltype').on('hidden.bs.modal', function () {
|
|
|
|
loadscrumtypes();
|
|
|
|
});
|
2022-01-28 16:54:46 +01:00
|
|
|
|
2023-08-30 11:15:33 +02:00
|
|
|
function loadscrumtypes() {
|
|
|
|
$("#scrumtypes").empty();
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumtype_select",{scrumid:scrum.id})}}",
|
|
|
|
success: function(datas, dataType)
|
|
|
|
{
|
|
|
|
|
|
|
|
jQuery.each(datas, function(i, wid) {
|
|
|
|
html ='<li data-id="'+wid.id+'" class="list-group-item d-flex justify-content-between">';
|
|
|
|
html+='<div>';
|
|
|
|
html+='<div class="mr-3 p-2 d-inline-block"><i class="fas fa-arrows-alt-v fa-2x"></i></div>';
|
|
|
|
html+='<div class="d-inline-block">';
|
|
|
|
html+=wid.name;
|
|
|
|
html+='</div>';
|
|
|
|
html+='</div>';
|
|
|
|
html+='<button type="button" data-id="'+wid.id+'" class="modtype btn float-right fa fa-file"></button>';
|
|
|
|
html+='</li>';
|
|
|
|
$("#scrumtypes").append(html);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$( "#scrumtypes" ).sortable({
|
|
|
|
axis: "y",
|
|
|
|
handle: ".fa-arrows-alt-v",
|
|
|
|
update: function( event, ui ) {
|
|
|
|
lstordered="";
|
|
|
|
$( "#scrumtypes li" ).each(function( index ) {
|
|
|
|
if(index==0) lstordered=$(this).data("id");
|
|
|
|
else lstordered=lstordered+","+$(this).data("id");
|
|
|
|
});
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{path("app_scrumtype_order",{scrumid:scrum.id})}}",
|
|
|
|
data: {
|
|
|
|
lstordered:lstordered
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
2022-01-28 16:54:46 +01:00
|
|
|
}
|
2021-07-20 13:04:47 +02:00
|
|
|
{% endif %}
|
2022-01-28 16:54:46 +01:00
|
|
|
|
2021-07-20 13:04:47 +02:00
|
|
|
{% endblock %}
|