Vert-Orange-Rouge pour l'affichage du score

This commit is contained in:
Michael RICOIS 2017-01-03 13:26:07 +01:00
parent 375643c23d
commit fff3e2c4c7
4 changed files with 80 additions and 67 deletions

View File

@ -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');

View File

@ -202,8 +202,8 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
<i>Pour information, les méthodes standards donnent : Conan &amp; Holder = <b><?php echo $this->indiscore->scores->ConanH;?></b>,
Afdcc1 = <b><?php echo $this->indiscore->scores->Afdcc1;?></b>, Afdcc2 = <b><?php echo $this->indiscore->scores->Afdcc2;?></b>
<i>Pour information, les méthodes standards donnent : Conan &amp; Holder = <b><?php echo $this->indiscore->scores->ConanH;?></b>,
Afdcc1 = <b><?php echo $this->indiscore->scores->Afdcc1;?></b>, Afdcc2 = <b><?php echo $this->indiscore->scores->Afdcc2;?></b>
et Score Z = <b><?php echo $this->indiscore->scores->Z;?></b>.</i>
</td>
</tr>
@ -253,8 +253,15 @@ if ($this->indiscore->Enseigne!='' && $this->indiscore->Sigle!='') {
Compte tenu des informations disponibles aupr&egrave;s des sources officielles
Scores et D&eacute;cisions pr&eacute;sente la conclusion suivante :</span><br/>
<?php
switch($this->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;
}
?>
<h3 style="font-size:13px"><b>LE SCORE EST DE <?php echo $indiscore;?> SUR <?php echo $maxIndiscore;?> POINTS</b></h3>
<h3 class="indiscore<?=$color?>">LE SCORE EST DE <?=$indiscore?> SUR <?=$maxIndiscore?> POINTS</h3>
<?php
if($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?>
<h3><?php echo $this->indiscore->infoEncours;?></h3>
<?php
}else{ ?>
<?php
if ($indiscore!=0) { ?>
<i>La tendance de la note est <?php echo $this->indiscore->TendanceIndiscore;?></i>
<h3 style="font-size:13px"><b>L'ENCOURS MAXIMUM CONSEILL&Eacute; EST DE <?php echo round($this->indiscore->encours / 1000);?> K&euro;</b></h3>
<?php } ?>
<h3><?php echo $this->indiscore->infoEncours;?></h3>
<?php } ?>
if ($this->indiscore->infoEncours != '' && !is_numeric($this->indiscore->encours) && $this->indiscore->encours == 'N/A'){ ?>
<h3><?=$this->indiscore->infoEncours?></h3>
<?php } else{ ?>
<?php if ($indiscore != 0) {?>
<i>La tendance de la note est <?=$this->indiscore->TendanceIndiscore?></i>
<h3 class="indiscore">L'ENCOURS MAXIMUM CONSEILL&Eacute; EST DE <?=round($this->indiscore->encours / 1000)?> K&euro;</h3>
<?php }?>
<h3><?=$this->indiscore->infoEncours?></h3>
<?php }?>
</td>
</tr>
<tr><td colspan="3" align="center"><img class="notvisible" src="/themes/default/images/indiscore/logo_indiscore.png"/></td></tr>
</table>
</div>

View File

@ -90,31 +90,24 @@ Aucun bilan disponible.
<td width="30"></td>
<td class="StyleInfoLib" width="200">Situation juridique</td>
<td class="StyleInfoData" width="350">
<?php if ($this->SituationJuridique == 'P'):?>
<a href="<?=$this->url(array(
'controller' => 'juridique',
'action' => 'annonces',
'siret' => $this->siret,
'id' => $this->id,
))?>">
<font color="red">
<b>En proc&eacute;dure collective</b>
</font>
</a>
<?php if($this->dateRadiation != ''):?>
<br/>Radié du RCS le <?php echo $this->dateRadiation;?>
<?php endif;?>
<?php elseif ($this->SituationJuridique == 'RR'):?>
Radié du RCS <?php if($this->dateRadiation != ''):?>
<?php if ($this->SituationJuridique == 'P') {?>
<a href="<?=$this->url(array('controller' => 'juridique', 'action' => 'annonces',
'siret' => $this->siret,'id' => $this->id))?>">
<font color="red"><b>En proc&eacute;dure collective</b></font></a>
<?php if($this->dateRadiation != '') {?>
<br/>Radié du RCS le <?=$this->dateRadiation?>
<?php }?>
<?php } elseif ($this->SituationJuridique == 'RR') {?>
Radié du RCS <?php if($this->dateRadiation != '') {?>
le <?php echo $this->dateRadiation;?>
<?php endif;?>
<?php elseif ($this->SituationJuridique == 'RP'):?>
Radiation publiée <?php if($this->dateRadiation != ''):?>
le <?php echo $this->dateRadiation;?>
<?php endif;?>
<?php else:?>
<?php }?>
<?php } elseif ($this->SituationJuridique == 'RP') {?>
Radiation publiée <?php if($this->dateRadiation != '') {?>
le <?=$this->dateRadiation?>
<?php }?>
<?php } else {?>
Aucune procédure enregistrée à ce jour par nos services.
<?php endif;?>
<?php }?>
</td>
</tr>
</table>
@ -123,7 +116,7 @@ Aucun bilan disponible.
<h2>Scores et encours</h2>
<div class="paragraph">
<table>
<?php foreach ($this->scores as $name => $score):?>
<?php foreach ($this->scores as $name => $score) {?>
<tr>
<td width="30"></td>
<td width="250" class="StyleInfoLib"><?=$score[1]?></td>
@ -136,7 +129,7 @@ Aucun bilan disponible.
</a>
</td>
</tr>
<?php endforeach;?>
<?php }?>
<tr>
<td width="30"></td>
<td class="StyleInfoLib">Encours conseillé</td>

View File

@ -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;