Compare commits

..

23 Commits

Author SHA1 Message Date
6bba1d3529 Merge branch 'master' into dist/eole/2.7.2/master 2022-03-14 14:21:08 +01:00
8afdd8c4d3 Merge branch 'master' into dist/eole/2.7.2/master 2022-02-14 10:00:06 +01:00
49dbeedaec Merge branch 'master' into dist/eole/2.7.2/master 2021-11-23 15:22:40 +01:00
0cae27c5b7 Merge branch 'master' into dist/eole/2.7.2/master 2021-11-22 11:26:19 +01:00
11026cc2cc Merge branch 'master' into dist/eole/2.7.2/master 2021-06-16 10:35:56 +02:00
2f531378ba Merge branch 'master' into dist/eole/2.7.2/master 2021-06-15 09:19:32 +02:00
ebe2a09c30 Merge branch 'master' into dist/eole/2.7.2/master 2021-05-03 10:01:28 +02:00
00a55a9e67 Merge branch 'master' into dist/eole/2.7.2/master 2021-03-08 10:26:07 +01:00
349f5c26e7 Merge branch 'master' into dist/eole/2.7.2/master 2021-03-05 14:29:21 +01:00
18d993f307 Merge branch 'master' into dist/eole/2.7.2/master 2021-03-05 10:24:51 +01:00
f8b4d0446d Merge branch 'master' into dist/eole/2.7.2/master 2021-03-03 16:16:59 +01:00
b14fc3d0e1 Merge branch 'master' into dist/eole/2.7.2/master 2021-03-03 14:55:03 +01:00
697c7a8f1c Merge branch 'dist/eole/2.7.2/master' of https://forge.cadoles.com/Cadoles/schedule into dist/eole/2.7.2/master 2021-02-04 16:17:23 +01:00
24ecd6c87e Merge branch 'master' into dist/eole/2.7.2/master 2021-02-04 16:17:18 +01:00
b17024cccd Merge branch 'master' into dist/eole/2.7.2/master 2021-01-28 12:15:43 +01:00
a0b87b907f Merge branch 'master' into dist/eole/2.7.2/master 2020-11-13 10:20:38 +01:00
dfa5a993ce Merge branch 'master' into dist/eole/2.7.2/master 2020-11-13 09:30:06 +01:00
937ec6f4ca Merge branch 'master' into dist/eole/2.7.2/master 2020-09-29 08:58:50 +02:00
7e988ff7a9 Merge branch 'master' into dist/eole/2.7.0/master 2020-09-23 09:15:06 +02:00
c66962097d Merge branch 'master' into dist/eole/2.7.0/master 2020-09-22 14:32:26 +02:00
db11d66ae0 Merge branch 'master' into dist/eole/2.7.0/master 2020-05-13 14:06:01 +02:00
2d42e3016d Merge branch 'master' into dist/eole/2.7.0/master 2020-05-12 11:35:36 +02:00
ba4acc1b89 ajout repertoire debian 2020-05-12 09:49:53 +02:00
20 changed files with 184 additions and 213 deletions

1
debian/compat vendored Normal file
View File

@@ -0,0 +1 @@
7

24
debian/control vendored Normal file
View File

@@ -0,0 +1,24 @@
Source: eole-schedule
Section: web
Priority: optional
Maintainer: Cadoles <contact@cadoles.com>
Build-Depends: debhelper (>= 7.0.50)
Standards-Version: 3.8.4
Homepage: https://forge.cadoles.com/Cadoles/schedule
Vcs-Git: https://forge.cadoles.com/Cadoles/schedule
Vcs-Browser: https://forge.cadoles.com/Cadoles/schedule
Package: schedule-sso
Architecture: all
Depends: ${misc:Depends}, eole-sso
Description: Filtre SSO pour schedule "EOLE".
Package: eole-schedule
Architecture: all
Depends: ${misc:Depends}, eole-envole-dependances, schedule-sso
Description: Eolisation de l'application schedule.
Package: schedule-apps
Architecture: all
Depends: ${misc:Depends}, envole-dependances-apps
Description: Sources pour schedule "EOLE".

