ninegitea/templates/Scrum/view.html.twig

1314 lines
62 KiB
Twig
Raw Normal View History

2021-07-20 13:04:47 +02:00
{% extends "base.html.twig" %}
{% block localstyle %}
html { height:100%}
body { height:100%; background-color:#efefef;}
2022-02-03 17:26:35 +01:00
2022-01-28 16:54:46 +01:00
#main {
padding-left:0px;
margin-bottom:0px;
}
2021-07-20 13:04:47 +02:00
h3 { font-size:14px; margin-top:15px;}
2022-01-28 16:54:46 +01:00
#mycontent { width: 5000px; display:none; }
2022-01-11 13:39:51 +01:00
.btn-link {
cursor:pointer;
}
.control-label {
margin-bottom:0px;
}
.tag {
border-radius: 5px;
2024-05-07 17:24:15 +02:00
padding: 4px 8px;
//margin-bottom: 2px;
2022-01-11 13:39:51 +01:00
display: inline-block;
min-width: 35px;
text-align: center;
color: #ffffff !important;
2024-05-07 17:24:15 +02:00
zoom: 70%;
2022-01-11 13:39:51 +01:00
}
.tag i {
margin-right:5px;
}
.tooltip-inner {
text-align: left !important; /* Aligne le texte à gauche */
white-space: pre-line; /* Conserve les retours à la ligne */
}
2022-01-11 13:39:51 +01:00
.assignee {
width:30px;
margin: 5px 5px 0px 0px;
}
2023-08-25 14:44:12 +02:00
.state-closed {
background-color: #cdcdcd !important;
}
2024-02-16 16:40:41 +01:00
.text-small { font-size:80%}
2024-02-23 13:04:21 +01:00
.text-verysmall { font-size:70%}
2024-02-20 10:39:49 +01:00
.submenu a:hover {
text-decoration: none;
color: var(--colorfttitlelight);
}
2021-07-20 13:04:47 +02:00
{% endblock %}
{% block body %}
2024-06-15 11:02:32 +02:00
{% set start = microtime(true) %}
2022-01-28 16:54:46 +01:00
<div class="d-flex">
2022-02-03 17:26:35 +01:00
<div id="filters" class="d-flex flex-column pl-2 pr-2 " style="width:350px; background-color:var(--colorbgbodydark);min-height:1500px;">
2022-01-28 16:54:46 +01:00
<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>
2022-01-22 11:18:42 +01:00
<div style="width:100%" class="mt-3">
<label class="control-label" style="color:var(--colorftbodydark)">Filtre SPRINT</label>
<select id="filtersprints" multiple="multiple" class="form-control">
{% for sprint in sprints %}
<option value="{{sprint.giteamilestone~"-"~sprint.id}}">{{sprint.giteamilestonename}}-{{sprint.name}}</option>
{% endfor %}
{% for giteamilestone in giteamilestones %}
<option value="{{giteamilestone.id~"--100"}}">{{giteamilestone.title}}-Aucun</option>
{% endfor %}
</select>
</div>
2023-08-30 11:15:33 +02:00
<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>
2022-01-28 16:54:46 +01:00
<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>
2022-01-11 13:39:51 +01:00
2022-02-03 17:26:35 +01:00
<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>
2022-01-28 16:54:46 +01:00
<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>
2022-01-11 13:39:51 +01:00
2022-01-28 16:54:46 +01:00
<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>
2022-06-29 11:50:27 +02:00
<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>
2024-02-16 16:40:41 +01:00
<div style="width:100%" class="mt-3">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="viewcondensed">
<label class="custom-control-label" for="viewcondensed" style="color:var(--colorfttitledark);">Vue condensée</label>
</div>
</div>
2024-02-23 12:35:29 +01:00
<div id="tbestim" class="mt-5">
</div>
2022-01-11 13:39:51 +01:00
</div>
2022-01-22 11:18:42 +01:00
2022-01-28 16:54:46 +01:00
<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>
2022-01-11 13:39:51 +01:00
2022-01-28 16:54:46 +01:00
<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_scrum_table',{id:scrum.id})}}"><i class="fas fa-ticket-alt"></i></a>
2022-02-03 17:26:35 +01:00
<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>
2022-01-28 16:54:46 +01:00
<span id="textfilters"></span>
</div>
2022-01-11 13:39:51 +01:00
{% for column in tbissues %}
<div class="d-inline-block mt-3 align-top mb-5 p-2" data-column="{{column.gicol}}" style="width: 18rem;">
<h2 style="text-transform: uppercase; text-align:center; font-size:26px">{{ column.nmcol }}</h2>
2022-01-28 16:54:46 +01:00
<div class="card-body p-1">
{% for jalon in column.jalons %}
{% for sprint in jalon.sprints %}
<div class="card mb-3" data-column="{{column.gicol}}" data-milestone="{{jalon.gijal}}" data-sprint="{{sprint.idspr}}" data-millestonesprint="{{jalon.gijal~"-"~sprint.idspr}}">
2024-03-15 16:49:22 +01:00
<div class="card-header p-1 d-flex" style="font-size:16px; cursor:pointer;" onClick="$(this).next('.card-body').toggle()">
2024-02-23 12:35:29 +01:00
<div>
JALON = {{jalon.nmjal}}
{% if sprint.idspr!=-100 %}
<br>
SPRINT = {{sprint.nmspr}}
{% endif %}
</div>
<div class="ml-auto" data-weight="{{column.gicol~"-"~jalon.gijal~"-"~sprint.idspr}}">
</div>
</div>
<div class="card-body p-1">
<ul class="scrumcolumn list-group" style="min-height:50px" data-column="{{column.gicol}}" data-milestone="{{jalon.gijal}}" data-sprint="{{sprint.idspr}}" data-millestonesprint="{{jalon.gijal~"-"~sprint.idspr}}">
{% for issue in sprint.issues %}
{% set tosee=false %}
{% if app.session.get('viewclosed')=="true" and issue.giteastate=="closed" %}
{% set tosee=true %}
2022-01-28 16:54:46 +01:00
{% endif %}
{% if issue.giteastate!="closed" %}
{% set tosee=true %}
{% endif %}
{% if tosee %}
{% set datalabels="" %}
{% set datateams="" %}
{% set datatypes="" %}
{% set dataprioritys="datapriority"~giteaprioritys|last %}
2024-04-12 20:27:25 +02:00
{% set issuprioritycolor=prioritycolor %}
{% 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~" " %}
2024-04-12 20:27:25 +02:00
{% set issuprioritycolor="#"~label.color %}
{% endif %}
{% set datalabels=datalabels~"datalabel"~label.id~" " %}
{% endfor %}
{% set dataassignees="" %}
{% for assignee in issue.giteajson.assignees %}
{% set dataassignees=dataassignees~"dataassignee"~assignee.id~" " %}
{% endfor %}
2024-04-12 21:56:11 +02:00
{% set backcolor="" %}
{% if not issue.color is empty %}
{% set backcolor="background-color:"~issue.color~";" %}
{% elseif issue.scrumissueblock and not issue.scrumissueblock.color is empty %}
{% set backcolor="background-color:"~issue.scrumissueblock.color~";" %}
{% endif %}
{% set notes=(not issue.notes is empty?issue.notes|striptags|replace({'\n': '<br>', '\r': '<br>'})|raw:"") %}
<div id="issu{{ issue.id }}" data-id="{{ issue.id }}" data-issue="{{ issue.id }}" data-column="{{column.gicol}}" data-milestone="{{jalon.gijal}}" data-sprint="{{sprint.idspr}}" class="card mb-1 issue issue-{{issue.id}} {{datateams}} {{datatypes}} {{dataprioritys}} {{datalabels}} {{dataassignees}} state-{{issue.giteastate}}" style="border-left: 10px solid {{issuprioritycolor}}" {{ (not notes is empty?'title='~notes:'') }}>
2024-04-12 21:56:11 +02:00
<div class="card-footer p-1 d-flex" style="line-height:16px; border-top:none; {{ backcolor }}" >
2024-02-21 20:58:38 +01:00
<div class="flex-grow-1 d-flex align-items-center" style="max-width:224px";>
2024-04-12 16:30:36 +02:00
<div class="pr-2 issu-id" style="cursor:move">
#{{issue.giteanumber}}
</div>
<div class="text-small" style="cursor:pointer; word-break: break-word;" onClick="$('#issu-detail{{ issue.id }}').toggle()">
{% if not issue.scrumissueblock is empty %}
2024-04-12 20:30:48 +02:00
<div class="text-verysmall" style="margin-bottom:-5px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: 160px;">
2024-04-12 16:30:36 +02:00
#{{issue.scrumissueblock.giteanumber}} = {{issue.scrumissueblock.giteatitle}}
</div>
{% endif %}
<div style="line-height:13px;">{{ issue.giteatitle }}</div>
{% for depend in issue.scrumissuedependencies %}
{% if loop.first %}
2024-04-12 20:30:48 +02:00
<div class="text-verysmall" style="margin-top: 5px;line-height:11px; width:160px;">
2024-04-12 16:30:36 +02:00
{% endif %}
{% set style="" %}
{% if depend.giteastate=="closed" %}
{% set style="text-decoration: line-through;" %}
{% endif %}
<div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;{{style}}">#{{depend.giteanumber}} = {{depend.giteatitle}}</div>
{% if loop.last %}
</div>
{% endif %}
{% endfor %}
</div>
2024-02-16 16:40:41 +01:00
</div>
2024-02-23 13:04:21 +01:00
<div id="viewissu{{ issue.id }}" class="viewissu mb-2" onMouseenter="issuhover(this,{{ issue.id }})" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}" type="button" style="line-height:9px; text-align:center;">
<i class="btn btn-link fas fa-eye p-0 m-0 fa-fw"></i>
<br><span class="text-verysmall issue{{issue.id}}-weight">{{ issue.weight }}</span>
</div>
</div>
2024-02-20 10:39:49 +01:00
<div id="submenu{{issue.id}}" class="submenu" onmouseleave="issuout(this)" style="
position: absolute;
left: 214px;
2024-02-21 20:58:38 +01:00
top: -1px;
2024-04-12 16:30:36 +02:00
width:300px;
2024-02-20 10:39:49 +01:00
z-index:1200;
display:none;
background-color:#f7f7f7;
flex-direction: column;
border: 1px solid #cdcdcd;
2024-02-21 20:58:38 +01:00
border-radius: .25rem;
2024-02-20 10:39:49 +01:00
">
2024-02-23 13:04:21 +01:00
<div id="viewissu{{ issue.id }}" class="viewissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
<i class="btn fas fa-eye p-0 m-0 fa-fw pl-1 pl-1"></i>
<span style="cursor:pointer;">
2024-02-21 20:58:38 +01:00
Aperçu Ticket
</span>
</div>
2024-02-23 13:04:21 +01:00
<a target="_blank" href="{{issue.giteajson.html_url}}" style="cursor:pointer" class="modcolumn mb-2">
<i class="btn fa fa-file fa-fw p-0 m-0 pl-1 pl-1"></i>
<span>Modifier dans Gitea</span>
</a>
<div id="modissu{{ issue.id }}" class="modissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
<i class="btn fas fa-weight-hanging p-0 m-0 fa-fw pl-1 pl-1"></i>
<span style="cursor:pointer;">
2024-02-20 10:39:49 +01:00
Modifier le Poids = <span class="issue{{issue.id}}-weight">{{ issue.weight }}</span>
</span>
2024-02-23 13:04:21 +01:00
</div>
2024-04-12 16:30:36 +02:00
{% if issue.scrumissueblock is empty %}
<div id="lockissu{{ issue.id }}" class="lockissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
<i class="btn fas fa-lock p-0 m-0 fa-fw pl-1 pl-1"></i>
<span style="cursor:pointer;">
2024-04-12 16:30:36 +02:00
Ajouter ce ticket comme bloquant à
</span>
</div>
{% else %}
<div id="unlockissu{{ issue.id }}" class="unlockissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
<i class="btn fas fa-lock p-0 m-0 fa-fw pl-1 pl-1"></i>
<span style="cursor:pointer;">
2024-04-12 16:30:36 +02:00
N'est plus bloquant pour #{{ issue.scrumissueblock.giteanumber}}
</span>
</div>
2024-04-12 20:27:25 +02:00
{% endif %}
2024-04-12 16:30:36 +02:00
<div id="assigneissu{{ issue.id }}" class="assigneissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
<i class="btn fas fa-users p-0 m-0 fa-fw pl-1 pl-1"></i>
<span style="cursor:pointer;">
Affecté à
</span>
</div>
<div id="notesissu{{ issue.id }}" class="notesissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
<i class="btn fas fa-clipboard p-0 m-0 fa-fw pl-1 pl-1"></i>
<span style="cursor:pointer;">
Notes
</span>
</div>
2024-04-12 20:27:25 +02:00
<div>
2024-04-12 21:56:11 +02:00
<input type="text" id="colorissu{{ issue.id }}" data-issue="{{ issue.id }}" class="pick-a-color form-control form-control spectrum sp-colorize" value="{{issue.color}}" autocomplete="off">
2024-04-12 20:27:25 +02:00
</div>
2024-02-20 10:39:49 +01:00
</div>
2024-02-17 19:01:29 +01:00
<div id="issu-detail{{ issue.id }}" class="card-body p-1 issu-detail">
2024-02-16 16:40:41 +01:00
<div>
{% 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}}">
2024-05-07 17:24:15 +02:00
<i class="fas fa-clock"></i>
2024-02-16 16:40:41 +01:00
{{ label.name }}
</span>
{% endif %}
{% endfor %}
</div>
<div>
2024-02-16 16:40:41 +01:00
{% 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}}">
2024-05-07 17:24:15 +02:00
<i class="fas fa-quote-right"></i>
2024-02-16 16:40:41 +01:00
{{ label.name }}
</span>
{% endif %}
{% endfor %}
</div>
<div>
{% 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}}">
2024-05-07 17:24:15 +02:00
<i class="fas fa-users"></i>
2024-02-16 16:40:41 +01:00
{{ label.name }}
</span>
{% endif %}
{% endfor %}
</div>
2024-02-16 16:40:41 +01:00
<div>
{% 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>
<div>
{% for assignee in issue.giteajson.assignees %}
<img src="{{assignee.avatar_url}}" class="assignee" title="{{assignee.username}}">
{% endfor %}
</div>
<div id="modissu{{ issue.id }}" class="modissu btn btn-link d-flex justify-content-end align-items-center" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}" type="button">
2024-02-20 10:39:49 +01:00
<i class="fas fa-weight-hanging"></i> = <span class="issue{{issue.id}}-weight">{{ issue.weight }}</span>
2024-02-16 16:40:41 +01:00
</div>
<div class="d-flex text-small">
2024-02-16 16:40:41 +01:00
<div class="text-small">Crée le {{issue.giteajson.created_at|date("d/m/y")}}</div>
<div class="text-small text-right ml-auto">Modifié le {{issue.giteajson.updated_at|date("d/m/y")}}</div>
</div>
<div class="text-small">
<div class="text-small">Par {{issue.giteajson.user.login}}</div>
{% if issue.giteastate=="closed" %}
<div class="text-small text-right ml-auto">
Clos le {{issue.giteajson.closed_at|date("d/m/y")}}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endfor %}
</ul>
2022-01-28 16:54:46 +01:00
</div>
</div>
{% endfor %}
2022-01-28 16:54:46 +01:00
{% endfor %}
2021-07-20 13:04:47 +02:00
</div>
2022-01-28 16:54:46 +01:00
</div>
{% endfor %}
2021-07-20 13:04:47 +02:00
</div>
2022-01-28 16:54:46 +01:00
</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">&times;</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>
2024-04-12 16:30:36 +02:00
<div id="mymodalblock" 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">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group ">
<label class="control-label required" for="issu_weight">
Le ticket en cours bloque le ticket suivant
</label>
<input type="hidden" id="modal-issueid" name="modal-issueid" required="required" class=" form-control" value="">
<input type="integer" id="modal-issueblocked" name="modal-issueweight" required="required" class=" form-control" value="">
</div>
<button id="issu_blockupdate" class="btn btn-success">Enregistrer</button>
</div>
</div>
</div>
</div>
<div id="mymodalassignees" 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">&times;</span>
</button>
</div>
<div class="modal-body">
<input type="hidden" id="modal-issueid" name="modal-issueid" required="required" class=" form-control" value="">
<div style="width:100%">
<label class="control-label required" for="issu_weight">
Affecté à
</label>
<select id="modal-assignees" multiple="multiple" class="form-control mb-3">
{% for giteaassignee in giteaassignees %}
<option value="{{giteaassignee.login}}">{{giteaassignee.login}}</option>
{% endfor %}
</select>
</div>
<button id="issu_assigne" class="btn btn-success mt-3">Enregistrer</button>
</div>
</div>
</div>
2024-06-15 11:02:32 +02:00
</div>
<div id="mymodalnotes" 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">&times;</span>
</button>
</div>
<div class="modal-body">
<input type="hidden" id="modal-issueid" name="modal-issueid" required="required" class=" form-control" value="">
<div style="width:100%">
<textarea id="modal-notes" style="width:100%; height:300px;">
</textarea>
</div>
<button id="issu_notes" class="btn btn-success mt-3">Enregistrer</button>
</div>
</div>
</div>
</div>
2024-06-15 11:02:32 +02:00
{% set end = microtime(true) %}
{% set duration = end - start %}
<p>render time: {{ duration }} seconds</p>
2021-07-20 13:04:47 +02:00
{% endblock %}
{% block localjavascript %}
2022-01-28 16:54:46 +01:00
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
}
});
}
2024-06-15 11:02:32 +02:00
2021-07-20 13:04:47 +02:00
$(document).ready(function() {
$(".issue").tooltip({
content: function() {
return $(this).data('tooltip'); // Utilise le contenu de l'attribut data-tooltip
},
items: '[data-tooltip]', // Spécifie les éléments qui déclenchent le tooltip
html: true // Autorise le HTML dans le tooltip (si nécessaire pour certains tooltips personnalisés)
});
2022-01-11 13:39:51 +01:00
// Apply Filter
function showhide() {
2024-02-16 16:40:41 +01:00
// Vue condensée
if($("#viewcondensed").is(':checked')) {
$(".issu-detail").hide();
}
else {
$(".issu-detail").show();
}
// Afficher masquer les jalons
if($("#filtermilestones").val().length !== 0 && $("#filtersprints").val().length === 0) {
2022-01-11 13:39:51 +01:00
$("[data-milestone]").hide();
$.each($("#filtermilestones").val(), function( index, value ) {
2024-02-21 20:58:38 +01:00
console.log(value);
2022-01-11 13:39:51 +01:00
$("[data-milestone="+value+"]").show();
});
}
else $("[data-milestone]").show();
// Afficher masquer les sprints
if($("#filtersprints").val().length !== 0) {
$("[data-millestonesprint]").hide();
$.each($("#filtersprints").val(), function( index, value ) {
$("[data-millestonesprint="+value+"]").show();
});
}
else if($("#filtermilestones").val().length === 0)$("[data-millestonesprint]").show();
2022-01-28 16:54:46 +01:00
$(".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;
});
}
2022-01-11 13:39:51 +01:00
2022-02-03 17:26:35 +01:00
if(toshow&&$("#filterprioritys").val().length !== 0) {
toshow=false;
$.each($("#filterprioritys").val(), function( index, value ) {
if (domissue.hasClass("datapriority"+value))
toshow=true;
});
}
2023-08-30 11:15:33 +02:00
if(toshow&&$("#filtertypes").val().length !== 0) {
toshow=false;
$.each($("#filtertypes").val(), function( index, value ) {
if (domissue.hasClass("datatype"+value))
toshow=true;
});
}
2022-01-28 16:54:46 +01:00
if(toshow&&$("#filterlabels").val().length !== 0) {
toshow=false;
2022-01-11 13:39:51 +01:00
$.each($("#filterlabels").val(), function( index, value ) {
2022-01-28 16:54:46 +01:00
if(domissue.hasClass("datalabel"+value))
toshow=true;
2022-01-11 13:39:51 +01:00
});
2022-01-28 16:54:46 +01:00
}
if(toshow&&$("#filterassignees").val().length !== 0) {
toshow=false;
2022-01-11 13:39:51 +01:00
$.each($("#filterassignees").val(), function( index, value ) {
if (domissue.hasClass("dataassignee"+value))
2022-01-28 16:54:46 +01:00
toshow=true;
2022-01-11 13:39:51 +01:00
});
2022-01-28 16:54:46 +01:00
}
2022-06-29 11:50:27 +02:00
if(toshow&&$("#filterexcludes").val().length !== 0) {
$.each($("#filterexcludes").val(), function( index, value ) {
if(domissue.hasClass("datalabel"+value))
toshow=false;
});
}
2022-01-28 16:54:46 +01:00
if(!toshow) domissue.hide();
});
textfilters="";
if($("#filtermilestones").val().length!==0) {
data = $("#filtermilestones").select2('data');
textfilters=textfilters+"&nbsp;&nbsp;&nbsp;&nbsp;<b>JALONS</b> =";
$.each($("#filtermilestones").val(), function( index, value ) {
if(index>0)textfilters=textfilters+" &";
textfilters=textfilters+" "+data[index].text;
2022-01-11 13:39:51 +01:00
});
}
if($("#filtersprints").val().length!==0) {
data = $("#filtersprints").select2('data');
textfilters=textfilters+"&nbsp;&nbsp;&nbsp;&nbsp;<b>SPRINT</b> =";
$.each($("#filtersprints").val(), function( index, value ) {
if(index>0)textfilters=textfilters+" &";
textfilters=textfilters+" "+data[index].text;
});
}
2022-01-28 16:54:46 +01:00
if($("#filterteams").val().length!==0) {
data = $("#filterteams").select2('data');
textfilters=textfilters+"&nbsp;&nbsp;&nbsp;&nbsp;<b>EQUIPES</b> =";
$.each($("#filterteams").val(), function( index, value ) {
if(index>0)textfilters=textfilters+" &";
textfilters=textfilters+" "+data[index].text;
});
}
2022-02-03 17:26:35 +01:00
if($("#filterprioritys").val().length!==0) {
data = $("#filterprioritys").select2('data');
textfilters=textfilters+"&nbsp;&nbsp;&nbsp;&nbsp;<b>EQUIPES</b> =";
$.each($("#filterprioritys").val(), function( index, value ) {
if(index>0)textfilters=textfilters+" &";
textfilters=textfilters+" "+data[index].text;
});
}
2023-08-30 11:15:33 +02:00
if($("#filtertypes").val().length!==0) {
data = $("#filtertypes").select2('data');
textfilters=textfilters+"&nbsp;&nbsp;&nbsp;&nbsp;<b>EQUIPES</b> =";
$.each($("#filtertypes").val(), function( index, value ) {
if(index>0)textfilters=textfilters+" &";
textfilters=textfilters+" "+data[index].text;
});
}
2022-01-28 16:54:46 +01:00
if($("#filterlabels").val().length!==0) {
data = $("#filterlabels").select2('data');
textfilters=textfilters+"&nbsp;&nbsp;&nbsp;&nbsp;<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+"&nbsp;&nbsp;&nbsp;&nbsp;<b>AFFECTATIONS</b> =";
$.each($("#filterassignees").val(), function( index, value ) {
if(index>0)textfilters=textfilters+" &";
textfilters=textfilters+" "+data[index].text;
});
}
2022-06-29 11:50:27 +02:00
if($("#filterexcludes").val().length!==0) {
data = $("#filterexcludes").select2('data');
textfilters=textfilters+"&nbsp;&nbsp;&nbsp;&nbsp;<b>EXCLURE ETIQUETTES</b> =";
$.each($("#filterexcludes").val(), function( index, value ) {
if(index>0)textfilters=textfilters+" &";
textfilters=textfilters+" "+data[index].text;
});
}
2024-02-16 16:40:41 +01:00
$("#textfilters").html(textfilters);
}
2024-04-12 16:30:36 +02:00
$(document).on('click','.viewissu',function(){
$(".submenu").hide();
url="{{path('app_scrumissue_view',{id:"xxx"})}}";
url=url.replace("xxx",$(this).data("issue"));
ModalLoad('mymodallarge','Aperçu Ticket',url);
});
$(document).on('click','.lockissu',function(){
$(".modal-title").html("#"+$(this).data("giteaid")+" - "+$(this).data("giteatitle"));
$("#modal-issueid").val($(this).data("issue"));
2024-04-12 16:30:36 +02:00
$("#modal-issueblocked").val("");
$("#mymodalblock").modal('show');
$("#modal-issueblocked").focus();
});
$("#issu_blockupdate").click(function(){
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_block")}}",
data: {
id:$("#modal-issueid").val(),
issueblocked:$("#modal-issueblocked").val(),
},
success: function(data) {
location.reload();
},
error: function (request, status, error) {
$("#issueblocked").modal('hide');
}
});
});
$(document).on('click','.unlockissu',function(){
if (window.confirm("Souhaitez-vous enlever le blocage ?")) {
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_unblock")}}",
data: {
id:$(this).data("issue"),
},
success: function(data) {
location.reload();
},
error: function (request, status, error) {
alert("pb sur le déblocage");
}
});
}
});
$(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) {
2024-02-20 10:39:49 +01:00
$(".issue"+$("#modal-issueid").val()+"-weight").html($("#modal-issueweight").val());
refreshinfo();
$("#mymodalissue").modal('hide');
},
error: function (request, status, error) {
$("#mymodalissue").modal('hide');
}
});
});
2024-04-12 21:56:11 +02:00
$(".pick-a-color").on("change", function() {
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_color")}}",
data: {
id:$(this).data("issue"),
color:$(this).val(),
},
success: function(data) {
location.reload();
},
error: function (request, status, error) {
alert("pb sur le set color");
}
});
});
$(document).on('click','.assigneissu',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) {
var tbassignees=[];
if(data.giteajson.assignees) {
for (let assignee of data.giteajson.assignees) {
tbassignees.push(assignee.login);
}
}
$('#modal-assignees').select2();
$('#modal-assignees').val(tbassignees);
$('#modal-assignees').trigger('change');
$("#mymodalassignees").modal('show');
$(".submenu").hide();
$("#modal-assignees").focus();
},
});
});
$("#issu_assigne").click(function(){
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_assigne")}}",
data: {
id:$("#modal-issueid").val(),
assignees: $("#modal-assignees").val(),
},
success: function(data) {
location.reload();
},
error: function (request, status, error) {
alert("pb sur l'affectation au ticket");
}
});
});
$(document).on('click','.notesissu',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-notes').val(data.notes);
$("#mymodalnotes").modal('show');
$(".submenu").hide();
$("#modal-notes").focus();
},
});
});
$("#issu_notes").click(function(){
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_notes")}}",
data: {
id:$("#modal-issueid").val(),
notes: $("#modal-notes").val(),
},
success: function(data) {
location.reload();
},
error: function (request, status, error) {
alert("pb sur enregistrement du ticket");
}
});
});
2022-01-11 13:39:51 +01:00
// 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 Sprint
function filtersprints() {
$.ajax({
method: "POST",
url: "{{ path('app_user_preference') }}",
data: {
key:'filtersprints',
id:{{scrum.id}},
value: $("#filtersprints").val()
}
});
showhide();
}
$('#filtersprints').select2({sorter: data => data.sort((a, b) => a.text.localeCompare(b.text)),});
{% if filtersprints %}
{% for sprint in filtersprints %}
$("#filtersprints").val($("#filtersprints").val().concat("{{sprint}}"));
{%endfor%}
$('#filtersprints').trigger('change');
{% endif %}
$('#filtersprints').on("select2:select", function(e) {
filtersprints();
});
$('#filtersprints').on("select2:unselect", function(e) {
filtersprints();
});
2022-01-28 16:54:46 +01:00
// 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();
});
2022-02-03 17:26:35 +01:00
// 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();
});
2023-08-30 11:15:33 +02:00
// 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();
});
2022-01-11 13:39:51 +01:00
// 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();
});
2022-06-29 11:50:27 +02:00
// 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();
});
2024-02-16 16:40:41 +01:00
// View condensed
{% if viewcondensed %}
$("#viewcondensed").prop( "checked", {{ viewcondensed }} )
{% endif %}
$('#viewcondensed').change(function() {
$.ajax({
method: "POST",
url: "{{ path('app_user_preference') }}",
data: {
key:'viewcondensed',
id:{{scrum.id}},
value: this.checked
}
}).done(function( data ) {
showhide();
});
});
2022-06-29 11:50:27 +02:00
// Resume filtre
2022-01-28 16:54:46 +01:00
{% if not showfilters %}
$("#filters").addClass("d-none");
$("#filters").removeClass("d-flex");
{% endif %}
2022-01-11 13:39:51 +01:00
// Appliy filters
showhide();
refreshinfo();
2022-01-28 16:54:46 +01:00
$("#mycontent").show();
2022-01-11 13:39:51 +01:00
2024-06-15 11:02:32 +02:00
lastupdate="{{updatedate|date("Ymd H:i")}}";
2024-02-20 12:00:40 +01:00
console.log(lastupdate);
2024-03-15 16:49:22 +01:00
2021-07-20 13:04:47 +02:00
$( ".scrumcolumn" ).sortable({
2024-02-16 16:40:41 +01:00
handle: ".issu-id",
2021-07-20 13:04:47 +02:00
connectWith: ".scrumcolumn",
cursor: "move",
2024-02-21 20:58:38 +01:00
start: function( event, ui ) {
$(".submenu").hide();
},
2024-02-23 12:35:29 +01:00
stop: function( event, ui ) {
2021-07-20 13:04:47 +02:00
id=$(ui.item).data("issue");
2022-01-11 13:39:51 +01:00
oldcolumn=$(ui.item).data("column");
2021-07-20 13:04:47 +02:00
oldmilestone=$(ui.item).data("milestone");
oldsprint=$(ui.item).data("sprint");
2022-01-11 13:39:51 +01:00
newcolumn=$(ui.item).parent().data("column");
2021-07-20 13:04:47 +02:00
newmilestone=$(ui.item).parent().data("milestone");
newsprint=$(ui.item).parent().data("sprint");
console.log("ID = "+id+" = Column : "+oldcolumn+">>"+newcolumn+" = Milestone : "+oldmilestone+">>"+newmilestone+" = Sprint : "+oldsprint+">>"+newsprint );
2022-01-22 11:18:42 +01:00
if(oldcolumn!=newcolumn||oldmilestone!=newmilestone||oldsprint!=newsprint) {
2021-07-20 13:04:47 +02:00
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_change")}}",
data: {
id:id,
2022-01-11 13:39:51 +01:00
oldcolumn:oldcolumn,
2021-07-20 13:04:47 +02:00
oldmilestone:oldmilestone,
oldsprint:oldsprint,
2022-01-11 13:39:51 +01:00
newcolumn:newcolumn,
2021-07-20 13:04:47 +02:00
newmilestone:newmilestone,
newsprint:newsprint
2021-07-20 13:04:47 +02:00
},
2022-01-22 11:18:42 +01:00
success: function(data) {
2022-01-11 13:39:51 +01:00
$(ui.item).data("column",newcolumn);
2021-07-20 13:04:47 +02:00
$(ui.item).data("milestone",newmilestone);
$(ui.item).data("sprint",newsprint);
2022-01-22 11:18:42 +01:00
if(data) lastupdate=data;
2024-02-20 12:00:40 +01:00
console.log(lastupdate);
2024-02-20 13:28:20 +01:00
refreshinfo();
2021-07-20 13:04:47 +02:00
},
error: function (request, status, error) {
$( ".scrumcolumn" ).sortable('cancel');
}
});
}
2021-12-06 15:39:12 +01:00
lstordered="";
$(".scrumcolumn div" ).each(function( index ) {
if($(this).data("id")) {
if(index==0) lstordered=$(this).data("id");
else lstordered=lstordered+","+$(this).data("id");
2022-01-11 13:39:51 +01:00
}
2021-12-06 15:39:12 +01:00
});
2022-01-11 13:39:51 +01:00
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_order")}}",
data: {
id:{{scrum.id}},
lstordered:lstordered,
}
});
},
2022-01-22 11:18:42 +01:00
});
var intervalId = window.setInterval(function(){
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_ctrlchange")}}",
data: {
id:{{scrum.id}},
lastupdate:lastupdate
},
success: function(fgupdated) {
2024-06-15 11:02:32 +02:00
if(fgupdated=="1") {
2022-01-22 11:18:42 +01:00
$("#haveupdate").show();
}
}
});
2024-02-21 22:18:01 +01:00
}, 300000);
2022-01-22 11:18:42 +01:00
2021-07-20 13:04:47 +02:00
});
2024-02-20 10:39:49 +01:00
2024-06-15 11:02:32 +02:00
2024-02-23 12:35:29 +01:00
function refreshinfo() {
$.ajax({
method: "POST",
url: "{{path("app_scrum_info",{id:scrum.id})}}",
success: function(data) {
html="";
$("[data-weight]").html("");
Object.entries(data.tbestim).forEach(entry => {
const [keyj, jalon] = entry;
html+='<table style="color:var(--colorftbodydark);zoom:75%; width:100%; border:1px solid var(--colorbgbodylight)">';
html+='<tr>';
html+='<td class="pl-1">'+jalon.nmjal+'</td>';
html+='<td class="pr-1" style="width:30px;text-align:right;">'+jalon.nbjrs+'</span></td>';
html+='</tr>';
nofirst=false;
Object.entries(jalon.sprints).forEach(entry => {
const [keys, sprint] = entry;
if(nofirst || sprint.idspr!=-100) {
html+='<tr>';
html+='<td class="pl-1">'+sprint.nmspr+'</td>';
html+='<td class="pr-1" style="width:30px;text-align:right;">'+sprint.nbjrs+'</span></td>';
html+='</tr>';
}
Object.entries(sprint.columns).forEach(entry => {
const [keys, column] = entry;
$("[data-weight="+column.gicol+"-"+jalon.gijal+"-"+sprint.idspr+"]").html(column.nbjrs);
});
nofirst=true;
});
html+='</table>';
});
$("#tbestim").html(html);
}
});
}
2024-02-20 10:39:49 +01:00
function issuhover(btn,idissu) {
2024-02-21 20:58:38 +01:00
$(".submenu").hide();
2024-02-20 10:39:49 +01:00
$("#submenu"+idissu).css("display","flex");
}
function issuout(menu) {
$(menu).css("display","none");
}
2021-07-20 13:04:47 +02:00
{% endblock %}