165 lines
5.1 KiB
Twig
165 lines
5.1 KiB
Twig
|
{% 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 %}
|