820 lines
35 KiB
Twig
820 lines
35 KiB
Twig
{% extends "base.html.twig" %}
|
|
|
|
{% block localstyle %}
|
|
html { height:100%}
|
|
body { height:100%; background-color:#efefef;}
|
|
|
|
#main {
|
|
padding-left:0px;
|
|
margin-bottom:0px;
|
|
}
|
|
|
|
h3 { font-size:14px; margin-top:15px;}
|
|
#mycontent { width: 5000px; display:none; }
|
|
|
|
.btn-link {
|
|
cursor:pointer;
|
|
}
|
|
|
|
.control-label {
|
|
margin-bottom:0px;
|
|
}
|
|
|
|
.tag {
|
|
border-radius: 5px;
|
|
padding: 8px 8px;
|
|
margin-bottom: 5px;
|
|
display: inline-block;
|
|
min-width: 35px;
|
|
text-align: center;
|
|
color: #ffffff !important;
|
|
zoom: 80%;
|
|
}
|
|
|
|
.tag i {
|
|
margin-right:5px;
|
|
}
|
|
|
|
.assignee {
|
|
width:30px;
|
|
margin: 5px 5px 0px 0px;
|
|
}
|
|
|
|
.state-closed {
|
|
background-color: #cdcdcd !important;
|
|
}
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="d-flex">
|
|
<div id="filters" class="d-flex flex-column pl-2 pr-2 " style="width:350px; background-color:var(--colorbgbodydark);min-height:1500px;">
|
|
<div style="width:100%" class="mt-3">
|
|
<label class="control-label" style="color:var(--colorftbodydark)">Filtre JALONS</label>
|
|
<select id="filtermilestones" multiple="multiple" class="form-control">
|
|
{% for giteamilestone in giteamilestones %}
|
|
<option value="{{giteamilestone.id}}">{{giteamilestone.title}}</option>
|
|
{% endfor %}
|
|
<option value="-100">Aucun</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div style="width:100%" class="mt-3">
|
|
<label class="control-label" style="color:var(--colorftbodydark)">Filtre TYPES</label>
|
|
<select id="filtertypes" multiple="multiple" class="form-control">
|
|
{% for type in scrum.scrumtypes %}
|
|
<option value="{{type.giteaid}}">{{type.name}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div style="width:100%" class="mt-3">
|
|
<label class="control-label" style="color:var(--colorftbodydark)">Filtre EQUIPES</label>
|
|
<select id="filterteams" multiple="multiple" class="form-control">
|
|
{% for team in scrum.scrumteams %}
|
|
<option value="{{team.giteaid}}">{{team.name}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div style="width:100%" class="mt-3">
|
|
<label class="control-label" style="color:var(--colorftbodydark)">Filtre PRIORITES</label>
|
|
<select id="filterprioritys" multiple="multiple" class="form-control">
|
|
{% for priority in scrum.scrumprioritys %}
|
|
<option value="{{priority.giteaid}}">{{priority.name}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div style="width:100%" class="mt-3">
|
|
<label class="control-label" style="color:var(--colorftbodydark)">Filtre ETIQUETTES</label>
|
|
<select id="filterlabels" multiple="multiple" class="form-control">
|
|
{% for gitealabel in gitealabels %}
|
|
<option value="{{gitealabel.id}}">{{gitealabel.name}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div style="width:100%" class="mt-3">
|
|
<label class="control-label" style="color:var(--colorftbodydark)">Filtre AFFECTATIONS</label>
|
|
<select id="filterassignees" multiple="multiple" class="form-control">
|
|
{% for giteaassignee in giteaassignees %}
|
|
<option value="{{giteaassignee.id}}">{{giteaassignee.login}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div style="width:100%" class="mt-3">
|
|
<label class="control-label" style="color:var(--colorftbodydark)">Filtre EXCLUSIONS</label>
|
|
<select id="filterexcludes" multiple="multiple" class="form-control">
|
|
{% for gitealabel in gitealabels %}
|
|
<option value="{{gitealabel.id}}">{{gitealabel.name}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div style="color:var(--colorftbodydark);zoom:75%;" class="mt-5">
|
|
{% for giteamilestone in giteamilestones %}
|
|
{{giteamilestone.title}} = <span id="total{{giteamilestone.id}}" class="totalweight">0</span><br>
|
|
{% endfor %}
|
|
Aucun = <span id="total-100" class="totalweight">0</span><br>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="pl-3" style="width:100%;">
|
|
<div id="haveupdate" style="display:none" class="alert alert-danger pr-2 mt-3">
|
|
Votre projet a été mise à jour par un tier. Souhaitez-vous raffraichir votre projet ?<br>
|
|
<a href="{{path('app_scrum_view',{id:scrum.id})}}" class="btn btn-success mt-3">Rafraichir</a>
|
|
</div>
|
|
|
|
<div class="mt-4" style="zoom:80%">
|
|
<button class="btn btn-success" onClick="showFilters()"><i class="fas fa-filter"></i></button>
|
|
<a class="btn btn-success" href="{{path('app_issuescrum',{id:scrum.id})}}"><i class="fas fa-ticket-alt"></i></a>
|
|
<a class="btn btn-success" href="{{path('app_scrum_stat',{id:scrum.id})}}"><i class="fas fa-chart-area"></i></a>
|
|
<a href="{{giteaUrl}}/{{scrum.giteajson.owner.login}}/{{scrum.giteajson.name}}/issues/new" class="btn btn-success" target="_blank">Nouveau Ticket</a>
|
|
<span id="textfilters"></span>
|
|
</div>
|
|
|
|
{% for column in scrum.scrumcolumns %}
|
|
{% set idmiletone="-100" %}
|
|
{% set tbidmiletone=[] %}
|
|
{% set haveissues=false %}
|
|
<div class="card d-inline-block mt-3 align-top mb-5" data-column="{{column.giteaid}}" style="width: 18rem;">
|
|
<div class="card-header">{{ column.name }}</div>
|
|
<div class="card-body p-1">
|
|
{% for issue in column.scrumissues %}
|
|
{% set tosee=false %}
|
|
{% if app.session.get('viewclosed')=="true" and issue.giteastate=="closed" %}
|
|
{% set tosee=true %}
|
|
{% endif %}
|
|
{% if issue.giteastate!="closed" %}
|
|
{% set tosee=true %}
|
|
{% endif %}
|
|
|
|
{% if tosee %}
|
|
{% set haveissues=true %}
|
|
{% if idmiletone!=issue.giteamilestone %}
|
|
{% if idmiletone!=-100 %}</ul>{% endif %}
|
|
|
|
{% if issue.giteamilestone is empty %}
|
|
{% set tbidmiletone = tbidmiletone|merge([-100]) %}
|
|
{% set idmilestone = -100 %}
|
|
{% set namemilestone = "Aucun" %}
|
|
{% else %}
|
|
{% set tbidmiletone = tbidmiletone|merge([issue.giteamilestone]) %}
|
|
{% set idmilestone = issue.giteamilestone %}
|
|
{% set namemilestone = issue.giteajson.milestone.title %}
|
|
{% endif %}
|
|
|
|
<h3 data-milestone="{{idmilestone}}">JALON = {{namemilestone}}</h3>
|
|
<ul class="scrumcolumn list-group" style="min-height:50px" data-column="{{column.giteaid}}" data-milestone="{{idmilestone}}">
|
|
{% set idmiletone=issue.giteamilestone %}
|
|
{% endif %}
|
|
|
|
{% set datalabels="" %}
|
|
{% set datateams="" %}
|
|
{% set datatypes="" %}
|
|
{% set dataprioritys="datapriority"~giteaprioritys|last %}
|
|
{% for label in issue.giteajson.labels %}
|
|
{% if label.id not in giteacolumns and label.id in giteateams %}
|
|
{% set datateams=datateams~"datateam"~label.id~" " %}
|
|
{% endif %}
|
|
|
|
{% if label.id not in giteacolumns and label.id in giteatypes %}
|
|
{% set datatypes=datatypes~"datatype"~label.id~" " %}
|
|
{% endif %}
|
|
|
|
{% if label.id not in giteacolumns and label.id in giteaprioritys %}
|
|
{% set dataprioritys="datapriority"~label.id~" " %}
|
|
{% endif %}
|
|
|
|
{% if label.id not in giteacolumns and label.id not in giteateams and label.id not in giteatypes and label.id not in giteaprioritys %}
|
|
{% set datalabels=datalabels~"datalabel"~label.id~" " %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% set dataassignees="" %}
|
|
{% for assignee in issue.giteajson.assignees %}
|
|
{% set dataassignees=dataassignees~"dataassignee"~assignee.id~" " %}
|
|
{% endfor %}
|
|
|
|
<div id="issu{{ issue.id }}" data-id="{{ issue.id }}" data-issue="{{ issue.id }}" data-column="{{column.giteaid}}" data-milestone="{{idmilestone}}" class="card mb-1 issue issue-{{issue.id}} {{datateams}} {{datatypes}} {{dataprioritys}} {{datalabels}} {{dataassignees}} state-{{issue.giteastate}}">
|
|
<div class="card-footer p-1" style="line-height:10px; border-top:none;">
|
|
<div class="float-left btn btn-link p-0 m-0 fas fa-arrows-alt" style="cursor:move"></div>
|
|
<a target="_blank" class="modcolumn btn btn-link float-right fa fa-file p-0 m-0" href="{{issue.giteajson.html_url}}"></a>
|
|
</div>
|
|
|
|
<div class="card-body p-1" style="line-height:10px;">
|
|
<div>
|
|
<small>
|
|
{{issue.giteanumber}} - {{ issue.giteatitle }}<br><br>
|
|
<small>Crée le {{issue.giteajson.created_at|date("d/m/y")}}</small><small style ="float:right">Modifié le {{issue.giteajson.updated_at|date("d/m/y")}}</small>
|
|
{% if issue.giteastate=="closed" %}
|
|
<br><small>Clos le {{issue.giteajson.closed_at|date("d/m/y")}}</small>
|
|
{% endif %}
|
|
<br><br>
|
|
|
|
|
|
|
|
{% for label in issue.giteajson.labels %}
|
|
{% if label.id not in giteacolumns and label.id in giteaprioritys %}
|
|
<span class="btn-link tag" style="background-color:#{{label.color}}">
|
|
<i class="fas fa-tag"></i>
|
|
{{ label.name }}
|
|
</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<br>
|
|
{% for label in issue.giteajson.labels %}
|
|
{% if label.id not in giteacolumns and label.id in giteatypes %}
|
|
<span class="btn-link tag" style="background-color:#{{label.color}}">
|
|
<i class="fas fa-tag"></i>
|
|
{{ label.name }}
|
|
</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<br>
|
|
{% for label in issue.giteajson.labels %}
|
|
{% if label.id not in giteacolumns and label.id in giteateams %}
|
|
<span class="btn-link tag" style="background-color:#{{label.color}}">
|
|
<i class="fas fa-tag"></i>
|
|
{{ label.name }}
|
|
</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<br>
|
|
{% for label in issue.giteajson.labels %}
|
|
{% if label.id not in giteacolumns and label.id not in giteateams and label.id not in giteaprioritys and label.id not in giteatypes %}
|
|
<span class="btn-link tag" style="background-color:#{{label.color}}">
|
|
<i class="fas fa-tag"></i>
|
|
{{ label.name }}
|
|
</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
<div>
|
|
{% for assignee in issue.giteajson.assignees %}
|
|
<img src="{{assignee.avatar_url}}" class="assignee" title="{{assignee.username}}">
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div id="modissu{{ issue.id }}" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}" type="button" class="modissu btn btn-link float-right">
|
|
<i class="fas fa-weight-hanging"></i> = <span id="issue{{issue.id}}-weight">{{ issue.weight }}</span>
|
|
</div>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if haveissues %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% for giteamilestone in giteamilestones %}
|
|
{% if giteamilestone.id not in tbidmiletone %}
|
|
<h3 data-milestone="{{giteamilestone.id}}"> JALON = {{giteamilestone.title}}</h3>
|
|
<ul class="scrumcolumn list-group" style="min-height:50px" data-column="{{ column.giteaid }}" data-milestone="{{giteamilestone.id}}"></ul>
|
|
{% endif %}
|
|
{%endfor%}
|
|
|
|
{% if -100 not in tbidmiletone %}
|
|
<h3 data-milestone="-100"> JALON = Aucun</h3>
|
|
<ul class="scrumcolumn list-group" style="min-height:50px" data-column="{{ column.giteaid }}" data-milestone="-100"></ul>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<div id="mymodalissue" 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">
|
|
<div class="form-group ">
|
|
<label class="control-label required" for="issu_weight">
|
|
Poid
|
|
</label>
|
|
<input type="hidden" id="modal-issueid" name="modal-issueid" required="required" class=" form-control" value="">
|
|
<input type="integer" id="modal-issueweight" name="modal-issueweight" required="required" class=" form-control" value="">
|
|
</div>
|
|
<button id="issu_update" class="btn btn-success">Enregistrer</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block localjavascript %}
|
|
|
|
|
|
|
|
function showFilters() {
|
|
if($("#filters").hasClass("d-flex")) {
|
|
toshow=0;
|
|
$("#filters").addClass("d-none");
|
|
$("#filters").removeClass("d-flex");
|
|
}
|
|
else {
|
|
toshow=1;
|
|
$("#filters").addClass("d-flex");
|
|
$("#filters").removeClass("d-none");
|
|
}
|
|
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{ path('app_user_preference') }}",
|
|
data: {
|
|
key:'showfilters',
|
|
id:{{scrum.id}},
|
|
value: toshow
|
|
}
|
|
});
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
// Apply Filter
|
|
function showhide() {
|
|
if($("#filtermilestones").val().length !== 0) {
|
|
$("[data-milestone]").hide();
|
|
$.each($("#filtermilestones").val(), function( index, value ) {
|
|
$("[data-milestone="+value+"]").show();
|
|
});
|
|
}
|
|
else $("[data-milestone]").show();
|
|
|
|
$(".issue").show();
|
|
|
|
$( ".issue" ).each(function( index ) {
|
|
domissue=$(this);
|
|
toshow=true;
|
|
|
|
if(toshow&&$("#filterteams").val().length !== 0) {
|
|
toshow=false;
|
|
$.each($("#filterteams").val(), function( index, value ) {
|
|
if (domissue.hasClass("datateam"+value))
|
|
toshow=true;
|
|
});
|
|
}
|
|
|
|
if(toshow&&$("#filterprioritys").val().length !== 0) {
|
|
toshow=false;
|
|
$.each($("#filterprioritys").val(), function( index, value ) {
|
|
if (domissue.hasClass("datapriority"+value))
|
|
toshow=true;
|
|
});
|
|
}
|
|
|
|
if(toshow&&$("#filtertypes").val().length !== 0) {
|
|
toshow=false;
|
|
$.each($("#filtertypes").val(), function( index, value ) {
|
|
if (domissue.hasClass("datatype"+value))
|
|
toshow=true;
|
|
});
|
|
}
|
|
|
|
if(toshow&&$("#filterlabels").val().length !== 0) {
|
|
toshow=false;
|
|
$.each($("#filterlabels").val(), function( index, value ) {
|
|
if(domissue.hasClass("datalabel"+value))
|
|
toshow=true;
|
|
});
|
|
}
|
|
|
|
if(toshow&&$("#filterassignees").val().length !== 0) {
|
|
toshow=false;
|
|
$.each($("#filterassignees").val(), function( index, value ) {
|
|
if (domissue.hasClass("dataassignee"+value))
|
|
toshow=true;
|
|
});
|
|
}
|
|
|
|
if(toshow&&$("#filterexcludes").val().length !== 0) {
|
|
$.each($("#filterexcludes").val(), function( index, value ) {
|
|
if(domissue.hasClass("datalabel"+value))
|
|
toshow=false;
|
|
});
|
|
}
|
|
|
|
if(!toshow) domissue.hide();
|
|
});
|
|
|
|
textfilters="";
|
|
if($("#filtermilestones").val().length!==0) {
|
|
data = $("#filtermilestones").select2('data');
|
|
textfilters=textfilters+" <b>JALONS</b> =";
|
|
$.each($("#filtermilestones").val(), function( index, value ) {
|
|
if(index>0)textfilters=textfilters+" &";
|
|
textfilters=textfilters+" "+data[index].text;
|
|
});
|
|
}
|
|
|
|
if($("#filterteams").val().length!==0) {
|
|
data = $("#filterteams").select2('data');
|
|
textfilters=textfilters+" <b>EQUIPES</b> =";
|
|
$.each($("#filterteams").val(), function( index, value ) {
|
|
if(index>0)textfilters=textfilters+" &";
|
|
textfilters=textfilters+" "+data[index].text;
|
|
});
|
|
}
|
|
|
|
if($("#filterprioritys").val().length!==0) {
|
|
data = $("#filterprioritys").select2('data');
|
|
textfilters=textfilters+" <b>EQUIPES</b> =";
|
|
$.each($("#filterprioritys").val(), function( index, value ) {
|
|
if(index>0)textfilters=textfilters+" &";
|
|
textfilters=textfilters+" "+data[index].text;
|
|
});
|
|
}
|
|
|
|
if($("#filtertypes").val().length!==0) {
|
|
data = $("#filtertypes").select2('data');
|
|
textfilters=textfilters+" <b>EQUIPES</b> =";
|
|
$.each($("#filtertypes").val(), function( index, value ) {
|
|
if(index>0)textfilters=textfilters+" &";
|
|
textfilters=textfilters+" "+data[index].text;
|
|
});
|
|
}
|
|
|
|
if($("#filterlabels").val().length!==0) {
|
|
data = $("#filterlabels").select2('data');
|
|
textfilters=textfilters+" <b>ETIQUETTES</b> =";
|
|
$.each($("#filterlabels").val(), function( index, value ) {
|
|
if(index>0)textfilters=textfilters+" &";
|
|
textfilters=textfilters+" "+data[index].text;
|
|
});
|
|
}
|
|
|
|
if($("#filterassignees").val().length!==0) {
|
|
data = $("#filterassignees").select2('data');
|
|
textfilters=textfilters+" <b>AFFECTATIONS</b> =";
|
|
$.each($("#filterassignees").val(), function( index, value ) {
|
|
if(index>0)textfilters=textfilters+" &";
|
|
textfilters=textfilters+" "+data[index].text;
|
|
});
|
|
}
|
|
|
|
if($("#filterexcludes").val().length!==0) {
|
|
data = $("#filterexcludes").select2('data');
|
|
textfilters=textfilters+" <b>EXCLURE ETIQUETTES</b> =";
|
|
$.each($("#filterexcludes").val(), function( index, value ) {
|
|
if(index>0)textfilters=textfilters+" &";
|
|
textfilters=textfilters+" "+data[index].text;
|
|
});
|
|
}
|
|
|
|
$("#textfilters").html(textfilters);
|
|
}
|
|
|
|
function refreshinfo() {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{path("app_scrum_info",{id:scrum.id})}}",
|
|
success: function(data) {
|
|
$(".totalweight").html("0");
|
|
|
|
Object.entries(data.weights).forEach(entry => {
|
|
const [key, value] = entry;
|
|
$("#total"+key).html(value);
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
$(document).on('click','.modissu',function(){
|
|
$(".modal-title").html("#"+$(this).data("giteaid")+" - "+$(this).data("giteatitle"));
|
|
$("#modal-issueid").val($(this).data("issue"));
|
|
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{path("app_scrumissue_info")}}",
|
|
data: {
|
|
id:$("#modal-issueid").val(),
|
|
},
|
|
success: function(data) {
|
|
$("#modal-issueweight").val(data.weight);
|
|
$("#mymodalissue").modal('show');
|
|
$("#modal-issueweight").focus();
|
|
},
|
|
});
|
|
});
|
|
|
|
$("#issu_update").click(function(){
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{path("app_scrumissue_update")}}",
|
|
data: {
|
|
id:$("#modal-issueid").val(),
|
|
weight:$("#modal-issueweight").val(),
|
|
},
|
|
success: function(data) {
|
|
$("#issue"+$("#modal-issueid").val()+"-weight").html($("#modal-issueweight").val());
|
|
refreshinfo();
|
|
$("#mymodalissue").modal('hide');
|
|
},
|
|
error: function (request, status, error) {
|
|
$("#mymodalissue").modal('hide');
|
|
}
|
|
});
|
|
});
|
|
|
|
// Filter Milestones
|
|
function filtermilestones() {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{ path('app_user_preference') }}",
|
|
data: {
|
|
key:'filtermilestones',
|
|
id:{{scrum.id}},
|
|
value: $("#filtermilestones").val()
|
|
}
|
|
});
|
|
|
|
showhide();
|
|
}
|
|
|
|
$('#filtermilestones').select2();
|
|
{% if filtermilestones %}
|
|
{% for milestone in filtermilestones %}
|
|
$("#filtermilestones").val($("#filtermilestones").val().concat("{{milestone}}"));
|
|
{%endfor%}
|
|
$('#filtermilestones').trigger('change');
|
|
{% endif %}
|
|
$('#filtermilestones').on("select2:select", function(e) {
|
|
filtermilestones();
|
|
});
|
|
$('#filtermilestones').on("select2:unselect", function(e) {
|
|
filtermilestones();
|
|
});
|
|
|
|
// Filter Teams
|
|
function filterteams() {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{ path('app_user_preference') }}",
|
|
data: {
|
|
key:'filterteams',
|
|
id:{{scrum.id}},
|
|
value: $("#filterteams").val()
|
|
}
|
|
});
|
|
|
|
showhide();
|
|
}
|
|
|
|
$('#filterteams').select2();
|
|
{% if filterteams %}
|
|
{% for team in filterteams %}
|
|
$("#filterteams").val($("#filterteams").val().concat("{{team}}"));
|
|
{%endfor%}
|
|
$('#filterteams').trigger('change');
|
|
{% endif %}
|
|
$('#filterteams').on("select2:select", function(e) {
|
|
filterteams();
|
|
});
|
|
$('#filterteams').on("select2:unselect", function(e) {
|
|
filterteams();
|
|
});
|
|
|
|
// Filter Proritys
|
|
function filterprioritys() {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{ path('app_user_preference') }}",
|
|
data: {
|
|
key:'filterprioritys',
|
|
id:{{scrum.id}},
|
|
value: $("#filterprioritys").val()
|
|
}
|
|
});
|
|
|
|
showhide();
|
|
}
|
|
|
|
$('#filterprioritys').select2();
|
|
{% if filterprioritys %}
|
|
{% for priority in filterprioritys %}
|
|
$("#filterprioritys").val($("#filterprioritys").val().concat("{{priority}}"));
|
|
{%endfor%}
|
|
$('#filterprioritys').trigger('change');
|
|
{% endif %}
|
|
$('#filterprioritys').on("select2:select", function(e) {
|
|
filterprioritys();
|
|
});
|
|
$('#filterprioritys').on("select2:unselect", function(e) {
|
|
filterprioritys();
|
|
});
|
|
|
|
// Filter Types
|
|
function filtertypes() {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{ path('app_user_preference') }}",
|
|
data: {
|
|
key:'filtertypes',
|
|
id:{{scrum.id}},
|
|
value: $("#filtertypes").val()
|
|
}
|
|
});
|
|
|
|
showhide();
|
|
}
|
|
|
|
$('#filtertypes').select2();
|
|
{% if filtertypes %}
|
|
{% for type in filtertypes %}
|
|
$("#filtertypes").val($("#filtertypes").val().concat("{{type}}"));
|
|
{%endfor%}
|
|
$('#filtertypes').trigger('change');
|
|
{% endif %}
|
|
$('#filtertypes').on("select2:select", function(e) {
|
|
filtertypes();
|
|
});
|
|
$('#filtertypes').on("select2:unselect", function(e) {
|
|
filtertypes();
|
|
});
|
|
|
|
// Filter Labels
|
|
function filterlabels() {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{ path('app_user_preference') }}",
|
|
data: {
|
|
key:'filterlabels',
|
|
id:{{scrum.id}},
|
|
value: $("#filterlabels").val()
|
|
}
|
|
});
|
|
|
|
showhide();
|
|
}
|
|
$('#filterlabels').select2();
|
|
{% if filterlabels %}
|
|
{% for label in filterlabels %}
|
|
$("#filterlabels").val($("#filterlabels").val().concat("{{label}}"));
|
|
{%endfor%}
|
|
$('#filterlabels').trigger('change');
|
|
{% endif %}
|
|
$('#filterlabels').on("select2:select", function(e) {
|
|
filterlabels();
|
|
});
|
|
$('#filterlabels').on("select2:unselect", function(e) {
|
|
filterlabels();
|
|
});
|
|
|
|
// Filtre Assignees
|
|
function filterassignees() {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{ path('app_user_preference') }}",
|
|
data: {
|
|
key:'filterassignees',
|
|
id:{{scrum.id}},
|
|
value: $("#filterassignees").val()
|
|
}
|
|
});
|
|
|
|
showhide();
|
|
}
|
|
$('#filterassignees').select2();
|
|
{% if filterassignees %}
|
|
{% for assignee in filterassignees %}
|
|
$("#filterassignees").val($("#filterassignees").val().concat("{{assignee}}"));
|
|
{%endfor%}
|
|
$('#filterassignees').trigger('change');
|
|
{% endif %}
|
|
$('#filterassignees').on("select2:select", function(e) {
|
|
filterassignees();
|
|
});
|
|
$('#filterassignees').on("select2:unselect", function(e) {
|
|
filterassignees();
|
|
});
|
|
|
|
// Filter Labels
|
|
function filterexcludes() {
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{ path('app_user_preference') }}",
|
|
data: {
|
|
key:'filterexcludes',
|
|
id:{{scrum.id}},
|
|
value: $("#filterexcludes").val()
|
|
}
|
|
});
|
|
|
|
showhide();
|
|
}
|
|
$('#filterexcludes').select2();
|
|
{% if filterexcludes %}
|
|
{% for label in filterexcludes %}
|
|
$("#filterexcludes").val($("#filterexcludes").val().concat("{{label}}"));
|
|
{%endfor%}
|
|
$('#filterexcludes').trigger('change');
|
|
{% endif %}
|
|
$('#filterexcludes').on("select2:select", function(e) {
|
|
filterexcludes();
|
|
});
|
|
$('#filterexcludes').on("select2:unselect", function(e) {
|
|
filterexcludes();
|
|
});
|
|
|
|
// Resume filtre
|
|
{% if not showfilters %}
|
|
$("#filters").addClass("d-none");
|
|
$("#filters").removeClass("d-flex");
|
|
{% endif %}
|
|
|
|
// Appliy filters
|
|
showhide();
|
|
refreshinfo();
|
|
$("#mycontent").show();
|
|
|
|
lastupdate="{{scrum.updatedate|date("Ymd H:i:s")}}";
|
|
|
|
// Sort columns
|
|
$( ".scrumcolumn" ).sortable({
|
|
handle: ".fa-arrows-alt",
|
|
connectWith: ".scrumcolumn",
|
|
cursor: "move",
|
|
update: function( event, ui ) {
|
|
id=$(ui.item).data("issue");
|
|
oldcolumn=$(ui.item).data("column");
|
|
oldmilestone=$(ui.item).data("milestone");
|
|
newcolumn=$(ui.item).parent().data("column");
|
|
newmilestone=$(ui.item).parent().data("milestone");
|
|
console.log("ID = "+id+" = Column : "+oldcolumn+">>"+newcolumn+" = Milestone : "+oldmilestone+">>"+newmilestone );
|
|
|
|
if(oldcolumn!=newcolumn||oldmilestone!=newmilestone) {
|
|
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{path("app_scrumissue_change")}}",
|
|
data: {
|
|
id:id,
|
|
oldcolumn:oldcolumn,
|
|
oldmilestone:oldmilestone,
|
|
newcolumn:newcolumn,
|
|
newmilestone:newmilestone,
|
|
},
|
|
success: function(data) {
|
|
$(ui.item).data("column",newcolumn);
|
|
$(ui.item).data("milestone",newmilestone);
|
|
if(data) lastupdate=data;
|
|
|
|
refreshinfo();
|
|
},
|
|
error: function (request, status, error) {
|
|
$( ".scrumcolumn" ).sortable('cancel');
|
|
}
|
|
});
|
|
}
|
|
|
|
lstordered="";
|
|
$(".scrumcolumn div" ).each(function( index ) {
|
|
if($(this).data("id")) {
|
|
if(index==0) lstordered=$(this).data("id");
|
|
else lstordered=lstordered+","+$(this).data("id");
|
|
}
|
|
});
|
|
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{path("app_scrumissue_order")}}",
|
|
data: {
|
|
id:{{scrum.id}},
|
|
lstordered:lstordered,
|
|
}
|
|
});
|
|
},
|
|
});
|
|
|
|
|
|
var intervalId = window.setInterval(function(){
|
|
console.log(lastupdate);
|
|
$.ajax({
|
|
method: "POST",
|
|
url: "{{path("app_scrumissue_ctrlchange")}}",
|
|
data: {
|
|
id:{{scrum.id}},
|
|
lastupdate:lastupdate
|
|
},
|
|
success: function(fgupdated) {
|
|
if(fgupdated) {
|
|
$("#haveupdate").show();
|
|
}
|
|
}
|
|
});
|
|
}, 60000);
|
|
|
|
});
|
|
{% endblock %} |