Ajout de la notion de domaine (fixes #72)
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
PROJETS
|
||||
PROJETS {% if app.session.get('viewservice') %} PAR ACTVITE{%else%} PAR DOMAINE{%endif%}
|
||||
</h1>
|
||||
|
||||
<a class="btn btn-success" href={{ path('app_project_submit') }}>Ajouter</a>
|
||||
@@ -29,13 +29,28 @@
|
||||
<label class="custom-control-label" for="switchactive">Projet Actif</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch float-right mr-3">
|
||||
<input type="checkbox" class="custom-control-input" id="switchservice" {% if app.session.get('viewservice') %} checked {% endif %}>
|
||||
{% if app.session.get('viewservice') %}
|
||||
<label class="custom-control-label" for="switchservice">Vue par Activité</label>
|
||||
{% else %}
|
||||
<label class="custom-control-label" for="switchservice">Vue par Domaine</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
|
||||
{%for service in services %}
|
||||
{% if not service.projects is empty %}
|
||||
{% if app.session.get('viewservice') %}
|
||||
{% set loop01s=services %}
|
||||
{% else %}
|
||||
{% set loop01s=domaines %}
|
||||
{% endif %}
|
||||
|
||||
{%for loop01 in loop01s %}
|
||||
{% if not loop01.projects is empty %}
|
||||
{% set haveproject=false %}
|
||||
|
||||
{% for project in service.projects %}
|
||||
{% for project in loop01.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 %}
|
||||
@@ -44,7 +59,7 @@
|
||||
{% if haveproject %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> {{ service.name }}
|
||||
<i class="fa fa-table fa-fw"></i> {{ loop01.name }}
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
@@ -53,8 +68,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort no-print">Action</th>
|
||||
<th width="300px">Client</th>
|
||||
<th width="200px">Client</th>
|
||||
<th>Nom</th>
|
||||
<th width="200px">{% if app.session.get('viewservice') %}Domaine{%else%}Activité{%endif%}</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>
|
||||
@@ -64,7 +80,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for project in service.projects %}
|
||||
{% for project in loop01.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">
|
||||
@@ -79,6 +95,7 @@
|
||||
</td>
|
||||
<td>{{project.customer.name}}</td>
|
||||
<td>{{project.name}}</td>
|
||||
<td>{% if app.session.get('viewservice') %}{%if not project.domaine is empty %}{{project.domaine.name}}{%endif%}{%else%}{{project.service.name}}{%endif%}</td>
|
||||
<td class="text-right">
|
||||
{% set tottask=0 %}
|
||||
{% set totvalidate=0 %}
|
||||
@@ -155,6 +172,10 @@
|
||||
window.location="{{ path('app_project_activeproject' )}}";
|
||||
});
|
||||
|
||||
$('#switchservice').change(function() {
|
||||
window.location="{{ path('app_project_viewservice' )}}";
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
|
Reference in New Issue
Block a user