depot v2
This commit is contained in:
62
src/schedule-2.0/templates/Breakday/edit.html.twig
Executable file
62
src/schedule-2.0/templates/Breakday/edit.html.twig
Executable file
@@ -0,0 +1,62 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification JOUR FERIE
|
||||
{% elseif mode=="submit" %}
|
||||
Création JOUR FERIE
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_breakday') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_breakday_delete',{'id':breakday.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.start) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#breakday_name").focus();
|
||||
});
|
||||
{% endblock %}
|
78
src/schedule-2.0/templates/Breakday/list.html.twig
Normal file
78
src/schedule-2.0/templates/Breakday/list.html.twig
Normal file
@@ -0,0 +1,78 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
td {
|
||||
padding:5px !important;
|
||||
}
|
||||
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
JOURS FERIES
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_breakday_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Jours Fériés
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort no-print">Action</th>
|
||||
<th>Ordre</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for breakday in breakdays %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_breakday_update",{id:breakday.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{breakday.start|date("Ymd")}}</td>
|
||||
<td>{{breakday.start|date("d/m/Y")}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
59
src/schedule-2.0/templates/Cron/edit.html.twig
Normal file
59
src/schedule-2.0/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 %}
|
||||
|
||||
|
||||
|
58
src/schedule-2.0/templates/Cron/list.html.twig
Normal file
58
src/schedule-2.0/templates/Cron/list.html.twig
Normal file
@@ -0,0 +1,58 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
JOBS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_crous_submit') }}>Ajouter</a></p>
|
||||
|
||||
<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 class="no-string">Order</th>
|
||||
<th>Command</th>
|
||||
<th>Description</th>
|
||||
<th>Statut</th>
|
||||
<th>Prochaine exécution</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.id}}</td>
|
||||
<td>{{cron.command}}</td>
|
||||
<td>{{cron.description}}</td>
|
||||
<td>{{cron.statutlabel}}</td>
|
||||
<td>{{cron.nextexecdate|date("m/d/Y H:i")}}</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 %}
|
||||
|
19
src/schedule-2.0/templates/Cron/logs.html.twig
Normal file
19
src/schedule-2.0/templates/Cron/logs.html.twig
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "CRWhizBundle::base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">{{ title }}</h1>
|
||||
|
||||
<a class="btn btn-default" href={{ path("cadoles_cron_config_log",{"id":"cron"}) }}>Log CRON</a>
|
||||
<a class="btn btn-default" href={{ path("cadoles_cron_config_log",{"id":"prod"}) }}>Log PROD</a>
|
||||
<a class="btn btn-default" href={{ path("cadoles_cron_config_log",{"id":"dev"}) }}>Log DEV</a>
|
||||
<br><br>
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-pencil fa-fw"></i> Logs
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
{{ content | nl2br }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
35
src/schedule-2.0/templates/Crop/crop01.html.twig
Normal file
35
src/schedule-2.0/templates/Crop/crop01.html.twig
Normal file
@@ -0,0 +1,35 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block head_style %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{{ encore_entry_link_tags('dropzone') }}
|
||||
{% endblock head_style %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
<h3 class="page-header"></h3>
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
<form action="{{ oneup_uploader_endpoint('avatar') }}" class="dropzone" id="MyDropZone" style="margin-top:10px">
|
||||
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block localjavascript %}
|
||||
window.parent.$(".modal-title").html("ETAPE 1 - Téléchargez votre image");
|
||||
|
||||
Dropzone.options.MyDropZone = {
|
||||
maxFiles: 1,
|
||||
acceptedMimeTypes: 'image/*',
|
||||
//renameFilename: false,
|
||||
success: function(file, response){
|
||||
$(location).attr('href',"{{ path('app_crop02') }}");
|
||||
}
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#extraLargeModal").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
71
src/schedule-2.0/templates/Crop/crop02.html.twig
Normal file
71
src/schedule-2.0/templates/Crop/crop02.html.twig
Normal file
@@ -0,0 +1,71 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
<div id='preview' style='overflow:hidden; width:90px; height:90px; position: absolute; top: 0px; right: 10px;'>
|
||||
<img src="/{{ appAlias }}/uploads/avatar/{{ app.session.get('uploadavatar') }}" style='position: relative;' alt='Thumbnail Preview' />
|
||||
</div>
|
||||
|
||||
<div style="width:800px; height:590px; overflow:hidden; margin:65px auto 0px auto;">
|
||||
<div id="largeimg" class="crop-select-js" style="width:800px;">
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block localjavascript %}
|
||||
function move(data) {
|
||||
$('#form_x').val(data.xScaledToImage);
|
||||
$('#form_y').val(data.yScaledToImage);
|
||||
|
||||
preview();
|
||||
}
|
||||
|
||||
function resize(data) {
|
||||
$('#form_w').val(data.widthScaledToImage);
|
||||
$('#form_h').val(data.heightScaledToImage);
|
||||
|
||||
preview();
|
||||
}
|
||||
|
||||
function preview(data) {
|
||||
var scaleX = 90 / $('#form_w').val();
|
||||
var scaleY = 90 / $('#form_h').val();
|
||||
|
||||
$('#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() {
|
||||
window.parent.$("#user_avatar").val("thumb_{{ app.session.get('uploadavatar') }}");
|
||||
window.parent.$("#user_avatar_img").attr("src","/{{ appAlias }}/uploads/avatar/thumb_{{ app.session.get('uploadavatar') }}");
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#extraLargeModal").modal('hide');
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
window.parent.$(".modal-title").html("ETAPE 2 - Découper votre image");
|
||||
|
||||
$('#largeimg').CropSelectJs({
|
||||
imageSrc: "/{{ appAlias }}/uploads/avatar/{{ app.session.get('uploadavatar') }}",
|
||||
selectionResize: function(data) { resize(data); },
|
||||
selectionMove: function(data) { move(data); },
|
||||
});
|
||||
$('#largeimg').CropSelectJs('setSelectionAspectRatio',1);
|
||||
|
||||
|
||||
});
|
||||
{% endblock %}
|
71
src/schedule-2.0/templates/Customer/edit.html.twig
Executable file
71
src/schedule-2.0/templates/Customer/edit.html.twig
Executable file
@@ -0,0 +1,71 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if fgprint is defined and fgprint %}
|
||||
CLIENT
|
||||
{% elseif mode=="update" %}
|
||||
Modification CLIENT
|
||||
{% elseif mode=="submit" %}
|
||||
Création CLIENT
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_customer') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_customer_delete',{'id':customer.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.keypass) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#customer_name").focus();
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
{% endblock %}
|
81
src/schedule-2.0/templates/Customer/list.html.twig
Normal file
81
src/schedule-2.0/templates/Customer/list.html.twig
Normal file
@@ -0,0 +1,81 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
td {
|
||||
padding:5px !important;
|
||||
}
|
||||
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
CLIENTS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_customer_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Clients
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-print no-sort">Action</th>
|
||||
<th>Nom</th>
|
||||
<th>Clé</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for customer in customers %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_customer_update",{id:customer.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{customer.name}}</td>
|
||||
<td>
|
||||
{% if customer.keypass %}
|
||||
<a href="{{path("app_customer_report",{"key":customer.keypass})}}">{{customer.keypass}}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
439
src/schedule-2.0/templates/Event/list.html.twig
Normal file
439
src/schedule-2.0/templates/Event/list.html.twig
Normal file
@@ -0,0 +1,439 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block head_style %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{{ encore_entry_link_tags('fullcalendar') }}
|
||||
{% endblock head_style %}
|
||||
|
||||
{% block localstyle %}
|
||||
.fc-header-toolbar h2 {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.fc-day-grid-event {
|
||||
padding:0px;
|
||||
border-radius:0px;
|
||||
border: none;
|
||||
}
|
||||
.fc-content {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.fc-title {
|
||||
font-weight: bolder;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.eventAvatar {
|
||||
width: 40px;
|
||||
margin: 0px 5px 0px 0px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.eventInfo{
|
||||
margin: -18px 5px 0px 0px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.eventEstimate {
|
||||
margin: -3px 10px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="fullcalendar" style="width:100%; margin-top:10px;"></div>
|
||||
|
||||
<div id="modalsubmit" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Création Evènement</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<button onClick="eventSubmit()" class="btn btn-success">Valider</button>
|
||||
<button onClick="" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
|
||||
|
||||
<p></p>
|
||||
<div class="form-group">
|
||||
<label class="control-label required" for="usersubmit">
|
||||
Intervenant<span class="mandatory">*</span>
|
||||
</label>
|
||||
<select class="select2entity" id="usersubmit" name="usersubmit">
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MASTER') or is_granted('ROLE_VALIDATOR')%}
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}">{{user.displayname}}</option>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<option value="{{app.user.id}}">{{app.user.displayname}}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label required" for="tasksubmit">
|
||||
Project<span class="mandatory">*</span>
|
||||
</label>
|
||||
<select class="select2entity" id="tasksubmit" name="tasksubmit">
|
||||
<option></option>
|
||||
{% for task in tasks %}
|
||||
<option value="{{task.id}}">{{task.displayname}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="amsubmit">
|
||||
<label class="custom-control-label" for="amsubmit">Evènement sur la matinée</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="apsubmit">
|
||||
<label class="custom-control-label" for="apsubmit">Evènement sur l'après-midi</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="astreinte">
|
||||
<label class="custom-control-label" for="astreinte">Astreinte</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label">
|
||||
Description
|
||||
</label>
|
||||
<textarea id="description" id="description" class="form-control" placeholder="Description" style="height:200px">
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" id="start" name="start" class="form-control" value="">
|
||||
<input type="hidden" id="end" name="end" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="modalupdate" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Modification Evènement</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<button onClick="eventUpdate()" class="btn btn-success">Valider</button>
|
||||
<button onClick="" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
|
||||
<button onClick="eventDelete()" class="btn btn-danger float-right">Supprimer</button>
|
||||
|
||||
<p></p>
|
||||
<div class="form-group">
|
||||
<label class="control-label required" for="service_name">
|
||||
Intervenant<span class="mandatory">*</span>
|
||||
</label>
|
||||
<select class="select2entity" id="userupdate" name="userupdate">
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MASTER') or is_granted('ROLE_VALIDATOR')%}
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}">{{user.displayname}}</option>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<option value="{{app.user.id}}">{{app.user.displayname}}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label required" for="taskupdate">
|
||||
Project<span class="mandatory">*</span>
|
||||
</label>
|
||||
<select class="select2entity" id="taskupdate" name="taskupdate">
|
||||
<option></option>
|
||||
{% for task in tasks %}
|
||||
<option value="{{task.id}}">{{task.displayname}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label">
|
||||
Description
|
||||
</label>
|
||||
<textarea id="description" id="description" class="form-control" placeholder="Description" style="height:200px">
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="idevent" name="idevent" class="form-control" value="">
|
||||
<input type="hidden" id="fgastreinte" name="fgastreinte" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ encore_entry_script_tags('fullcalendar') }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#modalsubmit #user").select2({
|
||||
theme: 'bootstrap4',
|
||||
language: "fr"
|
||||
});
|
||||
|
||||
$("#modalsubmit #task").select2({
|
||||
placeholder: "Selectionnez un projet",
|
||||
allowClear: true,
|
||||
theme: 'bootstrap4',
|
||||
language: "fr"
|
||||
});
|
||||
|
||||
$("#modalupdate #user").select2({
|
||||
theme: 'bootstrap4',
|
||||
language: "fr"
|
||||
});
|
||||
|
||||
$("#modalupdate #task").select2({
|
||||
placeholder: "Selectionnez un projet",
|
||||
theme: 'bootstrap4',
|
||||
language: "fr"
|
||||
});
|
||||
});
|
||||
|
||||
// Rendu d'un évenement
|
||||
function eventRender(info) {
|
||||
// Récupération des divers élements du rendu event
|
||||
var content=$(info.el).children('.fc-content');
|
||||
var title=$(content).children('.fc-title');
|
||||
|
||||
// Ajouter l'avatar
|
||||
content.prepend("<img src="+info.event.extendedProps.avatar+" class='eventAvatar'>");
|
||||
|
||||
// Ajout container
|
||||
content.append("<span class='eventInfo float-right'></span>");
|
||||
var eventInfo=$(content).children('.eventInfo');
|
||||
|
||||
// Ajouter le verrou si event non editable
|
||||
if(info.event.extendedProps.locked) {
|
||||
eventInfo.append("<i class='fa fa-lock float-right'></i>");
|
||||
}
|
||||
|
||||
// Ajout estimation
|
||||
eventInfo.append("<span class='eventEstimate float-right'>"+info.event.extendedProps.estimate+"</span>");
|
||||
|
||||
// Description
|
||||
content.attr("title",info.event.extendedProps.fulldescription);
|
||||
}
|
||||
|
||||
// Formulaire Création d'un évelement
|
||||
var allDay;
|
||||
function eventSelect(selectionInfo) {
|
||||
var start=moment(selectionInfo.start);
|
||||
var end=moment(selectionInfo.end);
|
||||
var end=end.subtract(1, 'd');
|
||||
allDay=(start.format("DD/MM/YYYY") != end.format("DD/MM/YYYY"));
|
||||
|
||||
// Controle
|
||||
if(start.month()!=end.month()) {
|
||||
alert("Une tâche ne peut être sur deux mois différents");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(start.week()!=end.week()) {
|
||||
alert("Une tâche ne peut être sur deux semaines différentes");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Valeur par défaut
|
||||
{% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_VALIDATOR') or is_granted('ROLE_MASTER')) and app.session.get('iduser')!="all" %}
|
||||
$('#usersubmit').val({{app.session.get('iduser')}}).trigger("change");
|
||||
{% else %}
|
||||
$('#usersubmit').val({{app.user.id}}).trigger("change");
|
||||
{% endif %}
|
||||
|
||||
// Si jour de fin un samedi ou un dimanche : on est forcement en astreinte
|
||||
if(moment(end).day()==0||moment(end).day()==6) {
|
||||
$("#modalsubmit #astreinte").prop("checked",true);
|
||||
$("#modalsubmit #astreinte").attr("disabled",true);
|
||||
allDay=true;
|
||||
}
|
||||
else {
|
||||
$("#modalsubmit #astreinte").prop('checked', false);
|
||||
$("#modalsubmit #astreinte").attr('disabled', false);
|
||||
}
|
||||
|
||||
$('#modalsubmit #amsubmit').prop("checked",true);
|
||||
$('#modalsubmit #apsubmit').prop("checked",true);
|
||||
$('#modalsubmit #amsubmit').attr("disabled",allDay);
|
||||
$('#modalsubmit #apsubmit').attr("disabled",allDay);
|
||||
|
||||
$('#modalsubmit #start').val(start.format("YYYY-MM-DD"));
|
||||
$('#modalsubmit #end').val(end.format("YYYY-MM-DD"));
|
||||
|
||||
$('#modalsubmit #description').val("");
|
||||
|
||||
$("#modalsubmit .alert").remove();
|
||||
|
||||
// Formulaire de création d'un évènement
|
||||
$('#modalsubmit').modal();
|
||||
}
|
||||
|
||||
// Formulaire Modification d'un évelement
|
||||
function eventClick(info) {
|
||||
if(info.event.extendedProps.editable) {
|
||||
console.log(info.event.id);
|
||||
|
||||
var id=info.event.id;
|
||||
var description=info.event.extendedProps.description;
|
||||
var userid=info.event.extendedProps.userid;
|
||||
var taskid=info.event.extendedProps.taskid;
|
||||
var fgastreinte=info.event.extendedProps.astreinte;
|
||||
|
||||
$('#userupdate').val(userid).trigger("change");
|
||||
$('#taskupdate').val(taskid).trigger("change");
|
||||
$('#modalupdate #idevent').val(id);
|
||||
$('#modalupdate #fgastreinte').val(fgastreinte);
|
||||
$('#modalupdate #description').val(description);
|
||||
|
||||
$("#modalupdate .alert").remove();
|
||||
|
||||
// Formulaire de création d'un évènement
|
||||
$('#modalupdate').modal();
|
||||
}
|
||||
}
|
||||
|
||||
// Création de l'évènement
|
||||
function eventSubmit() {
|
||||
$("#modalsubmit .alert").remove();
|
||||
var error=false;
|
||||
|
||||
// Tache obligatoire
|
||||
if($("#modalsubmit #task").val()=="") {
|
||||
error=true;
|
||||
$("#modalsubmit .modal-body").append("<div class='alert alert-danger' style='margin: 5px 0px'>Tâche obligatoire</div>");
|
||||
}
|
||||
|
||||
// AM ou PM obligatoire
|
||||
if(!$("#modalsubmit #amsubmit").prop("checked")&&!$("#modalsubmit #apsubmit").prop("checked")) {
|
||||
error=true;
|
||||
$("#modalsubmit .modal-body").append("<div class='alert alert-danger' style='margin: 5px 0px'>Vous devez choisir un moment de la journée</div>");
|
||||
}
|
||||
|
||||
if(!error) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iduser: $("#usersubmit").val(),
|
||||
idtask: $("#tasksubmit").val(),
|
||||
start: $("#modalsubmit #start").val(),
|
||||
end: $("#modalsubmit #end").val(),
|
||||
am: $("#modalsubmit #amsubmit").prop("checked"),
|
||||
ap: $("#modalsubmit #apsubmit").prop("checked"),
|
||||
astreinte: $("#modalsubmit #astreinte").prop("checked"),
|
||||
description: $("#modalsubmit #description").val()
|
||||
},
|
||||
url: "{{ path('app_event_submit') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
$("#modalsubmit .modal-body").append("<div class='alert alert-danger' style='margin: 5px 0px'>"+response.error+"</div>");
|
||||
}
|
||||
else {
|
||||
calendar.addEvent(response);
|
||||
calendar.render;
|
||||
$('#modalsubmit').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Modification de l'évènement
|
||||
function eventUpdate() {
|
||||
$("#modalupdate .alert").remove();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idevent: $("#modalupdate #idevent").val(),
|
||||
iduser: $("#userupdate").val(),
|
||||
idtask: $("#taskupdate").val(),
|
||||
fgastreinte: $("#modalupdate #fgastreinte").val(),
|
||||
description: $("#modalupdate #description").val()
|
||||
},
|
||||
url: "{{ path('app_event_update') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
$("#modalupdate .modal-body").append("<div class='alert alert-danger' style='margin: 5px 0px'>"+response.error+"</div>");
|
||||
}
|
||||
else {
|
||||
var event = calendar.getEventById($("#modalupdate #idevent").val());
|
||||
event.remove();
|
||||
|
||||
calendar.addEvent(response);
|
||||
calendar.render;
|
||||
$('#modalupdate').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Suppression de l'évènement
|
||||
function eventDelete() {
|
||||
$("#modalupdate .alert").remove();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idevent: $("#modalupdate #idevent").val(),
|
||||
fgastreinte: $("#modalupdate #fgastreinte").val()
|
||||
},
|
||||
url: "{{ path('app_event_delete') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
$("#modalupdate .modal-body").append("<div class='alert alert-danger' style='margin: 5px 0px'>"+response.error+"</div>");
|
||||
}
|
||||
else {
|
||||
var event = calendar.getEventById($("#modalupdate #idevent").val());
|
||||
event.remove();
|
||||
$('#modalupdate').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// On change astreinte
|
||||
$("#astreinte").change(function() {
|
||||
console.log(allDay)
|
||||
if(this.checked) {
|
||||
$("#amsubmit").prop("disabled",true);
|
||||
$("#apsubmit").prop("disabled",true);
|
||||
|
||||
$('#modalsubmit #amsubmit').prop("checked",true);
|
||||
$('#modalsubmit #apsubmit').prop("checked",true);
|
||||
}
|
||||
else {
|
||||
$("#amsubmit").prop("disabled",allDay);
|
||||
$("#apsubmit").prop("disabled",allDay);
|
||||
|
||||
$('#modalsubmit #amsubmit').prop("checked",true);
|
||||
$('#modalsubmit #apsubmit').prop("checked",true);
|
||||
}
|
||||
});
|
||||
|
||||
{% endblock %}
|
175
src/schedule-2.0/templates/Form/fields.html.twig
Normal file
175
src/schedule-2.0/templates/Form/fields.html.twig
Normal file
@@ -0,0 +1,175 @@
|
||||
{% 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 attributs des boutons #}
|
||||
{% block button_attributes -%}
|
||||
{% if type is defined and type == 'submit' -%}
|
||||
{% set class = 'btn-primary' %}
|
||||
{% else %}
|
||||
{% set class = 'btn-default' %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set attr = attr|merge({'class': (attr.class|default('') ~ ' btn ' ~ class)|trim}) %}
|
||||
{{ parent() }}
|
||||
{%- endblock button_attributes %}
|
||||
|
||||
|
||||
{# 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 %}
|
7
src/schedule-2.0/templates/Home/admin.html.twig
Normal file
7
src/schedule-2.0/templates/Home/admin.html.twig
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends "CRWhizBundle::base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
16
src/schedule-2.0/templates/Home/home.html.twig
Normal file
16
src/schedule-2.0/templates/Home/home.html.twig
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
body {
|
||||
background-color: #efefef;
|
||||
}
|
||||
.homecard {
|
||||
padding-top: 20px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% endblock %}
|
||||
|
36
src/schedule-2.0/templates/Home/login.html.twig
Executable file
36
src/schedule-2.0/templates/Home/login.html.twig
Executable file
@@ -0,0 +1,36 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
body {
|
||||
background-color: #efefef;
|
||||
}
|
||||
.homecard {
|
||||
padding-top: 20px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div style="text-align:center">
|
||||
<img src="/{{appAlias}}/images/logo.png" style="height:120px;margin-top:10px;"><br>
|
||||
<h1>{{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 %}
|
72
src/schedule-2.0/templates/Job/edit.html.twig
Executable file
72
src/schedule-2.0/templates/Job/edit.html.twig
Executable file
@@ -0,0 +1,72 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if fgprint is defined and fgprint %}
|
||||
METIER
|
||||
{% elseif mode=="update" %}
|
||||
Modification METIER
|
||||
{% elseif mode=="submit" %}
|
||||
Création METIER
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_job') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_job_delete',{'id':job.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.type) }}
|
||||
{{ form_row(form.description) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#job_name").focus();
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
{% endblock %}
|
77
src/schedule-2.0/templates/Job/list.html.twig
Normal file
77
src/schedule-2.0/templates/Job/list.html.twig
Normal file
@@ -0,0 +1,77 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
td {
|
||||
padding:5px !important;
|
||||
}
|
||||
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
METIERS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_job_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Métiers
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-print no-sort">Action</th>
|
||||
<th>Type</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for job in jobs %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_job_update",{id:job.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{job.type}}</td>
|
||||
<td>{{job.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
62
src/schedule-2.0/templates/Nature/edit.html.twig
Executable file
62
src/schedule-2.0/templates/Nature/edit.html.twig
Executable file
@@ -0,0 +1,62 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification NATURE
|
||||
{% elseif mode=="submit" %}
|
||||
Création NATURE
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_nature') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_nature_delete',{'id':nature.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) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#nature_name").focus();
|
||||
});
|
||||
{% endblock %}
|
70
src/schedule-2.0/templates/Nature/list.html.twig
Normal file
70
src/schedule-2.0/templates/Nature/list.html.twig
Normal file
@@ -0,0 +1,70 @@
|
||||
{% extends "base.html.twig" %}
|
||||
{% block localstyle %}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
NATURES
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_nature_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Natures
|
||||
</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 no-print">Action</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for nature in natures %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_nature_update",{id:nature.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{nature.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
74
src/schedule-2.0/templates/Offer/edit.html.twig
Executable file
74
src/schedule-2.0/templates/Offer/edit.html.twig
Executable file
@@ -0,0 +1,74 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if fgprint is defined and fgprint %}
|
||||
PROPOSITION
|
||||
{% elseif mode=="update" %}
|
||||
Modification PROPOSITION
|
||||
{% elseif mode=="submit" %}
|
||||
Création PROPOSITION
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_offer') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_offer_delete',{'id':offer.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.ref) }}
|
||||
{{ form_row(form.quantity) }}
|
||||
{{ form_row(form.pu) }}
|
||||
{{ form_row(form.active) }}
|
||||
{{ form_row(form.project) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#offer_name").focus();
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
135
src/schedule-2.0/templates/Offer/list.html.twig
Normal file
135
src/schedule-2.0/templates/Offer/list.html.twig
Normal file
@@ -0,0 +1,135 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
td {
|
||||
padding:5px !important;
|
||||
}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
PROPOSITIONS
|
||||
</h1>
|
||||
|
||||
<a class="btn btn-success" href={{ path('app_offer_submit') }}>Ajouter</a>
|
||||
|
||||
<div class="custom-control custom-switch float-right">
|
||||
<input type="checkbox" class="custom-control-input" id="switchactiveproject" {% if app.session.get('activeproject') %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="switchactiveproject">Projet Actif</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch float-right" style="margin-right:10px">
|
||||
<input type="checkbox" class="custom-control-input" id="switchactiveoffer" {% if app.session.get('activeoffer') %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="switchactiveoffer">Proposition Active</label>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
{%for service in services %}
|
||||
{% if not service.projects is empty %}
|
||||
{% set haveoffer=false %}
|
||||
{% set haveproject=false %}
|
||||
{% for project in service.projects %}
|
||||
{% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %}
|
||||
{% for offer in project.offers %}
|
||||
{% if app.session.get('activeoffer')==offer.active %}
|
||||
{% set haveoffer=true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% set haveproject=true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if haveoffer and haveproject %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> {{ service.name }}
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort no-print">Action</th>
|
||||
<th width="200px">Client</th>
|
||||
<th>Projet</th>
|
||||
<th width="250px">Proposition</th>
|
||||
<th width="150px">Ref</th>
|
||||
<th width="100px" class="text-center no-string">Qt</th>
|
||||
<th width="100px" class="text-center no-string">PU</th>
|
||||
<th width="100px" class="text-center no-string">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for project in service.projects %}
|
||||
{% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %}
|
||||
{% for offer in project.offers %}
|
||||
{% if app.session.get('activeoffer')==offer.active %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_offer_update",{id:offer.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{offer.project.customer.name}}</td>
|
||||
<td>{{offer.project.name}}</td>
|
||||
<td>{{offer.name}}</td>
|
||||
<td>{{offer.ref}}</td>
|
||||
<td class="text-right">{{offer.quantity|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-right">{{offer.pu|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-right">{{offer.total|number_format(2, '.', ' ')}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('.table ').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
$('#switchactiveproject').change(function() {
|
||||
window.location="{{ path('app_offer_activeproject' )}}";
|
||||
});
|
||||
|
||||
$('#switchactiveoffer').change(function() {
|
||||
window.location="{{ path('app_offer_activeoffer' )}}";
|
||||
});
|
||||
|
||||
{% endblock %}
|
73
src/schedule-2.0/templates/Project/edit.html.twig
Executable file
73
src/schedule-2.0/templates/Project/edit.html.twig
Executable file
@@ -0,0 +1,73 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if fgprint is defined and fgprint %}
|
||||
PROJET
|
||||
{% elseif mode=="update" %}
|
||||
Modification PROJET
|
||||
{% elseif mode=="submit" %}
|
||||
Création PROJET
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_project') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_project_delete',{'id':project.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.active) }}
|
||||
{{ form_row(form.customer) }}
|
||||
{{ form_row(form.service) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#project_name").focus();
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
{% endblock %}
|
155
src/schedule-2.0/templates/Project/list.html.twig
Normal file
155
src/schedule-2.0/templates/Project/list.html.twig
Normal file
@@ -0,0 +1,155 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
td {
|
||||
padding:5px !important;
|
||||
}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
PROJETS
|
||||
</h1>
|
||||
|
||||
<a class="btn btn-success" href={{ path('app_project_submit') }}>Ajouter</a>
|
||||
|
||||
<div class="custom-control custom-switch float-right">
|
||||
<input type="checkbox" class="custom-control-input" id="switchactive" {% if app.session.get('activeproject') %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="switchactive">Projet Actif</label>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
{%for service in services %}
|
||||
{% if not service.projects is empty %}
|
||||
{% set haveproject=false %}
|
||||
|
||||
{% for project in service.projects %}
|
||||
{% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %}
|
||||
{% set haveproject=true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if haveproject %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> {{ service.name }}
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort no-print">Action</th>
|
||||
<th width="300px">Client</th>
|
||||
<th>Nom</th>
|
||||
<th width="100px" class="text-center no-string">Estimé</th>
|
||||
<th width="100px" class="text-center no-string">Commandé</th>
|
||||
<th width="100px" class="text-center no-string">Validé</th>
|
||||
<th width="100px" class="text-center no-string">Solde Validé</th>
|
||||
<th width="100px" class="text-center no-string">Plannifié</th>
|
||||
<th width="100px" class="text-center no-string">Solde</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for project in service.projects %}
|
||||
{% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_project_update",{id:project.id})}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{path("app_project_users",{id:project.id})}}"><i class="fa fa-users"></i></a>
|
||||
|
||||
</td>
|
||||
<td>{{project.customer.name}}</td>
|
||||
<td>{{project.name}}</td>
|
||||
<td class="text-right">
|
||||
{% set tottask=0 %}
|
||||
{% set totvalidate=0 %}
|
||||
{% set totplanified=0 %}
|
||||
{% set totoffer=0 %}
|
||||
|
||||
{% for offer in project.offers %}
|
||||
{% set totoffer=(totoffer+offer.quantity) %}
|
||||
{% set totvalidate=totvalidate+offer.validate %}
|
||||
{% set totplanified=totplanified+offer.validate %}
|
||||
{% endfor %}
|
||||
|
||||
{% for task in project.tasks %}
|
||||
{% set tottask=tottask+task.quantity %}
|
||||
|
||||
{% set totvalidate=totvalidate+task.validate %}
|
||||
{% set totplanified=totplanified+task.validate %}
|
||||
{% for event in task.events %}
|
||||
{% set totplanified=totplanified+event.duration %}
|
||||
{% if event.validate %}
|
||||
{% set totvalidate=totvalidate+event.duration %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for penalty in task.penaltys %}
|
||||
{% set totplanified=totplanified+penalty.duration %}
|
||||
{% if penalty.validate %}
|
||||
{% set totvalidate=totvalidate+penalty.duration %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{{ tottask|number_format(2, '.', ' ') }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ totoffer|number_format(2, '.', ' ') }}
|
||||
</td>
|
||||
<td class="text-right">{{ (totvalidate*-1)|number_format(2, '.', ' ') }}</td>
|
||||
<td class="text-right">{{ (totoffer-totvalidate)|number_format(2, '.', ' ') }}</td>
|
||||
<td class="text-right">{{ ((totplanified-totvalidate)*-1)|number_format(2, '.', ' ') }}</td>
|
||||
<td class="text-right">{{ (totoffer-totplanified)|number_format(2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('.table').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
$('#switchactive').change(function() {
|
||||
window.location="{{ path('app_project_activeproject' )}}";
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
{% endblock %}
|
210
src/schedule-2.0/templates/Project/users.html.twig
Normal file
210
src/schedule-2.0/templates/Project/users.html.twig
Normal file
@@ -0,0 +1,210 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
td {
|
||||
padding:5px !important;
|
||||
}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
PROJET METIERS<br>
|
||||
{{project.displayname}}
|
||||
</h1>
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_project') }}>Fermer</a>
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="row" style="margin: 0px">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Utilisateurs
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort no-print">Action</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%for user in users %}
|
||||
{% if "ROLE_USER" in user.roles %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<button class="btn btn-link" onClick="modalJob({{user.id}})"><i class="fa fa-plus"></i></a>
|
||||
</td>
|
||||
|
||||
<td>{{user.displayname}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{% for userproject in userprojects %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> {{ userproject.name }}
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort no-print">Action</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%for user in userproject.users %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<button class="btn btn-link" onClick="delJob({{user.id}})"><i class="fa fa-minus"></i></a>
|
||||
</td>
|
||||
|
||||
<td>{{user.user.displayname}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modaljob" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Métier</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<button onClick="addJob()" class="btn btn-success">Valider</button>
|
||||
<button onClick="" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
|
||||
|
||||
<p></p>
|
||||
<div class="form-group">
|
||||
<label class="control-label required" for="idjob">
|
||||
Métier<span class="mandatory">*</span>
|
||||
</label>
|
||||
<select class="select2entity" id="idjob" name="idjob">
|
||||
<option></option>
|
||||
{% for job in jobs %}
|
||||
<option value="{{job.id}}">{{job.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="iduser" name="iduser" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('.table').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]],
|
||||
searching: false,
|
||||
paging: false,
|
||||
info: false
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function modalJob(iduser) {
|
||||
$("#iduser").val(iduser);
|
||||
$("#modaljob .alert").remove();
|
||||
$("#modaljob").modal('show');
|
||||
}
|
||||
|
||||
function addJob() {
|
||||
$("#modaljob .alert").remove();
|
||||
|
||||
iduser=$("#iduser").val();
|
||||
idjob=$("#idjob").val();
|
||||
if(idjob) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idproject: {{project.id}},
|
||||
idjob: idjob,
|
||||
iduser: iduser,
|
||||
},
|
||||
url: "{{ path('app_project_users_add') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
$("#modaljob .modal-body").append("<div class='alert alert-danger' style='margin: 5px 0px'>"+response.error+"</div>");
|
||||
}
|
||||
else {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function delJob(iduser) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iduser: iduser,
|
||||
},
|
||||
url: "{{ path('app_project_users_del') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
}
|
||||
else {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
{% endblock %}
|
103
src/schedule-2.0/templates/Report/holiday.html.twig
Normal file
103
src/schedule-2.0/templates/Report/holiday.html.twig
Normal file
@@ -0,0 +1,103 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
.homecard {width: 100% }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
MES CONGES
|
||||
</h1>
|
||||
|
||||
<div class="custom-control custom-switch float-right">
|
||||
<input type="checkbox" class="custom-control-input" id="switchactive" {% if app.session.get('activeholiday') %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="switchactive">Congès à Valider</label>
|
||||
</div>
|
||||
<div style="height:30px;">
|
||||
</div>
|
||||
|
||||
<div class="card homecard">
|
||||
<div class="card-header">
|
||||
Mes Congés
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<th>Utilisateur</th>
|
||||
<th>Tâche</th>
|
||||
<th>Début</th>
|
||||
<th>Fin</th>
|
||||
<th>Durée</th>
|
||||
</thead>
|
||||
|
||||
{% for user in users %}
|
||||
{% for event in user.holidays %}
|
||||
<tr id="row-{{event.id}}">
|
||||
<td>
|
||||
{{ user.user.displayname }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ event.task }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ event.start|date("d/m/Y H:i") }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ event.end|date("d/m/Y H:i") }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ event.duration }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('.table ').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 0, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
$('#switchactive').change(function() {
|
||||
window.location="{{ path('app_holiday_activeholiday' )}}";
|
||||
});
|
||||
|
||||
{% endblock %}
|
165
src/schedule-2.0/templates/Report/planning.html.twig
Normal file
165
src/schedule-2.0/templates/Report/planning.html.twig
Normal file
@@ -0,0 +1,165 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
.card {
|
||||
margin: 20px 20px 0px 0px;
|
||||
}
|
||||
|
||||
.card-body .month {
|
||||
margin: 20px 0px 0px 0px;
|
||||
|
||||
}
|
||||
.card-body .month:first-child {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.card-header h2 {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.card-header .synthese {
|
||||
float:right;
|
||||
font-size:12px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
color: #000000;
|
||||
background-color:#cccccc;
|
||||
}
|
||||
|
||||
.intervenant {
|
||||
width:200px;
|
||||
padding-left:5px;
|
||||
}
|
||||
|
||||
.total {
|
||||
text-align:center;
|
||||
width:70px;
|
||||
background-color:#888888;
|
||||
}
|
||||
.day {
|
||||
text-align:center;
|
||||
width: 40px;
|
||||
height:40px;
|
||||
}
|
||||
.astreinte {
|
||||
height: 12px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
|
||||
{% if fgprint is defined and fgprint %}
|
||||
h2, h3 {
|
||||
display:block !important;
|
||||
float:none !important;
|
||||
}
|
||||
|
||||
table { width:100%; font-size:10px;}
|
||||
|
||||
.card-header .synthese {
|
||||
float:none !important;
|
||||
text-align:left !important;
|
||||
}
|
||||
|
||||
.day {
|
||||
height:auto !important;
|
||||
}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
{% if fgprint is defined and fgprint %}<h1>Planning</h1>{%endif%}
|
||||
|
||||
{% if access=="customer" and not app.user %}
|
||||
<div class="no-print" style="margin-top:10px;">
|
||||
<style> .select2-container { display:inline-block} </style>
|
||||
<a class="btn btn-info" href="{{ path("app_customer_report",{"key":key})}}">Rapport</a>
|
||||
<a class="btn btn-success" href="{{ path("app_customer_planning",{"key":key})}}">Planning</a>
|
||||
Nombre de mois
|
||||
<select class="form-control select2entity" id="sidemonth" name="sidemonth" style="width:auto; display:inline-block">
|
||||
{% set selected="" %}
|
||||
{% for i in 1..48 %}
|
||||
{% set selected="" %}
|
||||
{%if i==app.session.get('nbmonth') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{i}}" {{selected}}>{{i}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for project in projects %}
|
||||
{% if not project.months is empty %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>{{ project.displayname }}</h2>
|
||||
<div class="synthese">
|
||||
Estimé = {{ project.estimate }}<br>
|
||||
Validé = {{ project.validate }}<br>
|
||||
Planifié = {{ project.planified }}<br>
|
||||
<b>RESTE = {{ (project.estimate - project.validate - project.planified) }}</b>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% set month="" %}
|
||||
|
||||
{% for month in project.months %}
|
||||
<h3 class="month">{{ month.monthlabel }}</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<th class="intervenant">Intervenant</th>
|
||||
{% for day in month.days %}
|
||||
<th class="day" style="background-color: {{ day.daycolor }}">
|
||||
{{ day.daylabel }}<br>
|
||||
{{ day.daynumber }}
|
||||
</th>
|
||||
{% endfor %}
|
||||
<th class="total">Total</th>
|
||||
</thead>
|
||||
|
||||
{% for user in month.users %}
|
||||
<tr>
|
||||
<td class="intervenant">{{ user.displayname }}</td>
|
||||
|
||||
{% for day in user.days %}
|
||||
<td class="day" style="background-color: {{ day.daycolor }}">
|
||||
{% if day.duration > 0 %}
|
||||
{{ day.duration }}
|
||||
{% endif %}
|
||||
{% if day.astreinte > 0 %}
|
||||
<div class="astreinte">A</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
<td class="total">{{user.total}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if month.total > 0 %}
|
||||
<i>Total = {{ month.total }}</i>
|
||||
{% endif %}
|
||||
|
||||
{% if month.totala > 0 %}
|
||||
<i>Total Astreinte = {{ month.totala }}</i>
|
||||
{% endif %}
|
||||
<div class="new-page"> </div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<br>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
350
src/schedule-2.0/templates/Report/report.html.twig
Normal file
350
src/schedule-2.0/templates/Report/report.html.twig
Normal file
@@ -0,0 +1,350 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
.card {
|
||||
margin: 20px 20px 0px 0px;
|
||||
}
|
||||
|
||||
.card-body .month {
|
||||
margin: 20px 0px 0px 0px;
|
||||
|
||||
}
|
||||
.card-body .month:first-child {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.card-header h2 {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.card-header .synthese {
|
||||
float:right;
|
||||
font-size:12px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.card-body h4 { margin: 20px 0px 0px 0px;}
|
||||
.card-body h4:first-child { margin: 0px;}
|
||||
|
||||
th,td, tfoot {
|
||||
border: 1px solid #37474F;
|
||||
color: #000000;
|
||||
background-color:#cccccc;
|
||||
}
|
||||
|
||||
.recaptask td, .recapoffer td {
|
||||
background-color:#ffffff;
|
||||
color: #212529;
|
||||
padding: 3px;
|
||||
}
|
||||
.recaptask tfoot td, .recapoffer thead td, .recapoffer tfoot td {
|
||||
background-color:#cccccc;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.intervenant {
|
||||
width:200px;
|
||||
padding-left:5px;
|
||||
}
|
||||
|
||||
.total {
|
||||
text-align:center;
|
||||
width:70px;
|
||||
background-color:#888888;
|
||||
}
|
||||
.day {
|
||||
text-align:center;
|
||||
width: 40px;
|
||||
height:40px;
|
||||
}
|
||||
.astreinte {
|
||||
height: 12px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
{% if fgprint is defined and fgprint %}
|
||||
h2, h3 {
|
||||
display:block !important;
|
||||
float:none !important;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
table { width:100%; font-size:10px;}
|
||||
|
||||
.card-header .synthese {
|
||||
float:none !important;
|
||||
text-align:left !important;
|
||||
}
|
||||
|
||||
.day {
|
||||
height:auto !important;
|
||||
}
|
||||
|
||||
.small { font-size:10px;}
|
||||
|
||||
h4 {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
{% if fgprint is defined and fgprint %}<h1>Planning</h1>{%endif%}
|
||||
|
||||
{% if access=="customer" and not app.user %}
|
||||
<div class="no-print" style="margin-top:10px;">
|
||||
<style> .select2-container { display:inline-block} </style>
|
||||
<a class="btn btn-success" href="{{ path("app_customer_report",{"key":key})}}">Rapport</a>
|
||||
<a class="btn btn-info" href="{{ path("app_customer_planning",{"key":key})}}">Planning</a>
|
||||
Nombre de mois
|
||||
<select class="form-control select2entity" id="sidemonth" name="sidemonth" style="width:auto; display:inline-block">
|
||||
{% set selected="" %}
|
||||
{% for i in 1..48 %}
|
||||
{% set selected="" %}
|
||||
{%if i==app.session.get('nbmonth') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{i}}" {{selected}}>{{i}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for project in projects %}
|
||||
{% if not project.months is empty or project.hors!=0 or not project.before is empty or not project.beforeastreinte is empty %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>{{ project.displayname }}</h2>
|
||||
<div class="synthese">
|
||||
Commandé = {{ project.proposed|number_format(2, '.', ' ') }}<br>
|
||||
Consommé = {{ project.validate|number_format(2, '.', ' ') }}<br>
|
||||
<b>RESTE = {{ (project.proposed - project.validate)|number_format(2, '.', ' ') }}</b>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<h4>RAPPORT</h4>
|
||||
<div class="small">
|
||||
{% if project.hors!=0 %}
|
||||
consommé avant = {{ project.hors }}<br>
|
||||
{% endif %}
|
||||
|
||||
{% set bycolonne = max(10,((project.before|length)/3)|round) %}
|
||||
|
||||
{% set compteur = 0 %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{% for month in project.before %}
|
||||
{% set compteur = compteur + 1 %}
|
||||
{% if compteur > bycolonne %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{% set compteur = 1 %}
|
||||
{% endif %}
|
||||
consommé le {{ month.monthlabel }} = {{ month.duration }}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not project.beforeastreinte is empty %}
|
||||
<h4>ASTREINTE</h4>
|
||||
{% set compteur = 0 %}
|
||||
<div class="small">
|
||||
{% for month in project.beforeastreinte %}
|
||||
consommé le {{ month.monthlabel }} = {{ month.duration }}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="new-page"> </div>
|
||||
|
||||
{% for month in project.months %}
|
||||
<h3 class="month">{{ month.monthlabel }}</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<th class="intervenant">Intervenant</th>
|
||||
{% for day in month.days %}
|
||||
<th class="day" style="background-color: {{ day.daycolor }}">
|
||||
{{ day.daylabel }}<br>
|
||||
{{ day.daynumber }}
|
||||
</th>
|
||||
{% endfor %}
|
||||
<th class="total">Total</th>
|
||||
</thead>
|
||||
|
||||
{% for user in month.users %}
|
||||
<tr>
|
||||
<td class="intervenant">{{ user.displayname }}</td>
|
||||
|
||||
{% for day in user.days %}
|
||||
<td class="day" style="background-color: {{ day.daycolor }}">
|
||||
{% if day.duration > 0 %}
|
||||
{{ day.duration }}
|
||||
{% endif %}
|
||||
{% if day.astreinte > 0 %}
|
||||
<div class="astreinte">A</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
<td class="total">{{user.total}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% if month.total > 0 %}
|
||||
<br>
|
||||
<table class="recaptask small">
|
||||
{% for task in month.tasks %}
|
||||
<tr>
|
||||
<td>{{ task.displayname }}</td>
|
||||
<td class="text-right">{{ task.duration|number_format(2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{% if month.totala > 0 %}
|
||||
<tr>
|
||||
<td>Astreinte</td>
|
||||
<td class="text-right">{{ month.totala|number_format(2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td style="min-width:200px">TOTAL</td>
|
||||
<td class="text-right" style="min-width:100px">{{ (month.total + month.totala)|number_format(2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<div class="new-page"> </div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if not project.offers is empty %}
|
||||
<h4>COMMANDES</h4>
|
||||
{% set count=(project.offers|length)-8 %}
|
||||
{% set totbefore10=0 %}
|
||||
{% set decoproposed=project.proposed %}
|
||||
{% set decovalidate=project.validate %}
|
||||
<table class="recapoffer small">
|
||||
<thead>
|
||||
<td width="200px">Libellé</td>
|
||||
<td width="200px">Référence</td>
|
||||
<td width="100px" class="text-center">Commandé</td>
|
||||
<td width="100px" class="text-center">Consommé</td>
|
||||
<td width="100px" class="text-center">Reste</td>
|
||||
</thead>
|
||||
{% set tot=0 %}
|
||||
{% for offer in project.offers %}
|
||||
{% if loop.index<count %}
|
||||
{% set totbefore10=totbefore10+offer.quantity %}
|
||||
{% if loop.index+1==count %}
|
||||
<tr>
|
||||
<td colspan="2">Précédente</td>
|
||||
<td class="text-right">{{ totbefore10|number_format(2, '.', ' ') }}</td>
|
||||
|
||||
<td class="text-right">
|
||||
{% if decovalidate >= totbefore10 %}
|
||||
{{ totbefore10|number_format(2, '.', ' ') }}
|
||||
{% set todel=totbefore10 %}
|
||||
{% else %}
|
||||
{% if decovalidate >= 0 %}
|
||||
{{ decovalidate|number_format(2, '.', ' ') }}
|
||||
{% set todel=decovalidate %}
|
||||
{% else %}
|
||||
0.00
|
||||
{% set todel=0 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% set decovalidate=decovalidate-totbefore10 %}
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
{{ (totbefore10-todel)|number_format(2, '.', ' ') }}
|
||||
{% set decoproposed=decoproposed-totbefore10 %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if not loop.last %}
|
||||
<tr>
|
||||
<td>{{ offer.name }}</td>
|
||||
<td>{{ offer.ref }}</td>
|
||||
<td class="text-right">{{ offer.quantity|number_format(2, '.', ' ') }}</td>
|
||||
|
||||
<td class="text-right">
|
||||
{% if decovalidate >= offer.quantity %}
|
||||
{{ offer.quantity|number_format(2, '.', ' ') }}
|
||||
{% set todel=offer.quantity %}
|
||||
{% else %}
|
||||
{% if decovalidate >= 0 %}
|
||||
{{ decovalidate|number_format(2, '.', ' ') }}
|
||||
{% set todel=decovalidate %}
|
||||
{% else %}
|
||||
0.00
|
||||
{% set todel=0 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% set decovalidate=decovalidate-offer.quantity %}
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
{{ (offer.quantity-todel)|number_format(2, '.', ' ') }}
|
||||
{% set decoproposed=decoproposed-totbefore10 %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td>{{ offer.name }}</td>
|
||||
<td>{{ offer.ref }}</td>
|
||||
<td class="text-right">{{ offer.quantity|number_format(2, '.', ' ') }}</td>
|
||||
|
||||
<td class="text-right">
|
||||
{% if decovalidate >= 0 %}
|
||||
{{ decovalidate|number_format(2, '.', ' ') }}
|
||||
{% set todel=decovalidate %}
|
||||
{% else %}
|
||||
0.00
|
||||
{% set todel=0 %}
|
||||
{% endif %}
|
||||
{% set decovalidate=decovalidate-offer.quantity %}
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
{{ (offer.quantity-todel)|number_format(2, '.', ' ') }}
|
||||
{% set decoproposed=decoproposed-totbefore10 %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<tfoot>
|
||||
<td colspan="2">TOTAL</td>
|
||||
<td class="text-right">{{ project.proposed|number_format(2, '.', ' ') }}</td>
|
||||
<td class="text-right">{{ project.validate|number_format(2, '.', ' ') }}</td>
|
||||
<td class="text-right">{{ (project.proposed - project.validate)|number_format(2, '.', ' ') }}</td>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div class="new-page"> </div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<br>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
128
src/schedule-2.0/templates/Report/synthese.html.twig
Normal file
128
src/schedule-2.0/templates/Report/synthese.html.twig
Normal file
@@ -0,0 +1,128 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
.homecard {
|
||||
margin: 20px 20px 0px 0px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
table {
|
||||
|
||||
}
|
||||
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
color: #ffffff;
|
||||
background-color:#37474F;
|
||||
text-align:center;
|
||||
width: 70px;
|
||||
}
|
||||
td {
|
||||
background-color:#e8ecf1;
|
||||
cursor: help;
|
||||
height: 44px;
|
||||
vertical-align: top;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 9px;
|
||||
color: #37474F;
|
||||
}
|
||||
|
||||
.allday {
|
||||
font-size: 12px;
|
||||
float:left;
|
||||
width:100%;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.am, .ap {
|
||||
font-size: 12px;
|
||||
float:left;
|
||||
width:50%;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.astreinte {
|
||||
font-size: 11px;
|
||||
float:left;
|
||||
width:100%;
|
||||
height:12px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
{% if fgprint is defined and fgprint %}<h1>Synthèse</h1>{%endif%}
|
||||
{% for user in users %}
|
||||
{% set nbday=1 %}
|
||||
|
||||
<div class="card homecard" style="width:380px;">
|
||||
<div class="card-header">
|
||||
<img src="\{{appAlias}}\uploads\avatar\{{user.user.avatar}}" class='avatar no-print'>
|
||||
{{ user.user.displayname }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table>
|
||||
<thead>
|
||||
<th>L</th>
|
||||
<th>M</th>
|
||||
<th>M</th>
|
||||
<th>J</th>
|
||||
<th>V</th>
|
||||
<th>S</th>
|
||||
<th>D</th>
|
||||
</thead>
|
||||
|
||||
{% for event in user.events %}
|
||||
{% if nbday==1 %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
|
||||
<td>
|
||||
<div class="date">{{ event.date | date("d/m") }}</div>
|
||||
{% if event.allday %}
|
||||
<div class='allday' style='background-color:{{ event.colorday }};' title='{{ event.descriptionday }}'>1</div>
|
||||
{% else %}
|
||||
{%if event.am %}
|
||||
<div class='am' style='background-color:{{ event.coloram }};' title='{{ event.descriptionam }}'>0.5</div>
|
||||
{% else %}
|
||||
<div class='am'></div>
|
||||
{% endif %}
|
||||
|
||||
{%if event.ap %}
|
||||
<div class='ap' style='background-color:{{ event.colorap }};' title='{{ event.descriptionap }}'>0.5</div>
|
||||
{% else %}
|
||||
<div class='ap'></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if event.astreinte %}
|
||||
<div class='astreinte' style='background-color:{{ event.colorastreinte }};' title='{{ event.descriptionastreinte }}'>*</div>
|
||||
{% else %}
|
||||
<div class='astreinte'></div>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{% set nbday=nbday+1 %}
|
||||
{% if nbday==8 %}
|
||||
</tr>
|
||||
{% set nbday=1 %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if (loop.index % 2) == 0 %} <div class="new-page"> </div> {% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function myprint() {
|
||||
document.location.href="{{path(app.request.attributes.get('_route'),{fgprint:true})}}";
|
||||
}
|
||||
{% endblock %}
|
70
src/schedule-2.0/templates/Service/edit.html.twig
Executable file
70
src/schedule-2.0/templates/Service/edit.html.twig
Executable file
@@ -0,0 +1,70 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if fgprint is defined and fgprint %}
|
||||
SERVICE
|
||||
{% elseif mode=="update" %}
|
||||
Modification SERVICE
|
||||
{% elseif mode=="submit" %}
|
||||
Création SERVICE
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_service') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_service_delete',{'id':service.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.description) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#service_name").focus();
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
70
src/schedule-2.0/templates/Service/list.html.twig
Normal file
70
src/schedule-2.0/templates/Service/list.html.twig
Normal file
@@ -0,0 +1,70 @@
|
||||
{% extends "base.html.twig" %}
|
||||
{% block localstyle %}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
SERVICES
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_service_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Services
|
||||
</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 no-print">Action</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for service in services %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_service_update",{id:service.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{service.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
82
src/schedule-2.0/templates/Task/edit.html.twig
Executable file
82
src/schedule-2.0/templates/Task/edit.html.twig
Executable file
@@ -0,0 +1,82 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if fgprint is defined and fgprint %}
|
||||
TACHE
|
||||
{% elseif mode=="update" %}
|
||||
Modification TACHE
|
||||
{% elseif mode=="submit" %}
|
||||
Création TACHE
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_task') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_task_delete',{'id':task.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.project) }}
|
||||
{{ form_row(form.nature) }}
|
||||
{{ form_row(form.quantity) }}
|
||||
{{ form_row(form.color) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#task_name").focus();
|
||||
|
||||
$("#task_color").spectrum(
|
||||
{
|
||||
type: "text",
|
||||
showAlpha: false
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
{% endblock %}
|
145
src/schedule-2.0/templates/Task/list.html.twig
Normal file
145
src/schedule-2.0/templates/Task/list.html.twig
Normal file
@@ -0,0 +1,145 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
td {
|
||||
padding:5px !important;
|
||||
}
|
||||
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
TACHES
|
||||
</h1>
|
||||
|
||||
<a class="btn btn-success" href={{ path('app_task_submit') }}>Ajouter</a>
|
||||
|
||||
<div class="custom-control custom-switch float-right">
|
||||
<input type="checkbox" class="custom-control-input" id="switchactive" {% if app.session.get('activeproject') %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="switchactive">Projet Actif</label>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
{%for service in services %}
|
||||
{% if not service.projects is empty %}
|
||||
{% set havetask=false %}
|
||||
{% set haveproject=false %}
|
||||
|
||||
{% for project in service.projects %}
|
||||
{% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %}
|
||||
{% if not project.tasks is empty %}
|
||||
{% set havetask=true %}
|
||||
{% endif %}
|
||||
|
||||
{% set haveproject=true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if haveproject and havetask %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> {{ service.name }}
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort no-print">Action</th>
|
||||
<th width="150px">Client</th>
|
||||
<th width="100px">Nature</th>
|
||||
<th width="100px">Projet</th>
|
||||
<th>Tâche</th>
|
||||
<th width="100px" class="text-center no-string">Estimation</th>
|
||||
<th width="100px" class="text-center no-string">Validé</th>
|
||||
<th width="100px" class="text-center no-string">Planifié</th>
|
||||
<th width="100px" class="text-center no-string">Reste</th>
|
||||
<th width="70px" class="text-center no-sort">Couleur</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for project in service.projects %}
|
||||
{% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %}
|
||||
{% for task in project.tasks %}
|
||||
{% set totvalidate=task.validate %}
|
||||
{% set totplanified=task.validate %}
|
||||
{% for event in task.events %}
|
||||
{% set totplanified=totplanified+event.duration %}
|
||||
{% if event.validate %}
|
||||
{% set totvalidate=totvalidate+event.duration %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for penalty in task.penaltys %}
|
||||
{% set totplanified=totplanified+penalty.duration %}
|
||||
{% if penalty.validate %}
|
||||
{% set totvalidate=totvalidate+penalty.duration %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_task_update",{id:task.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{task.project.customer.name}}</td>
|
||||
<td>{{task.nature.name}}</td>
|
||||
<td>{{task.project.name}}</td>
|
||||
<td>{{task.name}}</td>
|
||||
<td class="text-right">{{task.quantity|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-right">{{(totvalidate*-1)|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-right">{{((totplanified-totvalidate)*-1)|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-right">{{(task.quantity-totplanified)|number_format(2, '.', ' ')}}</td>
|
||||
<td class="text-center" style="background-color:{{task.color}}; color:#ffffff">{{task.color}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('.table ').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
$('#switchactive').change(function() {
|
||||
window.location="{{ path('app_task_activeproject' )}}";
|
||||
});
|
||||
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
145
src/schedule-2.0/templates/User/edit.html.twig
Executable file
145
src/schedule-2.0/templates/User/edit.html.twig
Executable file
@@ -0,0 +1,145 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if fgprint is defined and fgprint %}
|
||||
UTILISATEUR
|
||||
{% elseif 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 %}
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_user_delete',{'id':user.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="no-print" style="width:90px; margin:auto;">
|
||||
{% set avatar= "noavatar.png" %}
|
||||
{% if user.avatar %}
|
||||
{% set avatar= user.avatar %}
|
||||
{% endif %}
|
||||
<img id="user_avatar_img" src="/{{ appAlias }}/uploads/avatar/{{ avatar }}" class="avatar big" >
|
||||
{{ form_widget(form.avatar) }}
|
||||
<a class="btn btn-info" style="width:100%; margin-bottom:15px;" onClick="showModal();" title='Ajouter un avatar'>Modifier</a>
|
||||
</div>
|
||||
|
||||
<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.username) }}
|
||||
{% if form.password is defined %}
|
||||
{{ form_row(form.password) }}
|
||||
{%endif%}
|
||||
{{ form_row(form.lastname) }}
|
||||
{{ form_row(form.firstname) }}
|
||||
{{ form_row(form.email) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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.service) }}
|
||||
{{ form_row(form.jobs) }}
|
||||
|
||||
{% if form.roles is defined %}
|
||||
{{ form_row(form.roles) }}
|
||||
{%endif%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
<div id="extraLargeModal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="frameModal" frameborder=0 width="100%" height="700px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% 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(){
|
||||
console.log("la");
|
||||
var imgSrc = $(this).attr('src');
|
||||
if(imgSrc!="/{{appAlias}}/uploads/avatar/")
|
||||
$(this).attr('src',imgSrc);
|
||||
});
|
||||
|
||||
function showModal() {
|
||||
$("#frameModal").attr("src","{{path("app_crop01")}}");
|
||||
$("#extraLargeModal").modal("show");
|
||||
}
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
{% endblock %}
|
106
src/schedule-2.0/templates/User/list.html.twig
Normal file
106
src/schedule-2.0/templates/User/list.html.twig
Normal file
@@ -0,0 +1,106 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
UTILISATEURS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_user_submit') }}>Ajouter</a></p>
|
||||
|
||||
<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 no-print">Action</th>
|
||||
<th width="70px" class="no-sort no-print">Avatar</th>
|
||||
<th>Login</th>
|
||||
<th>Prénom</th>
|
||||
<th>Nom</th>
|
||||
<th>Rôles</th>
|
||||
<th>Service</th>
|
||||
<th>Métiers</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_user_update",{id:user.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td class="no-print"><img id="user_avatar_img" src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" 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_VALIDATOR" %}
|
||||
Valideur<br>
|
||||
{%elseif role=="ROLE_MASTER" %}
|
||||
Master<br>
|
||||
{%elseif role=="ROLE_USER" %}
|
||||
Intervenant<br>
|
||||
{%elseif role=="ROLE_VISITOR" %}
|
||||
Invité<br>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% if user.service %}
|
||||
{{ user.service.name }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% for job in user.jobs %}
|
||||
{{ job.type }} - {{ job.name }}<br>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
215
src/schedule-2.0/templates/Validation/validation.html.twig
Normal file
215
src/schedule-2.0/templates/Validation/validation.html.twig
Normal file
@@ -0,0 +1,215 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
.homecard {
|
||||
margin: 20px 20px 0px 0px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
table {
|
||||
|
||||
}
|
||||
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
color: #ffffff;
|
||||
background-color:#37474F;
|
||||
text-align:center;
|
||||
width: 70px;
|
||||
}
|
||||
td {
|
||||
background-color:#e8ecf1;
|
||||
cursor: help;
|
||||
height: 44px;
|
||||
vertical-align: top;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 9px;
|
||||
color: #37474F;
|
||||
}
|
||||
|
||||
.allday {
|
||||
font-size: 12px;
|
||||
float:left;
|
||||
width:100%;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.am, .ap {
|
||||
font-size: 12px;
|
||||
float:left;
|
||||
width:50%;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.astreinte {
|
||||
font-size: 11px;
|
||||
float:left;
|
||||
width:100%;
|
||||
height:12px;
|
||||
}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
{% if fgprint is defined and fgprint %}<h1>Validation</h1>{%endif%}
|
||||
{% for user in users %}
|
||||
{% set nbday=1 %}
|
||||
|
||||
<div class="card homecard" style="width:380px;">
|
||||
<div class="card-header">
|
||||
<img src="\{{appAlias}}\uploads\avatar\{{user.user.avatar}}" class='avatar no-print'>
|
||||
{{ user.user.displayname }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table>
|
||||
<thead>
|
||||
<th class="no-print"></th>
|
||||
<th>L</th>
|
||||
<th>M</th>
|
||||
<th>M</th>
|
||||
<th>J</th>
|
||||
<th>V</th>
|
||||
<th>S</th>
|
||||
<th>D</th>
|
||||
</thead>
|
||||
|
||||
{% set btnvalidate=false %}
|
||||
{% for event in user.events %}
|
||||
{% if nbday==1 %}
|
||||
<tr id="{{user.user.id}}-{{event.date|date("Ymd")}}"}">
|
||||
<td class="no-print" style="vertical-align:middle">
|
||||
{% if event.validate %}
|
||||
<i class="fa fa-thumbs-down devalidate-{{user.user.id}}" onClick="devalidate({{user.user.id}},'{{event.date|date("Ymd")}}','{{event.date|date("m/d/Y")}}')" style="cursor:pointer; color:red;"></i>
|
||||
{%else%}
|
||||
<i class="fa fa-thumbs-up validate-{{user.user.id}}" onClick="validate({{user.user.id}},'{{event.date|date("Ymd")}}','{{event.date|date("m/d/Y")}}')" style="cursor:pointer; color:green;{% if btnvalidate %}display:none{% endif %}"></i>
|
||||
{% set btnvalidate=true %}
|
||||
{%endif%}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td>
|
||||
<div class="date">{{ event.date | date("d/m") }}</div>
|
||||
{% if event.allday %}
|
||||
<div class='allday' style='background-color:{{ event.colorday }};' title='{{ event.descriptionday }}'>1</div>
|
||||
{% else %}
|
||||
{%if event.am %}
|
||||
<div class='am' style='background-color:{{ event.coloram }};' title='{{ event.descriptionam }}'>0.5</div>
|
||||
{% else %}
|
||||
<div class='am'></div>
|
||||
{% endif %}
|
||||
|
||||
{%if event.ap %}
|
||||
<div class='ap' style='background-color:{{ event.colorap }};' title='{{ event.descriptionap }}'>0.5</div>
|
||||
{% else %}
|
||||
<div class='ap'></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if event.astreinte %}
|
||||
<div class='astreinte' style='background-color:{{ event.colorastreinte }};' title='{{ event.descriptionastreinte }}'>*</div>
|
||||
{% else %}
|
||||
<div class='astreinte'></div>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{% set nbday=nbday+1 %}
|
||||
{% if nbday==8 %}
|
||||
</tr>
|
||||
{% set nbday=1 %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% if (loop.index % 2) == 0 %} <div class="new-page"> </div> {% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
resizePanel();
|
||||
});
|
||||
|
||||
$( window ).resize(function() {
|
||||
resizePanel();
|
||||
});
|
||||
|
||||
function printPage(pdf,pdfName,options,lstPage,cpt) {
|
||||
pdf.addHTML($("#content h1"), 10, 10, options, function(){
|
||||
pdf.addHTML(lstPage[cpt], 0, 40, options, function(){
|
||||
cpt=cpt+1;
|
||||
if(cpt>=lstPage.length) {
|
||||
$("#page-wrapper").first("row").css("width","initial");
|
||||
}
|
||||
else {
|
||||
pdf.addPage();
|
||||
printPage(pdf,pdfName,options,lstPage,cpt);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function myprint() {
|
||||
document.location.href="{{path(app.request.attributes.get('_route'),{fgprint:true})}}";
|
||||
}
|
||||
|
||||
function resizePanel() {
|
||||
maxheight=0;
|
||||
$( ".homecard" ).each(function( index ) {
|
||||
if($(this).height()>maxheight)
|
||||
maxheight=$(this).height();
|
||||
});
|
||||
$( ".homecard" ).height(maxheight);
|
||||
}
|
||||
|
||||
|
||||
function validate(iduser,idday,day) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iduser: iduser,
|
||||
day: day,
|
||||
},
|
||||
url: "{{ path('app_validation_validate') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
alert(response.error);
|
||||
}
|
||||
else {
|
||||
$(".devalidate-"+iduser).remove();
|
||||
html="<i class=\"fa fa-thumbs-down devalidate-"+iduser+"\" onClick=\"devalidate("+iduser+",'"+idday+"','"+day+"')\" style=\"cursor:pointer; color:red;\"></i>";
|
||||
$(".validate-"+iduser).first().replaceWith(html);
|
||||
$(".validate-"+iduser).first().show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function devalidate(iduser,idday,day) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iduser: iduser,
|
||||
day: day,
|
||||
},
|
||||
url: "{{ path('app_validation_devalidate') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
alert(response.error);
|
||||
}
|
||||
else {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,157 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
.homecard {width: 100% }
|
||||
{%endif%}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
VALIDATION CONGES
|
||||
</h1>
|
||||
|
||||
<div class="custom-control custom-switch float-right">
|
||||
<input type="checkbox" class="custom-control-input" id="switchactive" {% if app.session.get('activeholiday') %} checked {% endif %}>
|
||||
<label class="custom-control-label" for="switchactive">Congès à Valider</label>
|
||||
</div>
|
||||
<div style="height:30px;">
|
||||
{% if not app.session.get('activeholiday') %}
|
||||
On ne peut dévalider des congés que si la semaine de travail n'a pas été validée
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="card homecard">
|
||||
<div class="card-header">
|
||||
{% if not app.session.get('activeholiday') %}
|
||||
Congé à Dévalider
|
||||
{% else %}
|
||||
Congé à Valider
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<th class="no-print"></th>
|
||||
<th>Utilisateur</th>
|
||||
<th>Tâche</th>
|
||||
<th>Début</th>
|
||||
<th>Fin</th>
|
||||
<th>Durée</th>
|
||||
</thead>
|
||||
|
||||
{% for user in users %}
|
||||
{% for event in user.holidays %}
|
||||
<tr id="row-{{event.id}}">
|
||||
<td class="no-print" style="vertical-align:middle">
|
||||
{% if event.validateholiday %}
|
||||
<i class="fa fa-thumbs-down validate-{{user.user.id}}" onClick="devalidate({{event.id}})" style="cursor:pointer; color:red;"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-thumbs-up validate-{{user.user.id}}" onClick="validate({{event.id}})" style="cursor:pointer; color:green;"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ user.user.displayname }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ event.task }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ event.start|date("d/m/Y H:i") }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ event.end|date("d/m/Y H:i") }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ event.duration }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('.table ').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
function validate(id) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id: id,
|
||||
},
|
||||
url: "{{ path('app_validationholiday_validate') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
alert(response.error);
|
||||
}
|
||||
else {
|
||||
$("#row-"+id).remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function devalidate(id) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
id: id,
|
||||
},
|
||||
url: "{{ path('app_validationholiday_devalidate') }}",
|
||||
success: function (response) {
|
||||
response=JSON.parse(response);
|
||||
if(response.return=="KO") {
|
||||
alert(response.error);
|
||||
}
|
||||
else {
|
||||
$("#row-"+id).remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#switchactive').change(function() {
|
||||
window.location="{{ path('app_validationholiday_activeholiday' )}}";
|
||||
});
|
||||
|
||||
{% endblock %}
|
544
src/schedule-2.0/templates/base.html.twig
Normal file
544
src/schedule-2.0/templates/base.html.twig
Normal file
@@ -0,0 +1,544 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% set color = app.session.get('color') %}
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
|
||||
<title>{% block title %}{{ appName }}{% endblock %}</title>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
{% block head_style %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{% endblock head_style %}
|
||||
|
||||
{% block stylesheets %}{% endblock %}
|
||||
|
||||
<link rel="shortcut icon" href="/{{ appAlias }}/images/logo.png" />
|
||||
</head>
|
||||
|
||||
|
||||
<style>
|
||||
/* global */
|
||||
h1{
|
||||
padding: 40px 0px 9px 0px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.nav a{
|
||||
background: none;
|
||||
color: #CFD8DC;
|
||||
font-size: 14px;
|
||||
padding: 5px 0px 5px 25px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar Styles */
|
||||
.contentsidebar {
|
||||
margin-left:250px;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
left: 250px;
|
||||
width: 250px;
|
||||
height: 100%;
|
||||
margin-left: -250px;
|
||||
overflow-y: auto;
|
||||
background: #37474F;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
#sidebar header {
|
||||
background-color: #263238;
|
||||
font-size: 20px;
|
||||
line-height: 52px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sidebar header a {
|
||||
color: #fff;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#sidebar header a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#sidebar .nav{
|
||||
display: block;
|
||||
}
|
||||
|
||||
#sidebar .nav a {
|
||||
padding: 0px 10px 5px 10px;
|
||||
}
|
||||
|
||||
#sidebar .nav .last{
|
||||
border-bottom: 5px solid #455A64;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
|
||||
#sidebar .title {
|
||||
color: #CFD8DC;
|
||||
font-size: 16px;
|
||||
padding: 0px 10px 0px 10px;
|
||||
display: block;
|
||||
text-transform: uppercase;
|
||||
margin-left: 0px !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#sidebar .nav .last{
|
||||
border-bottom: 5px solid #455A64;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
|
||||
#sidebar .nav a:hover{
|
||||
background: none;
|
||||
color: #ECEFF1;
|
||||
}
|
||||
|
||||
#sidebar .nav a .fa{
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#sidebar .nav .select-control {
|
||||
padding: 0px 10px 5px 10px;
|
||||
margin-top: -12px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
background-color: #343a40;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border-radius: 100%;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
.avatar.big{
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.contentsidebar {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
position: static;
|
||||
margin:0px -15px;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
a.btn {
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
#sidebar {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
{% if useheader is defined and useheader %}
|
||||
#main {
|
||||
padding-top:55px;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
||||
th.dt-center, td.dt-center { text-align: center; }
|
||||
|
||||
|
||||
.new-page {display:none;}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
.no-print {display:none}
|
||||
|
||||
.new-page {
|
||||
clear: both;
|
||||
display: block;
|
||||
border :1px solid transparent;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
#sidebar,.navbar,.sf-toolbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mycontent{
|
||||
margin:0px;
|
||||
//width:800px;
|
||||
}
|
||||
|
||||
#main{
|
||||
margin:0px;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.homecard {
|
||||
display:inline-block;
|
||||
float:none;
|
||||
}
|
||||
{% endif %}
|
||||
{% block localstyle %}
|
||||
|
||||
{% endblock %}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
{% 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="/{{appAlias}}/images/logo.png" style="height:30px;margin-top:-3px;">
|
||||
{{appName}}
|
||||
</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="navbar-nav">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
{% if app.user %}
|
||||
<li>
|
||||
<a href="{{path("app_user_profil")}}">
|
||||
<img src="\{{appAlias}}\uploads\avatar\{{app.user.avatar}}" class="avatar">
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% set routeignore = ["app_home","app_event","app_customer_submit","app_project_submit","app_offer_submit","app_task_submit","app_service_submit","app_user_submit","app_nature_submit","app_nature_update","app_job_submit","app_breakday_submit","app_breakday_update"] %}
|
||||
{% if app.request.attributes.get('_route') not in routeignore %}
|
||||
<li>
|
||||
<a onClick="myprint()" style="cursor:pointer"><i class="fa fa-print fa-fw"></i></a>
|
||||
</li>
|
||||
{%endif%}
|
||||
|
||||
<li>
|
||||
{% if app.user %}
|
||||
{% if appAuth=="MYSQL" %}
|
||||
<a href="{{path("app_logout")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
|
||||
{% elseif appAuth=="CAS" %}
|
||||
<a href="{{path("app_logoutcas")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if appAuth=="MYSQL" %}
|
||||
<a href="{{path("app_login")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
|
||||
{% elseif appAuth=="CAS" %}
|
||||
<a href="{{path("app_logincas")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<main id="main" class="container-fluid">
|
||||
{% set contentsidebar="" %}
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
{% set contentsidebar="contentsidebar" %}
|
||||
|
||||
<div id="sidebar" class="collapse">
|
||||
<ul class="nav">
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_VALIDATOR') or is_granted('ROLE_MASTER') or is_granted('ROLE_USER') %}
|
||||
<p></p>
|
||||
<li>
|
||||
<a>
|
||||
<label class="control-label">
|
||||
Nombre de Mois
|
||||
</label>
|
||||
</a>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sidemonth" name="sidemonth">
|
||||
{% set selected="" %}
|
||||
{% for i in 1..48 %}
|
||||
{% set selected="" %}
|
||||
{%if i==app.session.get('nbmonth') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{i}}" {{selected}}>{{i}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<a>
|
||||
<label class="control-label">
|
||||
Intervenant
|
||||
</label>
|
||||
</a>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sideuser" name="sideuser">
|
||||
<option value="all" selected>Tout le monde</option>
|
||||
{% for user in app.session.get('users') %}
|
||||
{% set selected="" %}
|
||||
{%if user.id==app.session.get('iduser') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{user.id}}" {{selected}}>{{user.displayname}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<a>
|
||||
<label class="control-label">
|
||||
Projet
|
||||
</label>
|
||||
</a>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sideproject" name="sideproject">
|
||||
<option value="all" selected>Tout les projets</option>
|
||||
{% for project in app.session.get('projects') %}
|
||||
{% set selected="" %}
|
||||
{%if project.id==app.session.get('idproject') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{project.id}}" {{selected}}>{{project.displayname}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<a>
|
||||
<label class="control-label">
|
||||
Service
|
||||
</label>
|
||||
</a>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sideservice" name="sideservice">
|
||||
<option value="all" selected>Tout les services</option>
|
||||
{% for service in app.session.get('services') %}
|
||||
{% set selected="" %}
|
||||
{%if service.id==app.session.get('idservice') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{service.id}}" {{selected}}>{{service.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="last"></li>
|
||||
|
||||
<li class="title">Planning</li>
|
||||
<li>
|
||||
<a href="{{path("app_synthese")}}">
|
||||
<i class="fa fa-id-card"></i>Synthese
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_planning")}}">
|
||||
<i class="fa fa-tachometer-alt"></i>Planning
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_report")}}">
|
||||
<i class="fa fa-pen-square"></i>Rapport
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_event")}}">
|
||||
<i class="fa fa-calendar-alt"></i>Calendrier
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_holiday")}}">
|
||||
<i class="fa fa-cocktail"></i>Mes Congés
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_VALIDATOR') %}
|
||||
<li class="title">Validations</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_validation")}}">
|
||||
<i class="fa fa-user"></i>Validation
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_validationholiday")}}">
|
||||
<i class="fa fa-suitcase"></i>Validation Congés
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MASTER') %}
|
||||
<li class="title">Projets</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_customer")}}">
|
||||
<i class="fa fa-user"></i>Clients
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_project")}}">
|
||||
<i class="fa fa-suitcase"></i>Projets
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_offer")}}">
|
||||
<i class="fa fa-euro-sign"></i>Propositions
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_task")}}">
|
||||
<i class="fa fa-tasks"></i>Tâches
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<li class="title">Organisation</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_service")}}">
|
||||
<i class="fa fa-building"></i>Services
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_user")}}">
|
||||
<i class="fa fa-users"></i>Utilisateurs
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_nature")}}">
|
||||
<i class="fa fa-folder"></i>Natures
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_job")}}">
|
||||
<i class="fa fa-clipboard-list"></i>Métiers
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_breakday")}}">
|
||||
<i class="fa fa-gifts"></i>Jours Fériés
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{%endif%}
|
||||
|
||||
|
||||
<div id="mycontent" class="content {{contentsidebar}}">
|
||||
{% block body %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
|
||||
{% block localexternalscript %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var doit = true;
|
||||
|
||||
$("a[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
doit = confirm($(this).data('confirm'));
|
||||
if(!doit) return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sidemonth').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
console.log(data.id);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
nbmonth: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectmonth') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideuser').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iduser: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectuser') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideproject').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idproject: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectproject') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideservice').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idservice: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectservice') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
{% block localjavascript %}
|
||||
|
||||
{% endblock %}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user