mise en place des budgets
This commit is contained in:
@@ -10,15 +10,40 @@
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
.group td{
|
||||
font-size:120%;
|
||||
text-transform: uppercase;
|
||||
background-color:#212529;
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
.total td{
|
||||
font-size:120%;
|
||||
background-color:#cdcdcd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
BUDGET
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_year_submit') }}>Ajouter</a></p>
|
||||
</h1>
|
||||
|
||||
<div class="form-group ">
|
||||
<label class="control-label" for="project_active">Exercice</label>
|
||||
|
||||
<select id="exercice" class="form-control">
|
||||
{% for year in years %}
|
||||
{% set selected=""%}
|
||||
{% if year.id==n2.id%}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{year.id}}" {{selected}}>{{year.start|date("m/Y")}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Budget
|
||||
@@ -26,7 +51,7 @@ BUDGET
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<table class="table table-bordered" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan=2>Domaine</th>
|
||||
@@ -35,10 +60,10 @@ BUDGET
|
||||
<th class="text-center" style="width:150px" colspan=3>{{n2.start|date("m/Y")}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="20px" class="no-sort no-print" rowspan=2></th>
|
||||
<th width="20px" class="no-sort no-print"></th>
|
||||
<th class="text-center" style="width:150px">Réel</th>
|
||||
<th class="text-center" style="width:150px">Budget</th>
|
||||
<th width="20px" class="no-sort no-print" rowspan=2></th>
|
||||
<th width="20px" class="no-sort no-print"></th>
|
||||
<th class="text-center" style="width:150px">Réel</th>
|
||||
<th class="text-center" style="width:150px">Budget</th>
|
||||
</tr>
|
||||
@@ -117,7 +142,7 @@ BUDGET
|
||||
<td>Hors Projet</td>
|
||||
|
||||
<td class="text-center">
|
||||
<a href="{{path("app_budget_update",{type:"budget",id:domaine.id,year:n1.id})}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{path("app_budget_update",{type:"budget",id:domaine.id,year:n1.id,returnto:n2.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{(domaine.nbdayrealn1-nbdayrealn1)}} jours<br>
|
||||
@@ -133,7 +158,7 @@ BUDGET
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<a href="{{path("app_budget_update",{type:"budget",id:domaine.id,year:n2.id})}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{path("app_budget_update",{type:"budget",id:domaine.id,year:n2.id,returnto:n2.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{(domaine.nbdayrealn2-nbdayrealn2)}} jours<br>
|
||||
@@ -150,7 +175,7 @@ BUDGET
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<tr class="total">
|
||||
<td>{{domaine.name}}</td>
|
||||
<td>TOTAL</td>
|
||||
|
||||
@@ -192,7 +217,7 @@ BUDGET
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
var groupColumn = 1;
|
||||
var groupColumn = 0;
|
||||
var table = $('#dataTables').DataTable({
|
||||
"columnDefs": [
|
||||
{ "visible": false, "targets": groupColumn }
|
||||
@@ -207,7 +232,7 @@ BUDGET
|
||||
api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) {
|
||||
if ( last !== group ) {
|
||||
$(rows).eq( i ).before(
|
||||
'<tr class="group"><td colspan="6">'+group+'</td></tr>'
|
||||
'<tr class="group"><td colspan="7">'+group+'</td></tr>'
|
||||
);
|
||||
|
||||
last = group;
|
||||
@@ -226,6 +251,13 @@ BUDGET
|
||||
table.order( [ groupColumn, 'asc' ] ).draw();
|
||||
}
|
||||
} );
|
||||
|
||||
$('#exercice').change(function() {
|
||||
id=$(this).val();
|
||||
url="{{ path('app_budget',{id:'xxx'}) }}";
|
||||
url=url.replace("xxx",id);
|
||||
document.location=url;
|
||||
});
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
|
Reference in New Issue
Block a user