44
debian/copyright vendored Normal file
View File

@@ -0,0 +1,44 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: {PROJECT}
Source: {URL}
Files: *
Copyright: YEAR {UPSTREAM} {AUTHOR} <{MAIL}>
License: {UPSTREAM LICENSE}
Files: debian/*
Copyright: 2012 Équipe EOLE <eole@ac-dijon.fr>
License: CeCILL-2
License: {UPSTREAM LICENSE}
{TEXT OF THE LICENSE}
License: CeCILL-2
This software is governed by the CeCILL-2 license under French law and
abiding by the rules of distribution of free software. You can use,
modify and or redistribute the software under the terms of the CeCILL-2
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info";.
.
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL-2 license and that you accept its terms.
.
On Eole systems, the complete text of the CeCILL-2 License can be found
in '/usr/share/common-licenses/CeCILL-2-en'.

1
debian/eole-schedule.install vendored Normal file
View File

@@ -0,0 +1 @@
usr/share/eole

3
debian/gbp.conf vendored Normal file
View File

@@ -0,0 +1,3 @@
# Set per distribution debian tag
[DEFAULT]
debian-tag = debian/envole/%(version)s

8
debian/rules vendored Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@

1
debian/schedule-apps.install vendored Normal file
View File

@@ -0,0 +1 @@
var/www/html

1
debian/schedule-sso.install vendored Normal file
View File

@@ -0,0 +1 @@
usr/share/sso

1
debian/source/format vendored Normal file
View File

@@ -0,0 +1 @@
3.0 (native)

View File

@@ -6,10 +6,8 @@
<containers>
<container name='web'>
<!--
<package>schedule-apps</package>
-->
<package>schedule-apps</package>
<!-- service de configuration apache -->
<service method="apache" servicelist="schedule">schedule</service>

View File

@@ -51,10 +51,7 @@
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"allow-plugins": {
"symfony/flex": true
}
"sort-packages": true
},
"autoload": {
"psr-4": {
@@ -75,9 +72,6 @@
"symfony/polyfill-php56": "*"
},
"scripts": {
"pre-install-cmd": [
"php scripts/checkcomposer.php"
],
"auto-scripts": {
"cache:clear": "symfony-cmd",
"cache:clear --env=prod": "symfony-cmd",

View File

@@ -1,13 +0,0 @@
<?php
$requiredVersion = 'version 1'; // La version interdite
$composerVersion = trim(shell_exec('COMPOSER_ALLOW_SUPERUSER=1 composer --version --no-ansi'));
echo $composerVersion."\n";
if (stripos($composerVersion,$requiredVersion)===false ) {
echo "La version de Composer $requiredVersion n'est pas autorisée" . PHP_EOL;
echo "Veuillez mettre à jour Composer avec 'composer self-update --1'." . PHP_EOL;
echo "Ou executez le scripts/reconfigure.sh" . PHP_EOL;
exit(1); // Quitte avec un code d'erreur
}

View File

@@ -6,13 +6,12 @@ cd /var/www/html/schedule
. scripts/proxy.sh
# Mise en place du fichier d'environnement model
yes 2>/dev/null | cp /var/www/html/schedule/scripts/.env.model $DIR/.env
if [ ! -f /var/www/html/schedule/.env ]; then
mv /var/www/html/schedule/scripts/.env.model /var/www/html/schedule/.env
fi
# Installation des dépendances composer
echo COMPOSER = Install
export COMPOSER_ALLOW_SUPERUSER=1
composer self-update --1 --quiet
composer install --quiet
composer install
php bin/console app:AppInit --env=prod
php bin/console app:CronInit --env=prod

View File

@@ -174,13 +174,7 @@ class EventController extends AbstractController
// Astreinte
if($astreinte) {
// Une astreinte ne peut-etre un congès
if($task->getNature()->getIsvacation()) {
$output=["return"=>"KO","error"=>"Une astreinte ne peut être de nature congès","start"=>$datestart,"end"=>$dateend,"events"=>null];
return new Response(json_encode($output));
}
// On regarde si une astreinte ne commence pas pendant une autre astreinte ou qui se termine pendant une autre astreinte ou qui a une astreinte compris dans ses dates
// On regarde si une tache ne commence pas pendant une autre intervention ou qui se termine pendant une autre intervention ou qui a une intervention compris dans ses dates
$penaltys = $em->createQueryBuilder('penalty')
->select('penalty')
->from('App:Penalty','penalty')
@@ -205,42 +199,6 @@ class EventController extends AbstractController
return new Response(json_encode($output));
}
// On regarde si un évenement ne commence pas pendant un autre évenement ou qui se termine pendant un autre évenement ou qui a un évenement compris dans ses dates
$events = $em->createQueryBuilder('event')
->select('event')
->from('App:Event','event')
->Where('event.user=:user AND event.start<=:start AND event.end >:start')
->orWhere('event.user=:user AND event.start<:end AND event.end >=:end')
->orWhere('event.user=:user AND event.start>:start AND event.end <:end')
->setParameter('user',$iduser)
->setParameter('start',$datestart)
->setParameter('end',$dateend)
->getQuery()->getResult();
if($events) {
$tbevent=[];
$validate=false;
$holiday=false;
foreach($events as $event) {
$tmp=[
"id" => $event->getId(),
"start" => $event->getStart(),
"end" => $event->getEnd(),
];
array_push($tbevent,$tmp);
if($event->getValidate()) $validate=true;
if($event->getTask()->getNature()->getIsvacation()) $holiday=true;
}
if($validate) {
$output=["return"=>"KO","error"=>"Cet intervant a sa semaine de validé","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
elseif($holiday) {
$output=["return"=>"KO","error"=>"Cet intervant a posé des congés sur cette période","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
}
// Création de l'astreinte
$penalty = new Penalty();
$penalty->setStart($datestart);
@@ -274,8 +232,6 @@ class EventController extends AbstractController
->getQuery()->getResult();
if($events) {
$tbevent=[];
$validate=false;
$holiday=false;
foreach($events as $event) {
$tmp=[
"id" => $event->getId(),
@@ -283,26 +239,9 @@ class EventController extends AbstractController
"end" => $event->getEnd(),
];
array_push($tbevent,$tmp);
if($event->getValidate()) $validate=true;
if($event->getTask()->getNature()->getIsvacation()) $holiday=true;
}
if(!$this->isGranted('ROLE_ADMIN')&&!$this->isGranted('ROLE_MASTER')) {
$output=["return"=>"KO","error"=>"Cet intervant a déjà une tache à cette date","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
elseif($validate) {
$output=["return"=>"KO","error"=>"Cet intervant a sa semaine de validé","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
elseif($holiday) {
$output=["return"=>"KO","error"=>"Cet intervant a posé des congés sur cette période","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
elseif($task->getNature()->getIsvacation()) {
$output=["return"=>"KO","error"=>"Vous ne pouvez pas poser de congés à cette date, une intervention y est déjà plannifiée","start"=>$datestart,"end"=>$dateend,"events"=>null];
return new Response(json_encode($output));
}
$output=["return"=>"KO","error"=>"Cet intervant a déjà une tache à cette date","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
// On regarde si un jour férié ne commence pas pendant une autre intervention ou qui se termine pendant une autre intervention ou qui a une intervention compris dans ses dates
@@ -349,7 +288,7 @@ class EventController extends AbstractController
$idevent=$event->getId();
//$valid_url = $this->generateUrl('app_validationholiday',[],true);
$valid_url = $this->router->generate('app_validationholiday', [], urlGeneratorInterface::ABSOLUTE_URL);
// $this->notificator->sendNotifAttenteValid("Congés en attente de validation", $iduser, $idevent, $valid_url);
$this->notificator->sendNotifAttenteValid("Congés en attente de validation", $iduser, $idevent, $valid_url);
}
@@ -389,12 +328,6 @@ class EventController extends AbstractController
// Astreinte
if($fgastreinte) {
// Une astreinte ne peut-etre un congès
if($task->getNature()->getIsvacation()) {
$output=["return"=>"KO","error"=>"Une astreinte ne peut être de nature congès"];
return new Response(json_encode($output));
}
// Recherche de l'event
$penalty = $em->getRepository("App:Penalty")->find($idevent);
if(!$penalty) {
@@ -461,7 +394,6 @@ class EventController extends AbstractController
$dateend->SetTime(17,0,0);
}
}
// On regarde si une tache ne commence pas pendant une autre intervention ou qui se termine pendant une autre intervention ou qui a une intervention compris dans ses dates
$events = $em->createQueryBuilder('event')
->select('event')
@@ -475,9 +407,6 @@ class EventController extends AbstractController
->getQuery()->getResult();
if($events) {
$tbevent=[];
$validate=false;
$holiday=false;
foreach($events as $ev) {
if ($event->getId() != $ev->getId()) {
$tmp=[
@@ -487,28 +416,11 @@ class EventController extends AbstractController
"end" => $ev->getEnd(),
];
array_push($tbevent,$tmp);
if($ev->getValidate()) $validate=true;
if($ev->getTask()->getNature()->getIsvacation()) $holiday=true;
}
}
if (sizeof($tbevent)>0) {
if(!$this->isGranted('ROLE_ADMIN')&&!$this->isGranted('ROLE_MASTER')) {
$output=["return"=>"KO","error"=>"Cet intervant a déjà une tache à cette date","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
elseif($validate) {
$output=["return"=>"KO","error"=>"Cet intervant a sa semaine de validé","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
elseif($holiday) {
$output=["return"=>"KO","error"=>"Cet intervant a posé des congés sur cette période","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
elseif($task->getNature()->getIsvacation()) {
$output=["return"=>"KO","error"=>"Vous ne pouvez pas poser de congés à cette date, une intervention y est déjà plannifiée","start"=>$datestart,"end"=>$dateend,"events"=>null];
return new Response(json_encode($output));
}
$output=["return"=>"KO","error"=>"Cet intervant a déjà une tache à cette date","start"=>$datestart,"end"=>$dateend,"events"=>$tbevent];
return new Response(json_encode($output));
}
}

View File

@@ -53,7 +53,15 @@ class ReportController extends AbstractController
$tmp["events"][$idday] = [
"date"=>clone $start,
"events"=>[],
"allday"=>false,
"colorday"=>"",
"descriptionday"=>"",
"am"=>false,
"coloram"=>"",
"descriptionam"=>"",
"ap"=>false,
"colorap"=>"",
"descriptionap"=>"",
"astreinte"=>false,
"colorastreinte"=>"",
"descriptionastreinte"=>"",
@@ -91,16 +99,22 @@ class ReportController extends AbstractController
while($st<$event->getEnd()) {
$idday=$st->format("Ymd");
if($event->getAllday()) {
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>true,"colorday"=>$event->getTask()->getColor(),"descriptionday"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription()];
$tmp["events"][$idday]["allday"]=true;
$tmp["events"][$idday]["colorday"]=$event->getTask()->getColor();
$tmp["events"][$idday]["descriptionday"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
}
else {
// Matin ou après-midi ?
$time=$event->getStart()->format("H");
if($time==9) {
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>false,"am"=>true,"ap"=>false,"coloram"=>$event->getTask()->getColor(),"descriptionam"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription()];
$tmp["events"][$idday]["am"]=true;
$tmp["events"][$idday]["coloram"]=$event->getTask()->getColor();
$tmp["events"][$idday]["descriptionam"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
}
else {
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>false,"am"=>false,"ap"=>true,"colorap"=>$event->getTask()->getColor(),"descriptionap"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription()];
$tmp["events"][$idday]["ap"]=true;
$tmp["events"][$idday]["colorap"]=$event->getTask()->getColor();
$tmp["events"][$idday]["descriptionap"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
}
}
@@ -166,19 +180,18 @@ class ReportController extends AbstractController
$st=clone $breakday->getStart();
while($st<$breakday->getEnd()) {
$idday=$st->format("Ymd");
$tmp["events"][$idday]["events"][-2000]["allday"]=true;
$tmp["events"][$idday]["events"][-2000]["colorday"]="#6c7a89";
$tmp["events"][$idday]["events"][-2000]["descriptionday"]="Jour Férié";
$tmp["events"][$idday]["allday"]=true;
$tmp["events"][$idday]["colorday"]="#6c7a89";
$tmp["events"][$idday]["descriptionday"]="Jour Férié";
$st->add(new \DateInterval('P1D'));
}
}
array_push($tbevents,$tmp);
}
}
//dump($tbevents);
if($request->query->get('fgprint')) {
$render = $this->renderView('Report/synthese.html.twig',[
"useheader" => true,

View File

@@ -64,10 +64,14 @@ class RestController extends AbstractFOSRestController
}
// On formate le tableau de jour
$start=new \Datetime('2022-03-07 00:00');
$mini=new \Datetime('2022-03-07 00:00');
$start=new \Datetime('00:00');
$start->modify("monday this week");
$end=new \Datetime('00:00');
$end->modify("last day of this month");
$end->modify("next sunday");
$start->modify("previous month");
if($start<$mini) $start=clone $mini;
$events = $em
->createQueryBuilder('event')

View File

@@ -101,7 +101,16 @@ class ValidationController extends AbstractController
$tmp["events"][$idday] = [
"date"=>clone $start,
"events"=>[],
"allday"=>false,
"colorday"=>"",
"descriptionday"=>"",
"am"=>false,
"coloram"=>"",
"descriptionam"=>"",
"ap"=>false,
"colorap"=>"",
"descriptionap"=>"",
"validate"=>$validate,
"astreinte"=>false,
"colorastreinte"=>"",
"descriptionastreinte"=>"",
@@ -129,16 +138,22 @@ class ValidationController extends AbstractController
while($st<$event->getEnd()) {
$idday=$st->format("Ymd");
if($event->getAllday()) {
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>true,"colorday"=>$event->getTask()->getColor(),"descriptionday"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription(),"validate"=>$event->getValidate()];
}
$tmp["events"][$idday]["allday"]=true;
$tmp["events"][$idday]["colorday"]=$event->getTask()->getColor();
$tmp["events"][$idday]["descriptionday"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
}
else {
// Matin ou après-midi ?
$time=$event->getStart()->format("H");
if($time==9) {
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>false,"am"=>true,"ap"=>false,"coloram"=>$event->getTask()->getColor(),"descriptionam"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription(),"validate"=>$event->getValidate()];
$tmp["events"][$idday]["am"]=true;
$tmp["events"][$idday]["coloram"]=$event->getTask()->getColor();
$tmp["events"][$idday]["descriptionam"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
}
else {
$tmp["events"][$idday]["events"][$event->getId()]=["allday"=>false,"am"=>false,"ap"=>true,"colorap"=>$event->getTask()->getColor(),"descriptionap"=>strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription(),"validate"=>$event->getValidate()];
$tmp["events"][$idday]["ap"]=true;
$tmp["events"][$idday]["colorap"]=$event->getTask()->getColor();
$tmp["events"][$idday]["descriptionap"]=strtoupper($event->getTask()->getDisplayname())."\n\n".$event->getDescription();
}
}
@@ -280,7 +295,7 @@ class ValidationController extends AbstractController
}
}
if($duration< 5) {
if($duration!= 5) {
$output=["return"=>"KO","error"=>"Validation impossible = semaine incomplète"];
return new Response(json_encode($output));
}
@@ -485,7 +500,7 @@ class ValidationController extends AbstractController
$em->flush();
$iduser=$event->getUser()->getId();
$idevent=$event->getId();
// $this->notificator->sendNotifValid("Congé validé", $iduser, $event);
$this->notificator->sendNotifValid("Congé validé", $iduser, $event);
}
$output=[];

View File

@@ -227,20 +227,6 @@
"phpdocumentor/type-resolver": {
"version": "1.1.0"
},
"phpunit/phpunit": {
"version": "8.5",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "4.7",
"ref": "db276258424d15e572d35a4eb834b8f815662b25"
},
"files": [
".env.test",
"phpunit.xml.dist",
"tests/bootstrap.php"
]
},
"psr/cache": {
"version": "1.0.1"
},

View File

@@ -34,16 +34,14 @@
font-size: 12px;
float:left;
width:100%;
height: 18px;
flex: 0 0 auto;
height: 18px;
}
.am, .ap {
font-size: 12px;
float:left;
width:50%;
height: 18px;
flex: 0 0 auto;
height: 18px;
}
.astreinte {
@@ -85,30 +83,27 @@
{% endif %}
<td>
<div class="date">{{ event.date | date("d/m") }}</div>
<div class="d-flex flex-wrap">
{% set haveam=false %}
{% for detail in event.events %}
{% if detail.allday %}
<div class='allday' style='background-color:{{ detail.colorday }};' title='{{ detail.descriptionday }}'>1</div>
{% else %}
{%if detail.am %}
{% set haveam=true %}
<div class='am' style='background-color:{{ detail.coloram }};' title='{{ detail.descriptionam }}'>0.5</div>
{% endif %}
{%if detail.ap %}
{% if not haveam %}<div class='am'></div>{%endif%}
<div class='ap ml-auto' style='background-color:{{ detail.colorap }};' title='{{ detail.descriptionap }}'>0.5</div>
{% endif %}
{% endif %}
{% endfor %}
{% if event.astreinte %}
<div class='astreinte' style='background-color:{{ event.colorastreinte }};' title='{{ event.descriptionastreinte }}'>*</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='astreinte'></div>
<div class='am'></div>
{% endif %}
</div>
{%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 %}
@@ -131,14 +126,4 @@
function myprint() {
document.location.href="{{path(app.request.attributes.get('_route'),{fgprint:true})}}";
}
$(document).ready(function() {
maxheight=0;
$( ".card" ).each(function( index ) {
if($(this).height()>maxheight)
maxheight=$(this).height();
});
$( ".card" ).height(maxheight);
});
{% endblock %}

View File

@@ -34,16 +34,14 @@
font-size: 12px;
float:left;
width:100%;
height: 18px;
flex: 0 0 auto;
height: 18px;
}
.am, .ap {
font-size: 12px;
float:left;
width:50%;
height: 18px;
flex: 0 0 auto;
height: 18px;
}
.astreinte {
@@ -85,8 +83,7 @@
{% if nbday==1 %}
<tr id="{{user.user.id}}-{{event.date|date("Ymd")}}"}">
<td class="no-print" style="vertical-align:middle">
{% set first=event.events|first %}
{% if first and first.validate %}
{% 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>
@@ -98,24 +95,21 @@
<td>
<div class="date">{{ event.date | date("d/m") }}</div>
<div class="d-flex flex-wrap">
{% set haveam=false %}
{% for detail in event.events %}
{% if detail.allday %}
<div class='allday' style='background-color:{{ detail.colorday }};' title='{{ detail.descriptionday }}'>1</div>
{% else %}
{%if detail.am %}
{% set haveam=true %}
<div class='am' style='background-color:{{ detail.coloram }};' title='{{ detail.descriptionam }}'>0.5</div>
{% endif %}
{% 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 detail.ap %}
{% if not haveam %}<div class='am'></div>{%endif%}
<div class='ap' style='background-color:{{ detail.colorap }};' title='{{ detail.descriptionap }}'>0.5</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
{%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>