Review version information

This commit is contained in:
Michael RICOIS 2014-04-14 10:17:17 +00:00
parent a522f8ffe9
commit 018a40d8da
6 changed files with 685 additions and 275 deletions

View File

@ -49,6 +49,13 @@ class DocumentationController extends Zend_Controller_Action
$this->view->assign('serviceName', $this->view->WsServices[$ws]['name']);
$this->view->assign('serviceVersion', $version);
$isDeprecated = false;
if ( $this->view->WsServices[$ws]['actif'] == false ) {
$isDeprecated = true;
}
$isDeprecated = true;
$this->view->assign('isDeprecated', $isDeprecated);
if ( $type == 'client') {
$client = $ws;
$ws = 'entreprise';

View File

@ -1,5 +1,13 @@
<div class="page-header"><h1>Service <?=$this->serviceName?> v<?=$this->serviceVersion?></h1></div>
<?php if ( $this->isDeprecated === true) {?>
<p class="bg-danger">Cette version est déprécié. Elle est désactivé.</p>
<?php }?>
<?php if ( $this->Info ) {?>
<p class="bg-info"><?=$this->Info?></p>
<?php }?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">WSDL</h3>

View File

@ -27,13 +27,21 @@
'type'=>$params['type'],
'version'=>$version),null,true)?>">
Version <?=$version?></a>
<div class="pull-right">
<?php if ( $versionElement['defaut'] === true ) { ?>
<span style="float:right;" class="label label-success">Défaut</span>
<span class="label label-success">Actuel</span>
<?php } elseif ( $versionElement['defaut'] === false ) {?>
<span style="float:right;" class="label label-danger">Déprécié</span>
<span class="label label-danger">Déprécié</span>
<?php } elseif ( $versionElement['defaut'] == 'beta') {?>
<span style="float:right;" class="label label-warning">Beta</span>
<span class="label label-warning">Beta</span>
<?php }?>
<?php if ( $versionElement['actif'] === true ) { ?>
<span class="label label-info">Actif</span>
<?php } else {?>
<span class="label label-info">Inactif</span>
<?php }?>
</div>
</li>
<?php } ?>
</ul>

View File

@ -3,11 +3,11 @@ return array(
'entreprise' => array(
'actif' => true,
'versions' => array(
'0.8' => array( 'actif' => true, 'defaut' => 'beta' ),
'0.7' => array( 'actif' => true, 'defaut' => true ),
'0.6' => array( 'actif' => true, 'defaut' => false ),
'0.5' => array( 'actif' => true, 'defaut' => false ),
'0.4' => array( 'actif' => true, 'defaut' => false ),
'0.8' => array( 'actif' => true, 'defaut' => true, 'start' => '2014-04-01' ),
'0.7' => array( 'actif' => true, 'defaut' => false, 'start' => '2012-01-01', 'end' => '2014-03-31'),
'0.6' => array( 'actif' => false, 'defaut' => false ),
'0.5' => array( 'actif' => false, 'defaut' => false ),
'0.4' => array( 'actif' => false, 'defaut' => false ),
'0.3' => array( 'actif' => false, 'defaut' => false ),
'0.2' => array( 'actif' => false, 'defaut' => false ),
),

File diff suppressed because one or more lines are too long

View File

@ -44,3 +44,16 @@ body {
code {
font-size: 80%;
}
.bs-callout-php {
background-color: #d4d4e8;
border-color: #666699;
}
.bs-callout-php code {
white-space: normal;
}
.bg-danger {
padding: 15px;
}