dockerisation
This commit is contained in:
94
templates/Config/edit.html.twig
Executable file
94
templates/Config/edit.html.twig
Executable file
@ -0,0 +1,94 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification CONFIGURATION
|
||||
{% elseif mode=="submit" %}
|
||||
Création CONFIGURATION
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_config') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" and not config.required %}
|
||||
<a href="{{ path('app_config_delete',{'id':config.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="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.id) }}
|
||||
{{ form_row(form.value) }}
|
||||
{% if config.type=="logo" %}
|
||||
<div style="width:90px; margin:10px auto;">
|
||||
{% set color = "" %}
|
||||
{% if config.id=='logodark' %}
|
||||
{% set color = app.session.get('colorbgbodydark') %}
|
||||
{% elseif config.id=='logolight' %}
|
||||
{% set color = app.session.get('colorbgbodylight') %}
|
||||
{% endif %}
|
||||
|
||||
<img id="config_value_img" src="{{ asset("uploads/logo/"~config.value) }}" style="background-color: {{color}}; width:90px;height:90px; margin:auto;display:block;">
|
||||
<a class="btn btn-info" style="width:90px" onClick="ModalLoad('mymodallarge','Logo','{{ path('app_config_logo') }}');" title='Ajouter un Logo'>Modifier</a>
|
||||
</div>
|
||||
{% elseif config.type=="hero" %}
|
||||
<div style="margin:10px auto;">
|
||||
<img id="config_value_img" src="{{ asset("uploads/hero/"~config.value) }}" style="width:100%;margin:auto;display:block;">
|
||||
<a class="btn btn-info" style="width:100%" onClick="ModalLoad('mymodallarge','Carrousel','{{ path('app_crop01', {"type": "hero", "reportinput": "#config_value" }) }}');" title='Ajouter une Bannière'>Modifier</a>
|
||||
</div>
|
||||
{% elseif config.type=="image" %}
|
||||
<div style="margin:10px auto;">
|
||||
<img id="config_value_img" src="{{ asset("uploads/hero/"~config.value) }}" style="width:100%;margin:auto;display:block;">
|
||||
<a class="btn btn-info" style="width:100%" onClick="ModalLoad('mymodallarge','Image','{{ path('app_crop01', {"type": "image", "reportinput": "#config_value" }) }}');" title='Ajouter une Image'>Modifier</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_row(form.help) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$("#config_value_img").on('error', function(){
|
||||
var imgSrc = $(this).attr('src');
|
||||
if(imgSrc!="{{ asset("uploads/"~config.type) }}/")
|
||||
$(this).attr('src',imgSrc);
|
||||
});
|
||||
$('#mymodallarge').on('hidden.bs.modal', function () {
|
||||
var imgSrc = $("#config_value_img").attr('src');
|
||||
$("#config_value_img").attr('src',imgSrc);
|
||||
});
|
||||
{% endblock %}
|
60
templates/Config/list.html.twig
Normal file
60
templates/Config/list.html.twig
Normal file
@ -0,0 +1,60 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
CONFIGURATIONS
|
||||
</h1>
|
||||
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<h3>Générale</h3>
|
||||
{{ render(path("app_config_render",{category:"site"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Couleurs des fonds de page</h3>
|
||||
{{ render(path("app_config_render",{category:"colorbgbody"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Polices</h3>
|
||||
{{ render(path("app_config_render",{category:"font"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Couleurs des titres </h3>
|
||||
{{ render(path("app_config_render",{category:"colorfttitle"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Couleurs de la police </h3>
|
||||
{{ render(path("app_config_render",{category:"colorftbody"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Logo</h3>
|
||||
{{ render(path("app_config_render",{category:"logo"})) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
40
templates/Config/logo.html.twig
Normal file
40
templates/Config/logo.html.twig
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block encorelinktags %}
|
||||
{{ encore_entry_link_tags('dropzone') }}
|
||||
{% endblock encorelinktags %}
|
||||
|
||||
{% block body %}
|
||||
<h3 class="page-header">Téléchargez votre Logo</h3>
|
||||
<a class="btn btn-default" onClick="closeModal();">Annuler</a>
|
||||
|
||||
<form
|
||||
action="{{ oneup_uploader_endpoint('logo') }}"
|
||||
class="dropzone"
|
||||
id="mydropzone"
|
||||
data-acceptedMimeTypes="image/*"
|
||||
data-maxFiles=1
|
||||
|
||||
style="margin-top:10px">
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block encorescripttags %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function dropzoneinit( elt) {
|
||||
}
|
||||
|
||||
function dropzonesuccess( file, response ) {
|
||||
parent.$("#config_value").val(response["file"]);
|
||||
parent.$("#config_value_img").attr("src","{{ asset("uploads/logo/") }}"+response["file"]);
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodallarge").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
81
templates/Config/render.html.twig
Normal file
81
templates/Config/render.html.twig
Normal file
@ -0,0 +1,81 @@
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
{% for config in configs|sort((a, b) => a.order <=> b.order) %}
|
||||
{% set continue = true %}
|
||||
{% if not config.grouped is empty %}
|
||||
|
||||
{% if app.session.get(config.grouped)==0 %}
|
||||
{% set continue = false %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{%if continue %}
|
||||
<tr>
|
||||
<td width="70px">
|
||||
{% if config.changeable %}
|
||||
<a href="{{path("app_config_update",{id:config.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if not config.required %}
|
||||
<a href="{{path("app_config_delete",{id:config.id})}}"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td width="50%">{{config.title}}</td>
|
||||
|
||||
{% set val = config.value %}
|
||||
{% if val is empty %}
|
||||
{% set val=app.session.get(config.id) %}
|
||||
{% endif %}
|
||||
|
||||
{% set color = "" %}
|
||||
{% set bgcolor = "" %}
|
||||
{% set otherstyle = "" %}
|
||||
{% if config.id=='colorbgbodydark' %}
|
||||
{% set bgcolor = val %}
|
||||
{% set color = app.session.get('colorftbodydark') %}
|
||||
{% elseif config.id=='colorbgbodylight' %}
|
||||
{% set bgcolor = val %}
|
||||
{% set color = app.session.get('colorftbodylight') %}
|
||||
{% elseif config.id=='colorfttitledark' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
||||
{% set color = val %}
|
||||
{% elseif config.id=='colorfttitlelight' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
||||
{% set color = val %}
|
||||
{% elseif config.id=='colorftbodydark' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
||||
{% set color = val %}
|
||||
{% elseif config.id=='colorftbodylight' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
||||
{% set color = val %}
|
||||
{% elseif config.id=='fonttitle' %}
|
||||
{% set color = app.session.get('colorfttitlelight') %}
|
||||
{% set otherstyle = "font-family: "~val~";" %}
|
||||
{% elseif config.id=='logodark' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
||||
{% set otherstyle = "text-align: center;" %}
|
||||
{% elseif config.id=='logolight' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
||||
{% set otherstyle = "text-align: center;" %}
|
||||
{% endif %}
|
||||
|
||||
<td style="overflow-wrap: anywhere; background-color: {{ bgcolor }}; color: {{color}}; {{otherstyle}}" >
|
||||
|
||||
|
||||
{% if config.type=="boolean" %}
|
||||
{% if val=="0" %} Non
|
||||
{% elseif val=="1" %} Oui
|
||||
{%endif%}
|
||||
{% elseif config.type=="logo" %}
|
||||
{%if not val is empty %}
|
||||
<img src="{{ asset("uploads/logo/"~val) }}" height=50px>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ val|raw }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
59
templates/Cron/edit.html.twig
Normal file
59
templates/Cron/edit.html.twig
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification JOB
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_cron') }}>Annuler</a>
|
||||
|
||||
<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="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.command) }}
|
||||
{{ form_row(form.jsonargument) }}
|
||||
{{ form_row(form.statut) }}
|
||||
{{ form_row(form.repeatcall) }}
|
||||
{{ form_row(form.repeatinterval) }}
|
||||
{{ form_row(form.nextexecdate) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#command").focus();
|
||||
});
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
54
templates/Cron/list.html.twig
Normal file
54
templates/Cron/list.html.twig
Normal file
@ -0,0 +1,54 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
JOBS
|
||||
</h1>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Jobs
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th>Prochaine exécution</th>
|
||||
<th>Command</th>
|
||||
<th>Description</th>
|
||||
<th>Statut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for cron in crons %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_cron_update",{id:cron.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{cron.nextexecdate|date("d/m/Y H:i")}}</td>
|
||||
<td>{{cron.command}}</td>
|
||||
<td>{{cron.description}}</td>
|
||||
<td>{{cron.statutlabel}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
||||
|
16
templates/Cron/logs.html.twig
Normal file
16
templates/Cron/logs.html.twig
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
Télécharger les logs
|
||||
</h1>
|
||||
|
||||
{% if appCron %}
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"cron"}) }}>Log CRON</a>
|
||||
{% endif %}
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"prod"}) }}>Log PROD</a>
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"dev"}) }}>Log DEV</a>
|
||||
{% if appCron %}
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"dump"}) }}>Dump de la Base</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
41
templates/Crop/crop01.html.twig
Normal file
41
templates/Crop/crop01.html.twig
Normal file
@ -0,0 +1,41 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block encorelinktags %}
|
||||
{{ encore_entry_link_tags('dropzone') }}
|
||||
{% endblock encorelinktags %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
<h3 class="page-header"></h3>
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
<form
|
||||
action="{{ oneup_uploader_endpoint(type) }}"
|
||||
class="dropzone"
|
||||
id="mydropzone"
|
||||
data-acceptedMimeTypes="image/*"
|
||||
data-maxFiles=1
|
||||
|
||||
style="margin-top:10px">
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block encorescripttags %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
window.parent.$(".modal-title").html("ETAPE 1 - Téléchargez votre image");
|
||||
|
||||
function dropzoneinit( elt) {
|
||||
}
|
||||
function dropzonesuccess( file, response ) {
|
||||
$(location).attr('href',"{{ path('app_crop02', {"type": type, "reportinput": reportinput }) }}?file="+response["file"]);
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodallarge").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
121
templates/Crop/crop02.html.twig
Normal file
121
templates/Crop/crop02.html.twig
Normal file
@ -0,0 +1,121 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
img.crop-image{ width:100% }
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if not submited %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
{% if ratio=="1:1" %}
|
||||
{% set class="width:90px; height:90px;" %}
|
||||
{% elseif ratio=="16:9" %}
|
||||
{% set class="width:160px; height:90px;" %}
|
||||
{% elseif ratio=="16:2" %}
|
||||
{% set class="width:160px; height:20px;" %}
|
||||
{% endif %}
|
||||
|
||||
<div id='preview' style='overflow:hidden; {{class}} position: absolute; top: 0px; right: 10px;'>
|
||||
<img src="{{ asset("uploads/"~type~"/"~file) }}" style='position: relative;' alt='Thumbnail Preview' />
|
||||
</div>
|
||||
|
||||
<div style="width:100%; margin:65px auto 0px auto;">
|
||||
<div id="largeimg" style="width:800px;margin:auto;">
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block localjavascript %}
|
||||
function move(data) {
|
||||
$('#form_x').val(data.x);
|
||||
$('#form_y').val(data.y);
|
||||
$('#form_xs').val(data.xScaledToImage);
|
||||
$('#form_ys').val(data.yScaledToImage);
|
||||
|
||||
preview();
|
||||
}
|
||||
|
||||
function resize(data) {
|
||||
$('#form_w').val(data.width);
|
||||
$('#form_h').val(data.height);
|
||||
$('#form_ws').val(data.widthScaledToImage);
|
||||
$('#form_hs').val(data.heightScaledToImage);
|
||||
|
||||
preview();
|
||||
}
|
||||
|
||||
function preview(data) {
|
||||
{% if ratio=="1:1" %}
|
||||
var scaleX = 90 / $('#form_w').val();
|
||||
var scaleY = 90 / $('#form_h').val();
|
||||
{% elseif ratio=="16:9" %}
|
||||
var scaleX = 160 / $('#form_w').val();
|
||||
var scaleY = 160 / $('#form_h').val();
|
||||
{% elseif ratio=="16:2" %}
|
||||
var scaleX = 160 / $('#form_w').val();
|
||||
var scaleY = 160 / $('#form_h').val();
|
||||
{% endif %}
|
||||
|
||||
$('#preview img').css({
|
||||
width: Math.round(scaleX * $('#largeimg').width()) + 'px',
|
||||
height: Math.round(scaleY * $('#largeimg').height()) + 'px',
|
||||
marginLeft: '-' + Math.round(scaleX * $('#form_x').val()) + 'px',
|
||||
marginTop: '-' + Math.round(scaleY * $('#form_y').val()) + 'px'
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function reportThumb() {
|
||||
{% if reportinput == "refresh" %}
|
||||
window.parent.location.reload();
|
||||
{% elseif reportinput != "none" %}
|
||||
window.parent.$("{{ reportinput }}").val("thumb_{{ file }}");
|
||||
window.parent.$("{{ reportinput }}_img").attr("src","{{ asset("uploads/"~type~"/thumb_"~file) }}");
|
||||
{% endif %}
|
||||
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodallarge").modal('hide');
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
{% if submited %}
|
||||
reportThumb();
|
||||
{% else %}
|
||||
window.parent.$(".modal-title").html("ETAPE 2 - Découper votre image");
|
||||
|
||||
realheight=$('#largeimg').height();
|
||||
realwidth=$('#largeimg').width();
|
||||
|
||||
if(realheight>505) { $('#largeimg').height(505); $('#largeimg').width("auto") }
|
||||
if($('#largeimg').width() > 868) { $('#largeimg').width(868); $('#largeimg').height("auto") }
|
||||
|
||||
resizeheight=$('#largeimg').height();
|
||||
resizewidth=$('#largeimg').width();
|
||||
|
||||
$('#largeimg').CropSelectJs({
|
||||
imageSrc: "/{{ appAlias }}/uploads/{{type}}/{{ file }}",
|
||||
selectionResize: function(data) { resize(data); },
|
||||
selectionMove: function(data) { move(data); },
|
||||
});
|
||||
|
||||
{% if ratio=="1:1" %}
|
||||
{% set nbratio=1 %}
|
||||
{% elseif ratio=="16:9" %}
|
||||
{% set nbratio=(16/9) %}
|
||||
{% elseif nbratio=="16:2" %}
|
||||
{% set class=(16/2) %}
|
||||
{% endif %}
|
||||
|
||||
$('#largeimg').CropSelectJs('setSelectionAspectRatio',{{nbratio}});
|
||||
{% endif %}
|
||||
});
|
||||
{% endblock %}
|
162
templates/Form/fields.html.twig
Normal file
162
templates/Form/fields.html.twig
Normal file
@ -0,0 +1,162 @@
|
||||
{% extends 'form_div_layout.html.twig' %}
|
||||
|
||||
{# Voir https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig #}
|
||||
|
||||
{# On commence par simplement ajouter le form-group au row de nos formulaires #}
|
||||
{% block form_row -%}
|
||||
{% set attr = attr|merge({'help': (attr.help|default(true)) }) %}
|
||||
<div class="form-group {{ errors|length > 0 ? 'has-error' : '' }}">
|
||||
{{- form_label(form) }}
|
||||
{{- form_widget(form) }}
|
||||
{{ form_errors(form) }}
|
||||
</div>
|
||||
{%- endblock form_row %}
|
||||
|
||||
{# Puis on modifie très simplement nos input et textarea
|
||||
les plus importants pour y ajouter le class imposée par Bootstrap 3 #}
|
||||
{% block textarea_widget %}
|
||||
{% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
|
||||
{{ parent() }}
|
||||
{% endblock textarea_widget %}
|
||||
|
||||
{% block form_widget_simple %}
|
||||
{% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
|
||||
{{ parent() }}
|
||||
{% endblock form_widget_simple %}
|
||||
|
||||
{% block form_label -%}
|
||||
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' control-label')|trim}) %}
|
||||
{% if 'checkbox' not in block_prefixes %}
|
||||
{% if label is not same as(false) -%}
|
||||
{% if not compound -%}
|
||||
{% set label_attr = label_attr|merge({'for': id}) %}
|
||||
{%- endif %}
|
||||
{% if required -%}
|
||||
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
|
||||
{%- endif %}
|
||||
{% if label is empty -%}
|
||||
{% set label = name|humanize %}
|
||||
{%- endif -%}
|
||||
|
||||
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
|
||||
{{ label|trans({}, translation_domain)|raw }}
|
||||
<span class="mandatory">{% if required %}*{% endif %}</span>
|
||||
</label>
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
{%- endblock form_label %}
|
||||
|
||||
{# et enfin les erreurs #}
|
||||
{% block form_errors %}
|
||||
{% if errors|length > 0 %}
|
||||
{% if attr.help is defined and attr.help %}
|
||||
<p class="help-block text-danger">
|
||||
{% for error in errors %}
|
||||
{{ error.message }}<br />
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% else %}
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for error in errors %}
|
||||
{{ error.message|raw }}<br />
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock form_errors %}
|
||||
|
||||
{# Personnalisation des boutons #}
|
||||
{% block button_widget -%}
|
||||
{% if label is empty -%}
|
||||
{% set label = name|humanize %}
|
||||
{%- endif -%}
|
||||
{% set attr = attr|merge({'class': (attr.class|default('') ~ '')|trim}) %}
|
||||
<button type="{{ type|default('button') }}" {{ block('button_attributes') }}>{{
|
||||
label|trans({}, translation_domain) }}
|
||||
{% if type is defined and type == 'submit' -%}
|
||||
|
||||
{% endif %}
|
||||
</button>
|
||||
{%- endblock button_widget %}
|
||||
|
||||
{# Personnalisation des select #}
|
||||
{% block choice_widget_collapsed %}
|
||||
{% set attr = attr|merge({'class': (attr.class|default('') ~ ' form-control')|trim}) %}
|
||||
{{ parent() }}
|
||||
{%- endblock choice_widget_collapsed %}
|
||||
|
||||
{% block choice_widget %}
|
||||
{% if expanded %}
|
||||
<ul {{ block('widget_container_attributes') }} style="list-style: none; padding-left: 0">
|
||||
{% for child in form %}
|
||||
<li>
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{{ parent() }}
|
||||
{% endif %}
|
||||
{% endblock choice_widget %}
|
||||
|
||||
{% block checkbox_widget %}
|
||||
<label for="{{ id }}">
|
||||
<input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
|
||||
{{ label|trans({}, translation_domain) }}</label>
|
||||
{% endblock checkbox_widget %}
|
||||
|
||||
{% block radio_widget %}
|
||||
<label for="{{ id }}">
|
||||
<input type="radio" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
|
||||
{{ label|trans({}, translation_domain) }}
|
||||
</label>
|
||||
{% endblock radio_widget %}
|
||||
|
||||
{# Inline date marcro #}
|
||||
{% macro date_form_widget(form) %}
|
||||
<div class="col col-xs-4">
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{# Inline date #}
|
||||
{% block date_widget %}
|
||||
{% if widget == 'single_text' %}
|
||||
{{ block('form_widget_simple') }}
|
||||
{% else %}
|
||||
{% import _self as self %}
|
||||
<div class="row">
|
||||
{{ date_pattern|replace({
|
||||
'{{ year }}': self.date_form_widget(form.year),
|
||||
'{{ month }}': self.date_form_widget(form.month),
|
||||
'{{ day }}': self.date_form_widget(form.day),
|
||||
})|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock date_widget %}
|
||||
|
||||
{# Inline date_time
|
||||
{% block time_widget %}
|
||||
{% if widget == 'single_text' %}
|
||||
{{ block('form_widget_simple') }}
|
||||
{% else %}
|
||||
{% import _self as self %}
|
||||
<div class="row">
|
||||
{{ time_pattern|replace({
|
||||
'{{ hour }}': self.date_form_widget(form.hour),
|
||||
'{{ minute }}': self.date_form_widget(form.minute),
|
||||
})|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock time_widget %}
|
||||
#}
|
||||
|
||||
{% block file_widget %}
|
||||
{% set type = type|default('file') %}
|
||||
<input type="{{ type }}" {{ block('widget_attributes') }} />
|
||||
{% endblock file_widget %}
|
64
templates/Group/edit.html.twig
Executable file
64
templates/Group/edit.html.twig
Executable file
@ -0,0 +1,64 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification GROUPE
|
||||
{% elseif mode=="submit" %}
|
||||
Création GROUPE
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_group') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_group_delete',{'id':group.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="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.users) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#group_name").focus();
|
||||
});
|
||||
{% endblock %}
|
61
templates/Group/list.html.twig
Normal file
61
templates/Group/list.html.twig
Normal file
@ -0,0 +1,61 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
GROUPES
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_group_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Groupes
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th>Nom</th>
|
||||
<th>Source</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for group in groups %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if not group.ldapfilter and not group.idexternal %}
|
||||
<a href="{{path("app_group_update",{id:group.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{group.name}}</td>
|
||||
<td>
|
||||
{% if group.ldapfilter %}
|
||||
LDAP
|
||||
{% elseif group.idexternal %}
|
||||
Ninegate
|
||||
{% else %}
|
||||
Interne
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
4
templates/Home/admin.html.twig
Normal file
4
templates/Home/admin.html.twig
Normal file
@ -0,0 +1,4 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
{% endblock %}
|
32
templates/Home/casdebug.html.twig
Normal file
32
templates/Home/casdebug.html.twig
Normal file
@ -0,0 +1,32 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
{% if wssuse and app.user %}
|
||||
{{ render(path("app_wss_sample")) }}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="card mt-5">
|
||||
<div class="card-header">
|
||||
<h2>Atttribut SSO</h2>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% for key, attribute in attributes %}
|
||||
{% if attribute is iterable %}
|
||||
{% for value in attribute %}
|
||||
<strong>{{ key }}</strong> = {{ value }}<br>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<strong>{{ key }}</strong> = {{ attribute }}<br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
29
templates/Home/home.html.twig
Normal file
29
templates/Home/home.html.twig
Normal file
@ -0,0 +1,29 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% if app.user %}
|
||||
<div class="container">
|
||||
<div class="card mt-5">
|
||||
<div class="card-header">
|
||||
<h2>GITEA USER</h2>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% for key, attribute in app.session.get("giteauser") %}
|
||||
{% if attribute is iterable %}
|
||||
{% for value in attribute %}
|
||||
<strong>{{ key }}</strong> = {{ value }}<br>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<strong>{{ key }}</strong> = {{ attribute }}<br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
39
templates/Home/login.html.twig
Executable file
39
templates/Home/login.html.twig
Executable file
@ -0,0 +1,39 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
label {
|
||||
color: var(--colorftbodylight);
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div style="text-align:center">
|
||||
<img src="{{ asset("uploads/logo/"~app.session.get('logodark')) }}" style="height:120px;margin-top:10px;">
|
||||
<h1 style="border:none">{{appName}}</h1>
|
||||
<form action="{{ path('app_login') }}" method="post">
|
||||
<div class="card homecard" style="width:400px; margin:auto">
|
||||
<div class="card-body">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||
{% endif %}
|
||||
|
||||
<label for="username">Login</label>
|
||||
<input type="text" id="username" name="_username" value="{{ last_username }}" class="form-control" style="margin-bottom:15px;" />
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="_password" class="form-control" style="margin-bottom:15px;" />
|
||||
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
||||
|
||||
<input type="submit" name="login" class="btn btn-success form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#username").focus();
|
||||
});
|
||||
{% endblock %}
|
9
templates/Home/mail.html.twig
Normal file
9
templates/Home/mail.html.twig
Normal file
@ -0,0 +1,9 @@
|
||||
{% block subject %}
|
||||
{{ subject }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% autoescape %}
|
||||
<p>{{ body|raw }}</p>
|
||||
{% endautoescape %}
|
||||
{% endblock %}
|
53
templates/Include/javascript.js.twig
Normal file
53
templates/Include/javascript.js.twig
Normal file
@ -0,0 +1,53 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$(".pick-a-color").spectrum(
|
||||
{
|
||||
type: "text",
|
||||
showAlpha: false
|
||||
}
|
||||
);
|
||||
|
||||
$(".pick-a-color").attr("autocomplete","off");
|
||||
|
||||
var doit = true;
|
||||
|
||||
$("a[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
doit = confirm($(this).data('confirm'));
|
||||
if(!doit) return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("button[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
doit = confirm($(this).data('confirm'));
|
||||
if(!doit) return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function ModalLoad(idmodal,title,path) {
|
||||
$("#"+idmodal+" .modal-header h4").text(title);
|
||||
$("#"+idmodal+" iframe").attr("src",path);
|
||||
$("#"+idmodal).modal("show");
|
||||
}
|
||||
|
||||
{% if wssuse %}
|
||||
function subscribe(channeltype,channelkey,userkey) {
|
||||
console.log("== SUBSCRIBE "+channeltype+"-"+channelkey+" with userkey "+userkey);
|
||||
conn.send(JSON.stringify({
|
||||
command: "subscribe",
|
||||
log: "",
|
||||
channel: channeltype+"-"+channelkey,
|
||||
channeltype: channeltype,
|
||||
channelkey: channelkey,
|
||||
userkey: userkey
|
||||
}));
|
||||
}
|
||||
|
||||
function sendMessage(msg) {
|
||||
json=JSON.stringify(msg);
|
||||
console.log("== SEND MSG = "+json);
|
||||
conn.send(json);
|
||||
}
|
||||
{% endif %}
|
49
templates/Include/sidebar.html.twig
Normal file
49
templates/Include/sidebar.html.twig
Normal file
@ -0,0 +1,49 @@
|
||||
<div id="sidebar" class="collapse">
|
||||
<ul class="nav">
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<br>
|
||||
<li class="title">Configuration</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_config")}}">
|
||||
<i class="fa fa-cog"></i>Générale
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_theme")}}">
|
||||
<i class="fa fa-paint-brush"></i>Thème
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="title">Organisation</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_user")}}">
|
||||
<i class="fa fa-user"></i>Utilisateurs
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_group")}}">
|
||||
<i class="fa fa-users"></i>Groupes
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if appCron %}
|
||||
<li class="title">Outils</li>
|
||||
<li>
|
||||
<a href="{{path("app_cron")}}">
|
||||
<i class="fa fa-cogs"></i>Jobs
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_cron_log")}}">
|
||||
<i class="fa fa-list-alt"></i>Logs / Dump
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
186
templates/Include/style.css.twig
Normal file
186
templates/Include/style.css.twig
Normal file
@ -0,0 +1,186 @@
|
||||
:root{
|
||||
--colorbgbodylight: {{ app.session.get('colorbgbodylight')|raw }};
|
||||
--colorbgbodydark: {{ app.session.get('colorbgbodydark')|raw }};
|
||||
--colorfttitlelight: {{ app.session.get('colorfttitlelight')|raw }};
|
||||
--colorfttitledark: {{ app.session.get('colorfttitledark')|raw }};
|
||||
--colorftbodylight: {{ app.session.get('colorftbodylight')|raw }};
|
||||
--colorftbodydark: {{ app.session.get('colorftbodydark')|raw }};
|
||||
--fontbody: "{{ app.session.get('fontbody')|raw }}";
|
||||
--fonttitle: "{{ app.session.get('fonttitle')|raw }}";
|
||||
--fontsizeh1: {{ app.session.get('fontsizeh1')~"px"|raw }};
|
||||
--fontsizeh2: {{ app.session.get('fontsizeh2')~"px"|raw }};
|
||||
--fontsizeh3: {{ app.session.get('fontsizeh3')~"px"|raw }};
|
||||
--fontsizeh4: {{ app.session.get('fontsizeh4')~"px"|raw }};
|
||||
|
||||
--colorbgbodylight-darker: {{ app.session.get('colorbgbodylight-darker')|raw }};
|
||||
--colorbgbodydark-darker: {{ app.session.get('colorbgbodydark-darker')|raw }};
|
||||
--colorfttitlelight-darker: {{ app.session.get('colorfttitlelight-darker')|raw }};
|
||||
}
|
||||
|
||||
/* COLOR BODY */
|
||||
|
||||
body {
|
||||
background-color: var(--colorbgbodylight);
|
||||
color: var(--colorftbodylight);
|
||||
}
|
||||
|
||||
body .navbar.bg-dark {
|
||||
background-color: var(--colorbgbodydark)!important;
|
||||
}
|
||||
|
||||
body #sidebar {
|
||||
background-color: var(--colorbgbodydark);
|
||||
}
|
||||
|
||||
body #sidebar .title {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body #sidebar .nav a {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body #sidebar .nav .last {
|
||||
border-color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body h1, body h2, body h3, body .modal-header h4 {
|
||||
color: var(--colorfttitlelight);
|
||||
}
|
||||
|
||||
body a, body .btn-link {
|
||||
color: var(--colorfttitlelight);
|
||||
}
|
||||
|
||||
body a:hover, body .btn-link:hover {
|
||||
color: var(--colorfttitlelight-darker);
|
||||
}
|
||||
|
||||
body .nav a{
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body .table {
|
||||
color: var(--colorftbodylight);
|
||||
}
|
||||
|
||||
body .card {
|
||||
background-color: var(--colorbgbodylight);
|
||||
}
|
||||
|
||||
body .card-header {
|
||||
background-color: var(--colorbgbodylight-darker);
|
||||
color: var(--colorfttitlelight);
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
body .card-header .custom-control {
|
||||
color: var(--colorftbodylight);
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
body .page-item.active .page-link,
|
||||
body .page-item.active .page-link:hover {
|
||||
background-color: var(--colorfttitlelight);
|
||||
border-color: var(--colorfttitlelight);
|
||||
}
|
||||
|
||||
body .btn-primary {
|
||||
background-color: var(--colorbgbodydark);
|
||||
border-color: var(--colorbgbodydark);
|
||||
}
|
||||
body .btn-primary:hover {
|
||||
background-color: var(--colorbgbodydark-darker);
|
||||
border-color: var(--colorbgbodydark-darker);
|
||||
}
|
||||
|
||||
body .modal-title {
|
||||
|
||||
}
|
||||
|
||||
/* COLOR BODY HOME */
|
||||
|
||||
body.monocolor {
|
||||
background-color: var(--colorbgbodydark);
|
||||
color: var(--colorftbodydark);
|
||||
}
|
||||
|
||||
body.monocolor .navbar.bg-dark {
|
||||
background-color: var(--colorbgbodydark)!important;
|
||||
}
|
||||
|
||||
body.monocolor #sidebar {
|
||||
background-color: var(--colorbgbodydark);
|
||||
}
|
||||
|
||||
body.monocolor #sidebar .title {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor #sidebar .nav a {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor h1, body.monocolor h2, body.monocolor h3, body.monocolor .modal-header h4 {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor a, body.monocolor .btn-link {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor .nav a{
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor .card {
|
||||
background-color: var(--colorbgbodydark);
|
||||
}
|
||||
|
||||
body.monocolor .card-header {
|
||||
background-color: var(--colorbgbodydark);
|
||||
color: var(--colorfttitledark);
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
body.monocolor .card-header .custom-control {
|
||||
color: var(--colorftbodydark);
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
body.monocolor .btn-primary {
|
||||
background-color: var(--colorbgbodylight);
|
||||
border-color: var(--colorbgbodylight);
|
||||
}
|
||||
body.monocolor .btn-primary:hover {
|
||||
background-color: var(--colorbgbodylight-darker);
|
||||
border-color: var(--colorbgbodylight-darker);
|
||||
}
|
||||
|
||||
/* FONT */
|
||||
body {
|
||||
font-family: var(--fontbody);
|
||||
}
|
||||
|
||||
h1,h2,h3, .navbar-brand, .card-header, .modal-header h4 {
|
||||
font-family: var(--fonttitle);
|
||||
}
|
||||
|
||||
h1 { font-size: var(--fontsizeh1); }
|
||||
h2 { font-size: var(--fontsizeh2); }
|
||||
h3 { font-size: var(--fontsizeh3); }
|
||||
h4 { font-size: var(--fontsizeh4); }
|
||||
|
||||
.card-header .custom-control {
|
||||
font-family: var(--fontbody);
|
||||
}
|
||||
|
||||
{% if not useheader is defined or not useheader %}
|
||||
#main {
|
||||
padding:0px;
|
||||
}
|
||||
{% else %}
|
||||
#main {
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
{%endif%}
|
897
templates/Issue/list.html.twig
Normal file
897
templates/Issue/list.html.twig
Normal file
@ -0,0 +1,897 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
#main {
|
||||
padding-left:0px;
|
||||
margin-bottom:0px;
|
||||
}
|
||||
#mycontent { display:none }
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
{% 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 TICKET</label>
|
||||
<input type="number" id="filterticket" class=" form-control">
|
||||
</div>
|
||||
|
||||
{% if id == 0 %}
|
||||
<div style="width:100%" class="mt-3">
|
||||
<label class="control-label" style="color:var(--colorftbodydark)">Filtre CATEGORIES</label>
|
||||
<select id="filtercategorys" multiple="multiple" class="form-control">
|
||||
{% for giteacategory in giteacategorys %}
|
||||
<option value="{{giteacategory}}">{{giteacategory}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div style="width:100%" class="mt-3">
|
||||
<label class="control-label" style="color:var(--colorftbodydark)">Filtre PROJETS</label>
|
||||
<select id="filterrepos" multiple="multiple" class="form-control">
|
||||
{% for gitearepo in gitearepos %}
|
||||
<option value="{{gitearepo.id}}">{{gitearepo.full_name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<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 %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div style="width:100%" class="mt-3">
|
||||
<label class="control-label" style="color:var(--colorftbodydark)">Filtre STATUTS</label>
|
||||
<select id="filtercolumns" multiple="multiple" class="form-control">
|
||||
{% for giteacolumn in giteacolumns %}
|
||||
<option value="{{giteacolumn}}">{{giteacolumn}}</option>
|
||||
{% endfor %}
|
||||
</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 giteatype in giteatypes %}
|
||||
<option value="{{giteatype}}">{{giteatype}}</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 giteateam in giteateams %}
|
||||
<option value="{{giteateam}}">{{giteateam}}</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 giteapriority in giteaprioritys %}
|
||||
<option value="{{giteapriority}}">{{giteapriority}}</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 %}
|
||||
{% if gitealabel not in giteacolumns and gitealabel not in giteateams and gitealabel not in giteaprioritys and gitealabel not in giteatypes %}
|
||||
<option value="{{gitealabel}}">{{gitealabel}}</option>
|
||||
{% endif %}
|
||||
{% 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.username}}">{{giteaassignee.username}}</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 %}
|
||||
{% if gitealabel not in giteacolumns and gitealabel not in giteateams and gitealabel not in giteaprioritys and gitealabel not in giteatypes %}
|
||||
<option value="{{gitealabel}}">{{gitealabel}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pl-3" style="width:100%;">
|
||||
<div class="mt-4 mb-3" style="zoom:80%">
|
||||
<button class="btn btn-success" onClick="showFilters()"><i class="fas fa-filter"></i></button>
|
||||
{% if id!=0 %}
|
||||
<a class="btn btn-success" href="{{path('app_scrum_view',{id:id})}}"><i class="fas fa-columns"></i></a>
|
||||
<a class="btn btn-success" href="{{path('app_scrum_stat',{id:id})}}"><i class="fas fa-chart-area"></i></a>
|
||||
{% endif %}
|
||||
<span id="textfilters"></span>
|
||||
<a class="btn btn-success float-right" href="{{path('app_issuescrum',{id:id,'fgcsv':true})}}">Export CSV</a>
|
||||
|
||||
</div>
|
||||
|
||||
<table class="mt-4 table table-striped table-bordered table-hover" id="dataTables" style="width:100%; zoom:80%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="no-sort"></th>
|
||||
{%if id==0 %}<th style="width:100px">Projet</th>{%endif%}
|
||||
<th style="width:200px">Jalon</th>
|
||||
<th style="width:200px">Type</th>
|
||||
<th style="width:70px"class="no-string">N°</th>
|
||||
<th style="width:1000px">Titre</th>
|
||||
<th style="width:200px">Equipe</th>
|
||||
<th style="width:250px">Priorité</th>
|
||||
<th style="width:70px">Poid</th>
|
||||
<th style="width:135px">Affecté à</th>
|
||||
<th style="width:135px">Statut</th>
|
||||
<th style="width:300px">Etiquettes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for gitearepo in gitearepos %}
|
||||
{% for giteaissue in gitearepo.issues %}
|
||||
{% set tosee=false %}
|
||||
{% if app.session.get('viewclosed')=="true" and giteaissue.state=="closed" %}
|
||||
{% set tosee=true %}
|
||||
{% endif %}
|
||||
{% if giteaissue.state!="closed" %}
|
||||
{% set tosee=true %}
|
||||
{% endif %}
|
||||
{% if not giteaissue.pull_request is null %}
|
||||
{% set tosee=false %}
|
||||
{% endif %}
|
||||
|
||||
{% if tosee %}
|
||||
{% set dataticket = giteaissue.number %}
|
||||
{% set datarepo = gitearepo.id %}
|
||||
|
||||
{% if giteaissue.milestone %}
|
||||
{% set datamilestone = giteaissue.milestone.id %}
|
||||
{%else%}
|
||||
{% set datamilestone = gitearepo.full_name %}
|
||||
{%endif%}
|
||||
|
||||
{% set statut = "Backlog" %}
|
||||
{% set teams = "" %}
|
||||
{% set types = "" %}
|
||||
{% set datateams = "" %}
|
||||
{% set datatypes = "" %}
|
||||
{% set prioritys = '<span class="btn-link tag mr-1" style="background-color:#70c24a"><i class="fas fa-tag"></i>'~giteaprioritys|last~'</span>' %}
|
||||
{% set dataprioritys = ','~giteaprioritys|last %}
|
||||
{% set labels = "" %}
|
||||
{% set datalabels = "" %}
|
||||
{% for label in giteaissue.labels %}
|
||||
{% if label.id in gitearepo.columns %}
|
||||
{% set statut= label.name %}
|
||||
{% elseif label.name in giteatypes %}
|
||||
{% set types='<span class="btn-link tag mr-1" style="background-color:#'~label.color~'"><i class="fas fa-tag"></i>'~label.name~'</span>' %}
|
||||
{% set datatypes=','~label.name %}
|
||||
{% elseif label.name in giteateams %}
|
||||
{% set teams=teams~'<span class="btn-link tag mr-1" style="background-color:#'~label.color~'"><i class="fas fa-tag"></i>'~label.name~'</span>' %}
|
||||
{% set datateams=datateams~','~label.name %}
|
||||
{% elseif label.name in giteaprioritys %}
|
||||
{% set prioritys='<span class="btn-link tag mr-1" style="background-color:#'~label.color~'"><i class="fas fa-tag"></i>'~label.name~'</span>' %}
|
||||
{% set dataprioritys=','~label.name %}
|
||||
{% else %}
|
||||
{% set labels=labels~'<span class="btn-link tag mr-1" style="background-color:#'~label.color~'"><i class="fas fa-tag"></i>'~label.name~'</span>' %}
|
||||
{% set datalabels=datalabels~','~label.name %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% set dataassignees="" %}
|
||||
{% for assignee in giteaissue.assignees %}
|
||||
{% set dataassignees=dataassignees~','~assignee.username %}
|
||||
{% endfor %}
|
||||
|
||||
<tr data-category="{{gitearepo.category}}" data-repo="{{datarepo}}" data-milestone="{{datamilestone}}" data-ticket="{{dataticket}}" data-column="{{statut}}" data-teams="{{datateams}}" data-prioritys="{{dataprioritys}}" data-types="{{datatypes}}" data-labels="{{datalabels}}" data-assignees="{{dataassignees}}">
|
||||
<td>
|
||||
<a target="_blank" class="btn btn-link fa fa-file" href="{{giteaissue.html_url}}"></a>
|
||||
</td>
|
||||
{%if id==0 %}<td>{{ gitearepo.full_name }}</td>{%endif%}
|
||||
<td>{% if giteaissue.milestone %}{{ giteaissue.milestone.title }} {%endif%}</td>
|
||||
<td>{{ types|raw }}</td>
|
||||
<td>{{ giteaissue.number }}</td>
|
||||
<td>
|
||||
<a target="_blank" href="{{giteaissue.html_url}}">
|
||||
{% if giteaissue.state=="closed" %}CLOS LE = {{ giteaissue.closed_at|date("d/m/y") }}<br>{% endif %}
|
||||
{{ giteaissue.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ teams|raw }}</td>
|
||||
<td>{{ prioritys|raw }}</td>
|
||||
|
||||
<td>
|
||||
<div id="modissu{{ giteaissue.issueid }}" data-issue="{{ giteaissue.issueid }}" data-giteaid="{{giteaissue.number}}" data-giteatitle="{{ giteaissue.title }}" type="button" class="modissu btn btn-link">
|
||||
<i class="fas fa-weight-hanging"></i> = <span id="issue{{giteaissue.issueid}}-weight">{{ giteaissue.weight }}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{% set dataorder="" %}
|
||||
{% for assignee in giteaissue.assignees %}
|
||||
{% set dataorder=dataorder~assignee.username %}
|
||||
{% endfor %}
|
||||
|
||||
<td data-order="{{dataorder}}">
|
||||
{% for assignee in giteaissue.assignees %}
|
||||
<img src="{{assignee.avatar_url}}" class="assignee" title="{{assignee.username}}">
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{ statut }}</td>
|
||||
<td>{{ labels|raw }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</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 %}
|
||||
var table;
|
||||
|
||||
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:{{id}},
|
||||
value: toshow
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showhide() {
|
||||
textfilters="";
|
||||
ticketfilter=$("#filterticket").val();
|
||||
categoryfilters=$("#filtercategorys").val();
|
||||
repofilters=$("#filterrepos").val();
|
||||
milestonefilters=$("#filtermilestones").val();
|
||||
columnfilters=$("#filtercolumns").val();
|
||||
teamfilters=$("#filterteams").val();
|
||||
priorityfilters=$("#filterprioritys").val();
|
||||
typefilters=$("#filtertypes").val();
|
||||
labelfilters=$("#filterlabels").val();
|
||||
assigneefilters=$("#filterassignees").val();
|
||||
excludefilters=$("#filterexcludes").val();
|
||||
|
||||
$.fn.dataTable.ext.search.push(function(settings, data, dataIndex, rowObj, counter) {
|
||||
el=table.row(dataIndex).nodes().to$();
|
||||
|
||||
{% if id == 0 %}
|
||||
category = $(el).data('category');
|
||||
repo = $(el).data('repo');
|
||||
{% endif %}
|
||||
ticket= $(el).data('ticket');
|
||||
milestone = $(el).data('milestone');
|
||||
column = $(el).data('column');
|
||||
teams = $(el).data('teams').split(',');
|
||||
prioritys = $(el).data('prioritys').split(',');
|
||||
types = $(el).data('types').split(',');
|
||||
labels = $(el).data('labels').split(',');
|
||||
assignees = $(el).data('assignees').split(',');
|
||||
|
||||
toreturn=true;
|
||||
|
||||
{% if id == 0 %}
|
||||
if(categoryfilters.length!==0 && jQuery.inArray(category.toString(), categoryfilters )<0) {
|
||||
toreturn=false;
|
||||
}
|
||||
if(categoryfilters.length!==0) {
|
||||
textfilters=textfilters+" CATEGORIES =";
|
||||
$.each(categoryfilters, function( index, value ) {
|
||||
textfilters=textfilters+" "+value;
|
||||
});
|
||||
}
|
||||
|
||||
if(repofilters.length!==0 && jQuery.inArray(repo.toString(), repofilters )<0) {
|
||||
toreturn=false;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
if(ticketfilter.length!==0 && ticket.toString()!=ticketfilter) {
|
||||
toreturn=false;
|
||||
}
|
||||
|
||||
if(milestonefilters.length!==0 && jQuery.inArray(milestone.toString(), milestonefilters )<0) {
|
||||
toreturn=false;
|
||||
}
|
||||
|
||||
if(columnfilters.length!==0 && jQuery.inArray(column.toString(), columnfilters )<0) {
|
||||
toreturn=false;
|
||||
}
|
||||
|
||||
if(excludefilters.length!==0) {
|
||||
$.each(excludefilters, function( index, value ) {
|
||||
if(jQuery.inArray(value, labels )>0) {
|
||||
toreturn=false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(toreturn&&(teamfilters.length!==0||priorityfilters.length!==0||typefilters.length!==0||labelfilters.length!==0||assigneefilters.length!==0)) {
|
||||
if(labelfilters.length!==0) {
|
||||
toreturn=false;
|
||||
$.each(labelfilters, function( index, value ) {
|
||||
if(jQuery.inArray(value, labels )>0) {
|
||||
toreturn=true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(teamfilters.length!==0&&toreturn) {
|
||||
toreturn=false;
|
||||
$.each(teamfilters, function( index, value ) {
|
||||
if(jQuery.inArray(value, teams )>0) {
|
||||
toreturn=true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(priorityfilters.length!==0&&toreturn) {
|
||||
toreturn=false;
|
||||
$.each(priorityfilters, function( index, value ) {
|
||||
if(jQuery.inArray(value, prioritys )>0) {
|
||||
toreturn=true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(typefilters.length!==0&&toreturn) {
|
||||
toreturn=false;
|
||||
$.each(typefilters, function( index, value ) {
|
||||
if(jQuery.inArray(value, types )>0) {
|
||||
toreturn=true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(assigneefilters.length!==0&&toreturn) {
|
||||
toreturn=false;
|
||||
$.each(assigneefilters, function( index, value ) {
|
||||
if(jQuery.inArray(value, assignees )>0) {
|
||||
toreturn=true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return toreturn;
|
||||
});
|
||||
|
||||
if(ticketfilter.length!==0) {
|
||||
textfilters=textfilters+" <b>TICKET</b> ="+ticketfilter;
|
||||
}
|
||||
|
||||
{% if id == 0 %}
|
||||
if(categoryfilters.length!==0) {
|
||||
data = $("#filtercategorys").select2('data');
|
||||
textfilters=textfilters+" <b>CATEGORIES</b> =";
|
||||
$.each(categoryfilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
if(repofilters.length!==0) {
|
||||
data = $("#filterrepos").select2('data');
|
||||
textfilters=textfilters+" <b>PROJETS</b> =";
|
||||
$.each(repofilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
if(milestonefilters.length!==0) {
|
||||
data = $("#filtermilestones").select2('data');
|
||||
textfilters=textfilters+" <b>JALONS</b> =";
|
||||
$.each(milestonefilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
if(columnfilters.length!==0) {
|
||||
data = $("#filtercolumns").select2('data');
|
||||
textfilters=textfilters+" <b>STATUS</b> =";
|
||||
$.each(columnfilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
if(teamfilters.length!==0) {
|
||||
data = $("#filterteams").select2('data');
|
||||
textfilters=textfilters+" <b>EQUIPES</b> =";
|
||||
$.each(teamfilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
if(priorityfilters.length!==0) {
|
||||
data = $("#filterprioritys").select2('data');
|
||||
textfilters=textfilters+" <b>EQUIPES</b> =";
|
||||
$.each(priorityfilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
if(typefilters.length!==0) {
|
||||
data = $("#filtertypes").select2('data');
|
||||
textfilters=textfilters+" <b>EQUIPES</b> =";
|
||||
$.each(typefilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
if(labelfilters.length!==0) {
|
||||
data = $("#filterlabels").select2('data');
|
||||
textfilters=textfilters+" <b>ETIQUETTES</b> =";
|
||||
$.each(labelfilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
if(assigneefilters.length!==0) {
|
||||
data = $("#filterassignees").select2('data');
|
||||
textfilters=textfilters+" <b>AFFECTATIONS</b> =";
|
||||
$.each(assigneefilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if(excludefilters.length!==0) {
|
||||
data = $("#filterexcludes").select2('data');
|
||||
textfilters=textfilters+" <b>EXCLURE ETIQUETTES</b> =";
|
||||
$.each(excludefilters, function( index, value ) {
|
||||
if(index>0)textfilters=textfilters+" &";
|
||||
textfilters=textfilters+" "+data[index].text;
|
||||
});
|
||||
}
|
||||
|
||||
$("#textfilters").html(textfilters);
|
||||
|
||||
table.draw();
|
||||
}
|
||||
|
||||
{% if id == 0 %}
|
||||
function filtercategorys() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filtercategorys',
|
||||
id:{{id}},
|
||||
value: $("#filtercategorys").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filterrepos() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filterrepos',
|
||||
id:{{id}},
|
||||
value: $("#filterrepos").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
function filtermilestones() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filtermilestones',
|
||||
id:{{id}},
|
||||
value: $("#filtermilestones").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filtercolumns() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filtercolumns',
|
||||
id:{{id}},
|
||||
value: $("#filtercolumns").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filterteams() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filterteams',
|
||||
id:{{id}},
|
||||
value: $("#filterteams").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filterprioritys() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filterprioritys',
|
||||
id:{{id}},
|
||||
value: $("#filterprioritys").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filtertypes() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filtertypes',
|
||||
id:{{id}},
|
||||
value: $("#filtertypes").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filterlabels() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filterlabels',
|
||||
id:{{id}},
|
||||
value: $("#filterlabels").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filterassignees() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filterassignees',
|
||||
id:{{id}},
|
||||
value: $("#filterassignees").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filterexcludes() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filterexcludes',
|
||||
id:{{id}},
|
||||
value: $("#filterexcludes").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function refreshinfo() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{path("app_scrum_info",{id: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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
{% if id== 0 %}
|
||||
$('#filtercategorys').select2();
|
||||
{% if filtercategorys %}
|
||||
{% for category in filtercategorys %}
|
||||
$("#filtercategorys").val($("#filtercategorys").val().concat("{{category}}"));
|
||||
{%endfor%}
|
||||
$('#filtercategorys').trigger('change');
|
||||
{% endif %}
|
||||
$('#filtercategorys').on("select2:select", function(e) {
|
||||
filtercategorys();
|
||||
});
|
||||
$('#filtercategorys').on("select2:unselect", function(e) {
|
||||
filtercategorys();
|
||||
});
|
||||
|
||||
$('#filterrepos').select2();
|
||||
{% if filterrepos %}
|
||||
{% for repo in filterrepos %}
|
||||
$("#filterrepos").val($("#filterrepos").val().concat("{{repo}}"));
|
||||
{%endfor%}
|
||||
$('#filterrepos').trigger('change');
|
||||
{% endif %}
|
||||
$('#filterrepos').on("select2:select", function(e) {
|
||||
filterrepos();
|
||||
});
|
||||
$('#filterrepos').on("select2:unselect", function(e) {
|
||||
filterrepos();
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
$("#filterticket").on("keyup", function() {
|
||||
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();
|
||||
});
|
||||
|
||||
$('#filtercolumns').select2();
|
||||
{% if filtercolumns %}
|
||||
{% for column in filtercolumns %}
|
||||
$("#filtercolumns").val($("#filtercolumns").val().concat("{{column}}"));
|
||||
{%endfor%}
|
||||
$('#filtercolumns').trigger('change');
|
||||
{% endif %}
|
||||
$('#filtercolumns').on("select2:select", function(e) {
|
||||
filtercolumns();
|
||||
});
|
||||
$('#filtercolumns').on("select2:unselect", function(e) {
|
||||
filtercolumns();
|
||||
});
|
||||
|
||||
$('#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();
|
||||
});
|
||||
|
||||
$('#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();
|
||||
});
|
||||
|
||||
$('#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();
|
||||
});
|
||||
|
||||
$('#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();
|
||||
});
|
||||
|
||||
$('#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();
|
||||
});
|
||||
|
||||
$('#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();
|
||||
});
|
||||
|
||||
table = $('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]],
|
||||
});
|
||||
|
||||
{% if not showfilters %}
|
||||
$("#filters").addClass("d-none");
|
||||
$("#filters").removeClass("d-flex");
|
||||
{% endif %}
|
||||
|
||||
showhide();
|
||||
|
||||
$("#mycontent").show();
|
||||
});
|
||||
{% endblock %}
|
66
templates/Report/csv.html.twig
Normal file
66
templates/Report/csv.html.twig
Normal file
@ -0,0 +1,66 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
body {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.issuetitle {
|
||||
margin-top:100px;
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
.issuediv {
|
||||
zoom:60%;
|
||||
}
|
||||
|
||||
.issuecontent {
|
||||
width:80%;
|
||||
}
|
||||
.issuedetail {
|
||||
width:20%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<h1>{{repo.full_name}}</h1>
|
||||
<table class="mt-4 table table-striped table-bordered table-hover" id="dataTables" style="width:100%; zoom:80%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>titre</th>
|
||||
<th>submit</th>
|
||||
<th>clos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for issue in issues %}
|
||||
<tr>
|
||||
<td>{{issue.number}}</td>
|
||||
<td>{{issue.title}}</td>
|
||||
<td>{{issue.created_at|date("d/m/Y H:i")}}</td>
|
||||
<td>{{ (issue.closed_at ? issue.closed_at|date("d/m/Y H:i") : "") }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable( {
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
{% endblock %}
|
||||
|
153
templates/Report/list.html.twig
Normal file
153
templates/Report/list.html.twig
Normal file
@ -0,0 +1,153 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
body {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.issuetitle {
|
||||
margin-top:100px;
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
.issuediv {
|
||||
zoom:60%;
|
||||
}
|
||||
|
||||
.issuecontent {
|
||||
width:80%;
|
||||
}
|
||||
.issuedetail {
|
||||
width:20%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<h1>{{repo.full_name}}</h1>
|
||||
{% for issue in issues %}
|
||||
<h2 id='issuetitle{{issue.number}}' class='issuetitle'>#{{issue.number}} = {{issue.title}}</h2>
|
||||
|
||||
<div id='issuediv{{issue.number}}' class='issuediv d-flex'>";
|
||||
<div class='issuecontent'>
|
||||
<h3>{{issue.user.login}} le {{issue.created_at|date("d/m/Y H:i")}}</h3>
|
||||
<div class='card card-body'>
|
||||
{{issue.body|raw}}
|
||||
</div>
|
||||
|
||||
{% if issue.comments %}
|
||||
{% for comment in issue.comments %}
|
||||
<h3 class='mt-3'>{{comment.user.login}} le {{comment.created_at|date("d/m/Y H:i")}}</h3>
|
||||
<div class='card card-body'>
|
||||
{{comment.body|markdown_to_html}}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class='pl-3 issuedetail'>
|
||||
<h3>Statut</h3>
|
||||
<div class='card card-body mb-3'>
|
||||
{% if issue.closed_at %}
|
||||
Clos le {{issue.closed_at|date("d/m/Y H:i")}}
|
||||
{% else %}
|
||||
En Cours
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<h3>Jalon</h3>
|
||||
<div class='card card-body mb-3'>
|
||||
{% if issue.milestone %}
|
||||
{{ issue.milestone.title|raw }}
|
||||
{% else %}
|
||||
Backlog
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if issue.labels %}
|
||||
<h3>Labels</h3>
|
||||
<div class='card'>
|
||||
<div class='card-body mb-3'>
|
||||
{% for label in issue.labels %}
|
||||
<span class='badge mr-2 mb-2 p-2' style='background-color:#{{label.color}}'>{{label.name}}</span>
|
||||
{% endfor%}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if issue.timelines %}
|
||||
<h3>Historique</h3>
|
||||
<div class='card card-body mb-3'>
|
||||
|
||||
{% for timeline in issue.timelines %}
|
||||
{% if timeline.type!="comment" and timeline.type!="project" and timeline.type!="added_deadline" and timeline.type!="modified_deadline"%}
|
||||
<li><b>{{timeline.user.login}} le {{timeline.created_at|date("d/m/Y H:i")}}</b><br>
|
||||
|
||||
{% if timeline.type == "change_title" %}
|
||||
<div class='pl-4'>Modification titre de <i>{{timeline.old_title}}</i> à <i>{{timeline.new_title}}</i></div>
|
||||
|
||||
{% elseif timeline.type == "milestone" %}
|
||||
{% if timeline.milestone %}
|
||||
<div class='pl-4'>Affectation au Jalon <i>{{timeline.milestone.title}}</i></div>
|
||||
{% else %}
|
||||
<div class='pl-4'>Suppression du Jalon</div>
|
||||
{% endif %}
|
||||
|
||||
{% elseif timeline.type == "label" %}
|
||||
<div class='pl-4'>Affectation au Label <i>{{timeline.label.name}}</i></div>
|
||||
|
||||
{% elseif timeline.type == "comment_ref" or timeline.type == "pull_ref" or timeline.type == "issue_ref" %}
|
||||
<div class='pl-4'>Référencé le ticket <i>#{{timeline.ref_issue.number}} - {{timeline.ref_issue.title}}</i></div>
|
||||
|
||||
{% elseif timeline.type == "add_dependency" %}
|
||||
<div class='pl-4'>Ajouté dépendance au ticket <i>#{{timeline.dependent_issue.number}} - {{timeline.dependent_issue.title}}</i></div>
|
||||
|
||||
{% elseif timeline.type == "remove_dependency" %}
|
||||
<div class='pl-4'>Supprimé dépendance au ticket <i>#{{timeline.dependent_issue.number}} - {{timeline.dependent_issue.title}}</i></div>
|
||||
|
||||
{% elseif timeline.type == "pull_push" %}
|
||||
<div class='pl-4'>Ajout révision</i></div>
|
||||
|
||||
{% elseif timeline.type == "assignees" %}
|
||||
<div class='pl-4'>Affecté intervenant <i>{{timeline.assignee.login}}</i></div>
|
||||
|
||||
{% elseif timeline.type == "commit_ref" %}
|
||||
<div class='pl-4'>Référencé depuis révision <i>#{{timeline.body|raw}}</i></div>
|
||||
|
||||
{% elseif timeline.type == "merge_pull" %}
|
||||
<div class='pl-4'>Révision fusionnée</div>
|
||||
|
||||
{% elseif timeline.type == "delete_branch" %}
|
||||
<div class='pl-4'>Suppression branche {{timeline.old_ref|raw}}</div>
|
||||
|
||||
{% elseif timeline.type == "close" %}
|
||||
<div class='pl-4'>Clos <i>Fermeture du ticket</i></div>
|
||||
|
||||
{% elseif timeline.type == "review" %}
|
||||
<div class='pl-4'>Revue acceptée</div>
|
||||
|
||||
{% elseif timeline.type == "review_request" %}
|
||||
<div class='pl-4'>Demande de révision</div>
|
||||
|
||||
{% elseif timeline.type == "reopen" %}
|
||||
<div class='pl-4'>Réouverture du ticket</div>
|
||||
|
||||
{% else %}
|
||||
{{ dump(timeline) }}
|
||||
{%endif%}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
|
438
templates/Scrum/edit.html.twig
Executable file
438
templates/Scrum/edit.html.twig
Executable file
@ -0,0 +1,438 @@
|
||||
{% 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">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.category) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.giteaid) }}
|
||||
{{ form_row(form.users) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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) }}
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#scrum_giteaid").select2();
|
||||
$("#scrum_name").focus();
|
||||
{% if mode=="update" %}
|
||||
loadscrumcolumns();
|
||||
loadscrumteams();
|
||||
loadscrumprioritys();
|
||||
loadscrumtypes();
|
||||
{%endif%}
|
||||
});
|
||||
|
||||
{% if mode=="update" %}
|
||||
$("#addcolumn").click(function() {
|
||||
ModalLoad('mymodalcolumn','Ajouter une colonne','{{path('app_scrumcolumn_submit',{scrumid:scrum.id})}}');
|
||||
});
|
||||
|
||||
$('#scrumcolumns').on('click', '.modcolumn', function(event) {
|
||||
url="{{path('app_scrumcolumn_update',{id:'xxx'})}}";
|
||||
url=url.replace("xxx",$(this).data("id"));
|
||||
ModalLoad('mymodalcolumn','Modifier une colonne',url);
|
||||
});
|
||||
|
||||
$('#mymodalcolumn').on('hidden.bs.modal', function () {
|
||||
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
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$("#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
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
$("#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
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
$("#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();
|
||||
});
|
||||
|
||||
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
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
175
templates/Scrum/list.html.twig
Normal file
175
templates/Scrum/list.html.twig
Normal file
@ -0,0 +1,175 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="d-flex justify-content-start mt-3">
|
||||
|
||||
<div class="pr-2">
|
||||
{% if app.user and is_granted('ROLE_MASTER') %}
|
||||
<a class="btn btn-success btn-sm mt-2" href={{ path('app_scrum_submit') }}><i class="fa fa-plus mr-2"></i>Ajouter un Scrum</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div style="width:300px" class="pr-2">
|
||||
<label class="control-label">Filtre CATEGORIES</label>
|
||||
<select id="filtercategorys" multiple="multiple" class="form-control">
|
||||
{% for giteacategory in giteacategorys %}
|
||||
<option value="{{giteacategory}}">{{giteacategory}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div style="width:300px" class="pr-2">
|
||||
<label class="control-label">Filtre PROJETS</label>
|
||||
<select id="filterrepos" multiple="multiple" class="form-control">
|
||||
{% for gitearepo in gitearepos %}
|
||||
<option value="{{gitearepo.id}}">{{gitearepo.full_name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4" style="zoom:80%">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="no-sort"></th>
|
||||
<th style="width:100px">Catégorie</th>
|
||||
<th style="width:200px">Projet</th>
|
||||
<th>Description</th>
|
||||
<th style="width:100px" class="no-string">Tickets Ouvert</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for scrum in scrums %}
|
||||
<tr data-category="{{scrum.category}}" data-repo="{{scrum.giteaid}}">
|
||||
<td>
|
||||
<a href="{{path('app_scrum_view',{id:scrum.id})}}"><i class="fas fa-columns fa-2x mr-1"></i></a>
|
||||
<a href="{{path('app_issuescrum',{id:scrum.id})}}"><i class="fas fa-ticket-alt fa-2x mr-1"></i></a>
|
||||
<a href="{{path('app_scrum_stat',{id:scrum.id})}}"><i class="fas fa-chart-area fa-2x mr-1"></i></a>
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MODO') or is_granted('ROLE_MASTER') %}
|
||||
<a href="{{path('app_scrum_update',{id:scrum.id})}}"><i class="fas fa-file fa-2x"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{scrum.category}}
|
||||
</td>
|
||||
<td>
|
||||
{{scrum.name}}
|
||||
</td>
|
||||
<td>
|
||||
{{scrum.giteajson.description}}
|
||||
</td>
|
||||
<td>
|
||||
{{scrum.giteajson.open_issues_count}}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
var table;
|
||||
|
||||
function showhide() {
|
||||
categoryfilters=$("#filtercategorys").val();
|
||||
repofilters=$("#filterrepos").val();
|
||||
|
||||
$.fn.dataTable.ext.search.push(function(settings, data, dataIndex, rowObj, counter) {
|
||||
el=table.row(dataIndex).nodes().to$();
|
||||
|
||||
category = $(el).data('category');
|
||||
repo = $(el).data('repo');
|
||||
|
||||
toreturn=true;
|
||||
if(categoryfilters.length!==0 && jQuery.inArray(category.toString(), categoryfilters )<0) {
|
||||
toreturn=false;
|
||||
}
|
||||
|
||||
if(repofilters.length!==0 && jQuery.inArray(repo.toString(), repofilters )<0) {
|
||||
toreturn=false;
|
||||
}
|
||||
|
||||
|
||||
return toreturn;
|
||||
});
|
||||
|
||||
table.draw();
|
||||
//$.fn.dataTable.ext.search.pop();
|
||||
|
||||
}
|
||||
|
||||
function filtercategorys() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filtercategorys',
|
||||
id:0,
|
||||
value: $("#filtercategorys").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
function filterrepos() {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'filterrepos',
|
||||
id:0,
|
||||
value: $("#filterrepos").val()
|
||||
}
|
||||
});
|
||||
|
||||
showhide();
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#filtercategorys').select2();
|
||||
{% if filtercategorys %}
|
||||
{% for category in filtercategorys %}
|
||||
$("#filtercategorys").val($("#filtercategorys").val().concat("{{category}}"));
|
||||
{%endfor%}
|
||||
$('#filtercategorys').trigger('change');
|
||||
{% endif %}
|
||||
$('#filtercategorys').on("select2:select", function(e) {
|
||||
filtercategorys();
|
||||
});
|
||||
$('#filtercategorys').on("select2:unselect", function(e) {
|
||||
filtercategorys();
|
||||
});
|
||||
|
||||
$('#filterrepos').select2();
|
||||
{% if filterrepos %}
|
||||
{% for repo in filterrepos %}
|
||||
$("#filterrepos").val($("#filterrepos").val().concat("{{repo}}"));
|
||||
{%endfor%}
|
||||
$('#filterrepos').trigger('change');
|
||||
{% endif %}
|
||||
$('#filterrepos').on("select2:select", function(e) {
|
||||
filterrepos();
|
||||
});
|
||||
$('#filterrepos').on("select2:unselect", function(e) {
|
||||
filterrepos();
|
||||
});
|
||||
|
||||
table = $('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]],
|
||||
});
|
||||
|
||||
showhide();
|
||||
});
|
||||
{% endblock %}
|
284
templates/Scrum/stat.html.twig
Normal file
284
templates/Scrum/stat.html.twig
Normal file
@ -0,0 +1,284 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
#main {
|
||||
padding-left:0px;
|
||||
margin-bottom:0px;
|
||||
}
|
||||
#mycontent { display:none; }
|
||||
|
||||
.flot-chart {
|
||||
display: block;
|
||||
height: 450px;
|
||||
}
|
||||
.flot-chart-content {
|
||||
width: 400px;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.flot-chart-subcontent {
|
||||
height: 200px;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
{% 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 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>
|
||||
|
||||
<div class="pl-3" style="width:100%;">
|
||||
<div class="mt-4 mb-3" 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_view',{id:scrum.id})}}"><i class="fas fa-columns"></i></a>
|
||||
<a class="btn btn-success" href="{{path('app_issuescrum',{id:scrum.id})}}"><i class="fas fa-ticket-alt"></i></a>
|
||||
<span id="textfilters"></span>
|
||||
</div>
|
||||
|
||||
<h1>{{ scrum.name }}</h1>
|
||||
|
||||
<div class="d-flex flex-column mt-4">
|
||||
{% for milestone in tbstat %}
|
||||
<div class="flot-chart mr-4" data-milestone="{{ milestone.id }}">
|
||||
<h4>{{milestone.name}}</h4>
|
||||
<div class="mt-4">
|
||||
<div id="floatdonut{{ milestone.id }}" class="flot-chart-content" style="float:left"></div>
|
||||
<div class="mt-3 pb-3" style="width:100%">
|
||||
|
||||
<div class="d-flex justify-content-between mt-4">
|
||||
{% for column in milestone.stat %}
|
||||
<div style="width:250px">
|
||||
<div style="background-color:{{column.color}}; padding:3px;margin-bottom:3px;">{{ column.label }} = {{ column.total }}</div>
|
||||
<small>
|
||||
<div style="line-height:15px; width:100%">
|
||||
{% for label in column.labels %}
|
||||
<li >{{label.label}} = {{label.total}}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</small>
|
||||
</div>
|
||||
{%endfor%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</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();
|
||||
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
$("#textfilters").html(textfilters);
|
||||
}
|
||||
|
||||
// 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()
|
||||
}
|
||||
});
|
||||
|
||||
location.reload();
|
||||
}
|
||||
$('#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();
|
||||
});
|
||||
|
||||
{% for milestone in tbstat %}
|
||||
var data = [
|
||||
{% for data in milestone.stat %}
|
||||
{
|
||||
label: "{{ data.label}}",
|
||||
data: {{ data.total }},
|
||||
color: "{{ data.color }}",
|
||||
},
|
||||
{% endfor %}
|
||||
];
|
||||
|
||||
var plotObj = $.plot($("#floatdonut{{ milestone.id }}"), data, {
|
||||
series: {
|
||||
pie: {
|
||||
show: true,
|
||||
radius: 1,
|
||||
label: {
|
||||
show: true,
|
||||
radius: 1,
|
||||
threshold: 0.1,
|
||||
background: {
|
||||
opacity: 0.5,
|
||||
color: '#cdcdcd',
|
||||
},
|
||||
formatter: function(label, series) {
|
||||
return '<span style="color:#000; padding:3px;">' + label + '</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
});
|
||||
|
||||
{% for data in milestone.stat %}
|
||||
{% for data in milestone.stat %}
|
||||
var data = [
|
||||
{% for label in data.labels %}
|
||||
{
|
||||
label: "{{ label.label}}",
|
||||
data: {{ label.total }},
|
||||
color: "{{ label.color }}",
|
||||
},
|
||||
{% endfor %}
|
||||
];
|
||||
var plotObj = $.plot($("#floatsubdonut{{ milestone.id }}-{{ data.id }}"), data, {
|
||||
series: {
|
||||
pie: {
|
||||
show: true,
|
||||
label: {
|
||||
show: false,
|
||||
radius: 3/4,
|
||||
threshold: 0.1,
|
||||
background: {
|
||||
opacity: 0.5,
|
||||
color: '#cdcdcd',
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
});
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% if not showfilters %}
|
||||
$("#filters").addClass("d-none");
|
||||
$("#filters").removeClass("d-flex");
|
||||
{% endif %}
|
||||
|
||||
// Appliy filters
|
||||
showhide();
|
||||
$("#mycontent").show();
|
||||
});
|
||||
{% endblock %}
|
820
templates/Scrum/view.html.twig
Normal file
820
templates/Scrum/view.html.twig
Normal file
@ -0,0 +1,820 @@
|
||||
{% 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 %}
|
11
templates/Scrumcolumn/close.html.twig
Executable file
11
templates/Scrumcolumn/close.html.twig
Executable file
@ -0,0 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
window.parent.$("#mymodalcolumn").modal('hide');
|
||||
});
|
||||
{% endblock %}
|
51
templates/Scrumcolumn/edit.html.twig
Executable file
51
templates/Scrumcolumn/edit.html.twig
Executable file
@ -0,0 +1,51 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_scrumcolumn_delete',{'id':scrumcolumn.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 %}
|
||||
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.giteaid) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#scrumcolumn_name").focus();
|
||||
});
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodalcolumn").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
11
templates/Scrumpriority/close.html.twig
Executable file
11
templates/Scrumpriority/close.html.twig
Executable file
@ -0,0 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
window.parent.$("#mymodalpriority").modal('hide');
|
||||
});
|
||||
{% endblock %}
|
51
templates/Scrumpriority/edit.html.twig
Executable file
51
templates/Scrumpriority/edit.html.twig
Executable file
@ -0,0 +1,51 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_scrumpriority_delete',{'id':scrumpriority.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 %}
|
||||
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.giteaid) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#scrumpriority_name").focus();
|
||||
});
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodalpriority").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
11
templates/Scrumteam/close.html.twig
Executable file
11
templates/Scrumteam/close.html.twig
Executable file
@ -0,0 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
window.parent.$("#mymodalteam").modal('hide');
|
||||
});
|
||||
{% endblock %}
|
51
templates/Scrumteam/edit.html.twig
Executable file
51
templates/Scrumteam/edit.html.twig
Executable file
@ -0,0 +1,51 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_scrumteam_delete',{'id':scrumteam.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 %}
|
||||
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.giteaid) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#scrumteam_name").focus();
|
||||
});
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodalteam").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
11
templates/Scrumtype/close.html.twig
Executable file
11
templates/Scrumtype/close.html.twig
Executable file
@ -0,0 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
window.parent.$("#mymodaltype").modal('hide');
|
||||
});
|
||||
{% endblock %}
|
51
templates/Scrumtype/edit.html.twig
Executable file
51
templates/Scrumtype/edit.html.twig
Executable file
@ -0,0 +1,51 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_scrumtype_delete',{'id':scrumtype.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 %}
|
||||
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.giteaid) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#scrumtype_name").focus();
|
||||
});
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodaltype").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
3
templates/Sonde/sonde.html.twig
Normal file
3
templates/Sonde/sonde.html.twig
Normal file
@ -0,0 +1,3 @@
|
||||
{% if not urlsonde is empty %}
|
||||
<script src='{{ urlsonde }}'></script>
|
||||
{% endif %}
|
29
templates/Theme/list.html.twig
Normal file
29
templates/Theme/list.html.twig
Normal file
@ -0,0 +1,29 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Thèmes</h1>
|
||||
|
||||
<h2>Thème en cours</h2>
|
||||
<div class="text-center" style="width:330px">
|
||||
<img src="{{currentheme.url}}/look.png" style="width:100%; background-color: {{app.session.get('colorbgbodydark') }}"><br>
|
||||
{{currentheme.name}}
|
||||
</div>
|
||||
|
||||
<h2 class="mt-5">Thèmes disponibles</h2>
|
||||
|
||||
<div>
|
||||
{% for theme in themes %}
|
||||
<div class="text-center mb-4" style="width:330px; display: inline-block">
|
||||
<img src="{{theme.url}}/look.png" style="height:170px; background-color: {{app.session.get('colorbgbodydark') }}"><br>
|
||||
{{theme.name}}<br>
|
||||
<a href="{{ path("app_theme_select",{"name":theme.dir}) }}" class="btn btn-primary" role="button">Sélectionner</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
106
templates/User/edit.html.twig
Executable file
106
templates/User/edit.html.twig
Executable file
@ -0,0 +1,106 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification UTILISATEUR
|
||||
{% elseif mode=="submit" %}
|
||||
Création UTILISATEUR
|
||||
{% elseif mode=="profil" %}
|
||||
Profil UTILISATEUR
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
{% if mode=="profil" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_home') }}>Annuler</a>
|
||||
{% else %}
|
||||
<a class="btn btn-secondary" href={{ path('app_user') }}>Annuler</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 style="width:90px; margin:auto;">
|
||||
{% set avatar= "noavatar.png" %}
|
||||
{% if user.avatar %}
|
||||
{% set avatar= user.avatar %}
|
||||
{% endif %}
|
||||
<img id="user_avatar_img" src="{{ avatar|urlavatar }}" class="avatar big" >
|
||||
{{ form_widget(form.avatar) }}
|
||||
<bouton class="btn btn-info" style="width:100%; margin-bottom:15px;" onClick="ModalLoad('mymodallarge','Avatar','{{ path('app_crop01', {"type": "avatar", "reportinput": "#user_avatar" }) }}');" title='Ajouter un avatar'>Modifier</bouton>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.username) }}
|
||||
{% if form.password is defined %}
|
||||
{{ form_row(form.password) }}
|
||||
{%endif%}
|
||||
{{ form_row(form.lastname) }}
|
||||
{{ form_row(form.firstname) }}
|
||||
{{ form_row(form.email) }}
|
||||
{{ form_row(form.apikey) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if form.roles is defined %}
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Organisation
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.groups) }}
|
||||
{{ form_row(form.roles) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%endif%}
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#user_password_first").val("");
|
||||
$("#user_login").focus();
|
||||
});
|
||||
|
||||
$("#user_avatar_img").on('load', function() {
|
||||
|
||||
})
|
||||
$("#user_avatar_img").on('error', function(){
|
||||
var imgSrc = $(this).attr('src');
|
||||
if(imgSrc!="{{ asset("uploads/avatar/") }}")
|
||||
$(this).attr('src',imgSrc);
|
||||
});
|
||||
{% endblock %}
|
75
templates/User/list.html.twig
Normal file
75
templates/User/list.html.twig
Normal file
@ -0,0 +1,75 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
UTILISATEURS
|
||||
</h1>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th width="70px" class="no-sort">Avatar</th>
|
||||
<th>Login</th>
|
||||
<th>Prénom</th>
|
||||
<th>Nom</th>
|
||||
<th>Rôles</th>
|
||||
<th>Groupes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_user_update",{id:user.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% if user.id >=0 %}
|
||||
<a href="{{path("app_user_delete",{id:user.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><img id="user_avatar_img" src="{{ user.avatar|urlavatar }}" class="avatar" ></td>
|
||||
<td>{{user.username}}</td>
|
||||
<td>{{user.firstname}}</td>
|
||||
<td>{{user.lastname}}</td>
|
||||
<td>
|
||||
{%for role in user.roles %}
|
||||
{%if role=="ROLE_ADMIN" %}
|
||||
Administrateur<br>
|
||||
{%elseif role=="ROLE_MODO" %}
|
||||
Modérateur<br>
|
||||
{%elseif role=="ROLE_MASTER" %}
|
||||
Master<br>
|
||||
{%elseif role=="ROLE_USER" %}
|
||||
Utilisateur<br>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% for group in user.groups %}
|
||||
{{ group.name }}<br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]]
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
61
templates/Websocket/sample.html.twig
Normal file
61
templates/Websocket/sample.html.twig
Normal file
@ -0,0 +1,61 @@
|
||||
<div id="chat" class="text-center mt-5">
|
||||
<div class="mb-2">online</div>
|
||||
<div id="online" style="mt-2"></div>
|
||||
</div>
|
||||
|
||||
{% if wssuse %}
|
||||
<script>
|
||||
var conn;
|
||||
|
||||
function connect() {
|
||||
conn = new WebSocket("{{wssurl}}");
|
||||
|
||||
conn.onopen = function(e) {
|
||||
console.log("== CONNECT");
|
||||
{% set userkey = "" %}
|
||||
{% if app.user %}
|
||||
{% set userkey = app.user.apikey %}
|
||||
{%endif%}
|
||||
|
||||
subscribe("home",1,"{{userkey}}");
|
||||
sendMessage({command: "alive"});
|
||||
};
|
||||
conn.onmessage = function(e) {
|
||||
ret=JSON.parse(e.data);
|
||||
console.log(ret.log);
|
||||
|
||||
switch(ret.command) {
|
||||
case "alive" :
|
||||
if(!$('#online'+ret.from.id).length) {
|
||||
html='<img id="online'+ret.from.id+'" src="'+ret.from.avatar+'" class="avatar ml-2 mr-2" title="'+ret.from.displayname+'">';
|
||||
$("#online").append(html);
|
||||
}
|
||||
|
||||
if(ret.from.id!={{app.user.id}})
|
||||
sendMessage({command: "meto"});
|
||||
break;
|
||||
|
||||
case "adead" :
|
||||
$('#online'+ret.from.id).remove();
|
||||
break;
|
||||
|
||||
case "meto" :
|
||||
if(!$('#online'+ret.from.id).length) {
|
||||
html='<img id="online'+ret.from.id+'" src="'+ret.from.avatar+'" class="avatar ml-2 mr-2" title="'+ret.from.displayname+'">';
|
||||
$("#online").append(html);
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
conn.onclose = function(e) {
|
||||
console.log("== DISCONNECT");
|
||||
$('#online img').remove();
|
||||
console.log('Socket is closed. Reconnect will be attempted in 1 second.', e.reason);
|
||||
setTimeout(function() { connect(); }, 1000);
|
||||
};
|
||||
}
|
||||
|
||||
connect();
|
||||
</script>
|
||||
{% endif %}
|
187
templates/base.html.twig
Normal file
187
templates/base.html.twig
Normal file
@ -0,0 +1,187 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
|
||||
<title>{% block title %}{{app.session.get("appname")}}{%if usetitle is defined %} = {{usetitle}} {%endif%}{% endblock %}</title>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
|
||||
{% block encorelinktags %}
|
||||
|
||||
{% endblock encorelinktags %}
|
||||
|
||||
<link rel="shortcut icon" href="{{ asset("uploads/logo/"~app.session.get("logolight")) }}" />
|
||||
</head>
|
||||
|
||||
<link href="{{ asset("styles/css/font.css") }}" rel="stylesheet" media="screen" />
|
||||
<link href="{{ asset("styles/css/style.css")}}" rel="stylesheet" media="screen" />
|
||||
|
||||
<style>
|
||||
{{ include('Include/style.css.twig') }}
|
||||
</style>
|
||||
|
||||
{% if not app.session.get("apptheme") is empty %}
|
||||
<link href="{{ asset("themes/"~app.session.get("apptheme")) }}/style.css" rel="stylesheet" media="screen" />
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
{% block localstyle %}
|
||||
|
||||
{% endblock %}
|
||||
</style>
|
||||
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{% block encorescripttags %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
{{ include('Include/javascript.js.twig') }}
|
||||
</script>
|
||||
|
||||
|
||||
{% set class="" %}
|
||||
{% if usemonocolor is defined and usemonocolor %}
|
||||
{% set class="monocolor" %}
|
||||
{% endif %}
|
||||
|
||||
<body class={{ class }}>
|
||||
{% if useheader is defined and useheader %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark">
|
||||
<a class="navbar-brand" href="{{ path('app_home')}}">
|
||||
<img src="{{ asset("uploads/logo/"~app.session.get("logodark")) }}" style="height:30px;margin-top:-3px;">
|
||||
{{app.session.get("appname")}}
|
||||
{%if usetitle is defined %} = {{usetitle}} {%endif%}
|
||||
</a>
|
||||
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#sidebar" aria-controls="sidebar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="nav-item"><a href="{{path("app_scrum")}}">Scrums</a></li>
|
||||
<a href="{{path("app_issue")}}">Issues</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
{% if app.user %}
|
||||
<li>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="viewclosed">
|
||||
<label class="custom-control-label" for="viewclosed" style="color:var(--colorfttitledark);">Afficher les tickets clos</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_user_profil")}}">
|
||||
<img src="{{ asset("uploads/avatar/"~app.user.avatar) }}" class="avatar">
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<li>
|
||||
<a href="{{path("app_admin")}}"><i class="fa fa-cog fa-fw"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
{% if app.user %}
|
||||
<a href="{{path("app_logout")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
|
||||
{% else %}
|
||||
<a href="{{path("app_login")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<main id="main" class="container-fluid {% if maxwidth is defined and maxwidth %} page-maxed {% endif %}">
|
||||
{% set contentsidebar="" %}
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
{% set contentsidebar="contentsidebar" %}
|
||||
{{ include('Include/sidebar.html.twig') }}
|
||||
{%endif%}
|
||||
|
||||
|
||||
<div id="mycontent" class="content {{contentsidebar}}">
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div id="mymodal" 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="mymodallarge" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe frameborder=0 width="100%" height="700px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block localexternalscript %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
|
||||
{% if app.session.get('viewclosed') %}
|
||||
$("#viewclosed").prop( "checked", {{ app.session.get('viewclosed') }} )
|
||||
{% endif %}
|
||||
|
||||
$('#viewclosed').change(function() {
|
||||
console.log(this.checked);
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
key:'user',
|
||||
id:'viewclosed',
|
||||
value: this.checked
|
||||
}
|
||||
}).done(function( data ) {
|
||||
location.reload(true);
|
||||
});
|
||||
});
|
||||
|
||||
{% block localjavascript %}
|
||||
|
||||
{% endblock %}
|
||||
</script>
|
||||
|
||||
{% if not app.session.get("apptheme") is empty %}
|
||||
<script src="{{ asset("themes/"~app.session.get("apptheme")) }}/local.js"></script>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user