From fff3e2c4c7c50765ea282021657956af0b3d4f6b Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 3 Jan 2017 13:26:07 +0100 Subject: [PATCH] Vert-Orange-Rouge pour l'affichage du score --- .../controllers/EvaluationController.php | 13 +++++ .../scripts/evaluation/indiscore.phtml | 39 ++++++++------ .../scripts/evaluation/indiscore2.phtml | 43 +++++++-------- public/themes/default/styles/main.css | 52 ++++++++++--------- 4 files changed, 80 insertions(+), 67 deletions(-) diff --git a/application/modules/default/controllers/EvaluationController.php b/application/modules/default/controllers/EvaluationController.php index bfaadf193..5d21413c9 100644 --- a/application/modules/default/controllers/EvaluationController.php +++ b/application/modules/default/controllers/EvaluationController.php @@ -201,6 +201,19 @@ class EvaluationController extends Zend_Controller_Action */ public function indiscoreAction() { + $bornes = array( + 'indiScore' => array('min' => 0, 'max' => 20, 'rouge' => 7, 'orange' => 10), + 'scoreDir' => array('min' => 0, 'max' => 100, 'rouge' => 45, 'orange' => 56), + 'scoreConf' => array('min' => 0, 'max' => 100, 'rouge' => 45, 'orange' => 56), + 'scoreZ' => array('min' => -3, 'max' => 3, 'rouge' => -0.25, 'orange' => 0.125), + 'scoreCH' => array('min' => -4.5, 'max' => 16, 'rouge' => 3.75, 'orange' => 10), + 'scoreAfdcc1' => array('min' => -7, 'max' => 7, 'rouge' => 0, 'orange' => 1), + 'scoreAfdcc2' => array('min' => -3, 'max' => 2, 'rouge' => -1, 'orange' => 0.5), + 'scoreAltman' => array('min' => -2, 'max' => 8, 'rouge' => 0, 'orange' => 2.7), + 'scoreCCF' => array('min' => 500, 'max' => 5000, 'rouge' => 2160, 'orange' => 3450 ), + ); + $this->view->assign('bornes', $bornes); + $user = new Scores_Utilisateur(); if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP')) $this->forward('perms', 'error'); diff --git a/application/modules/default/views/default/scripts/evaluation/indiscore.phtml b/application/modules/default/views/default/scripts/evaluation/indiscore.phtml index f24f28908..b9b39d42a 100644 --- a/application/modules/default/views/default/scripts/evaluation/indiscore.phtml +++ b/application/modules/default/views/default/scripts/evaluation/indiscore.phtml @@ -202,8 +202,8 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {   - Pour information, les méthodes standards donnent : Conan & Holder = indiscore->scores->ConanH;?>, - Afdcc1 = indiscore->scores->Afdcc1;?>, Afdcc2 = indiscore->scores->Afdcc2;?> + Pour information, les méthodes standards donnent : Conan & Holder = indiscore->scores->ConanH;?>, + Afdcc1 = indiscore->scores->Afdcc1;?>, Afdcc2 = indiscore->scores->Afdcc2;?> et Score Z = indiscore->scores->Z;?>. @@ -253,8 +253,15 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') { Compte tenu des informations disponibles auprès des sources officielles Scores et Décisions présente la conclusion suivante :
typeScore) - { + $color = ''; + if ($this->indiscore->Indiscore20 < $this->bornes['indiScore']['rouge']) { + $color = ' indiscore-red'; + } elseif ($this->indiscore->Indiscore20 < $this->bornes['indiScore']['orange']) { + $color = ' indiscore-orange'; + } else { + $color = ' indiscore-green'; + } + switch($this->typeScore) { case '20': $maxIndiscore = $this->typeScore; $indiscore = $this->indiscore->Indiscore20; @@ -266,23 +273,21 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') { break; } ?> -

LE SCORE EST DE SUR POINTS

+

LE SCORE EST DE SUR POINTS

indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?> -

indiscore->infoEncours;?>

- - - La tendance de la note est indiscore->TendanceIndiscore;?> -

L'ENCOURS MAXIMUM CONSEILLÉ EST DE indiscore->encours / 1000);?> K€

- -

indiscore->infoEncours;?>

- + if ($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?> +

indiscore->infoEncours?>

+ + + La tendance de la note est indiscore->TendanceIndiscore?> +

L'ENCOURS MAXIMUM CONSEILLÉ EST DE indiscore->encours / 1000)?> K€

+ +

indiscore->infoEncours?>

+ - + diff --git a/application/modules/default/views/default/scripts/evaluation/indiscore2.phtml b/application/modules/default/views/default/scripts/evaluation/indiscore2.phtml index cc2c766e4..97a2b92c4 100644 --- a/application/modules/default/views/default/scripts/evaluation/indiscore2.phtml +++ b/application/modules/default/views/default/scripts/evaluation/indiscore2.phtml @@ -90,31 +90,24 @@ Aucun bilan disponible. Situation juridique - SituationJuridique == 'P'):?> - - - En procédure collective - - - dateRadiation != ''):?> -
Radié du RCS le dateRadiation;?> - - SituationJuridique == 'RR'):?> - Radié du RCS dateRadiation != ''):?> + SituationJuridique == 'P') {?> + + En procédure collective + dateRadiation != '') {?> +
Radié du RCS le dateRadiation?> + + SituationJuridique == 'RR') {?> + Radié du RCS dateRadiation != '') {?> le dateRadiation;?> - - SituationJuridique == 'RP'):?> - Radiation publiée dateRadiation != ''):?> - le dateRadiation;?> - - + + SituationJuridique == 'RP') {?> + Radiation publiée dateRadiation != '') {?> + le dateRadiation?> + + Aucune procédure enregistrée à ce jour par nos services. - + @@ -123,7 +116,7 @@ Aucun bilan disponible.

Scores et encours

-scores as $name => $score):?> +scores as $name => $score) {?> @@ -136,7 +129,7 @@ Aucun bilan disponible. - + diff --git a/public/themes/default/styles/main.css b/public/themes/default/styles/main.css index a55941f22..fea14a012 100644 --- a/public/themes/default/styles/main.css +++ b/public/themes/default/styles/main.css @@ -520,7 +520,7 @@ div#menu div.icones {text-align:center;margin-top:5px;} #recherche-page{text-align:center;} #recherche-page img{vertical-align:middle;} form.recherche{padding:0; text-align:left;} -form.recherche label {clear:both;float:left;width:250px;line-height:20px;font-weight:bold;text-align:right;padding-right:5px;} +form.recherche label {clear:both;float:left;width:250px;line-height:18px;font-weight:bold;text-align:right;padding-right:5px;} form.recherche div.field {float:left;} form.recherche div.row {clear:both;padding:5px 0;} form.recherche div.submit {text-align:center;} @@ -629,9 +629,13 @@ tr.deleted {text-decoration:line-through;} /* Evaluation ----------------------------------*/ -h3 { margin-top:10px; } -h3 u { font-size:13px; color:#535353; font-weight:bold;} -div.stats ul { width: 400px; list-style: none; margin:10px;padding:10px;} +h3 {margin-top:10px;} +h3.indiscore {font-weight:bold; font-size:13px;} +h3.indiscore-green {color:green;} +h3.indiscore-orange {color:orange;} +h3.indiscore-red {color:red;} +h3 u {font-size:13px; color:#535353; font-weight:bold;} +div.stats ul {width:400px; list-style:none; margin:10px; padding:10px;} div.stats .percent {display: block;height: 1.5em;line-height: 1.5em;margin: 5px 10px 0 10px;padding: 0 5px;text-align: right;color: #fff;font-weight: bold;font-family: monospace;-moz-border-radius: 5px;border-bottom: 1px solid #aaa;border-right: 1px solid #aaa;cursor: default;} .blocdegrade {width:300px;} .imgdegrade {width:310px;} @@ -697,26 +701,6 @@ div.blocdegrade .echelleright{float:right;} /* Pieces ----------------------------------*/ .marge { margin-left:30px; } -/*#identite { margin-left:30px; }*/ -form em { color:#FF0000; } -fieldset { border:0; margin:0; padding:0; } -fieldset legend { padding:0 0 0 10px; } -.fieldgrp { clear:both; margin:0 0 .5em 30px; overflow:hidden; } -.fieldgrp:after { content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; } -.fieldgrp label { font-weight:bold; margin-left:30px; width:100px; clear:both; padding:0 10px 0 0; line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%; } -.fieldgrp label span { font-weight:normal;} -.fieldgrp label abbr { color:#4B911C; font-size:120%; vertical-align:middle;} -.field { float:left; padding:0 5px 0 0; line-height:22px; _padding-top:3px; } -.field .longfield { width:215px; } -.field .longfield-select { width:220px; } -.field .smallfield { width:95px; } -.field .medfield { width:110px; } -.field span { display:block; } -.field input, .field select { font-size:110%; margin:2px 0; } -.field input[type="radio"] { margin:0 5px 0 5px; border:0; } -input[type="checkbox"] { margin:0 5px 0 5px; border:0; } -.submit { text-align:center; } -.noborder { border:none; } #message { margin:10px 0 10px 30px; } table.greffe { width:100%;border-collapse:collapse; } table.greffe th { border:1px solid #000000;padding:8px 4px 8px 4px;background-color:#eeeeee;text-align:center; } @@ -731,7 +715,25 @@ table.greffe td.saisie { border-top: 1px dashed; } .infoTitle { clear:both; float:left; width:180px; margin-left:30px; padding:0 10px 5px 0; } .infoData { float:left; width:320px; margin:2px 0;} div.submit{ clear:both; text-align:center; } - +form em { color:#FF0000; } +fieldset { border:0; margin:0; padding:0; } +fieldset legend { padding:0 0 0 10px; } +.fieldgrp { clear:both; margin:0 0 .5em 30px; overflow:hidden; } +.fieldgrp:after { content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; } +.fieldgrp label { font-weight:bold; margin-left:30px; width:100px; clear:both; padding:0 10px 0 0; line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%; } +.fieldgrp label span { font-weight:normal;} +.fieldgrp label abbr { color:#4B911C; font-size:120%; vertical-align:middle;} +.field { float:left; padding:0 5px 0 0;} +.field .longfield { width:215px; } +.field .longfield-select { width:220px; } +.field .smallfield { width:95px; } +.field .medfield { width:110px; } +.field span { display:block; } +.field input, .field select { font-size:110%; margin:2px 0; } +.field input[type="radio"] { margin:0 5px 0 5px; border:0; } +input[type="checkbox"] { margin:0 5px 0 5px; border:0; } +.submit { text-align:center; } +.noborder { border:none; } .fa-hover a:hover { display: block;
Encours conseillé