Mise à jour affichage des critères
This commit is contained in:
parent
0eb0240d27
commit
c8afc3902a
@ -341,36 +341,65 @@ class GestionController extends Zend_Controller_Action
|
||||
//Construction affichage des critères
|
||||
$infosCriteres = array();
|
||||
$allFields = $fields->getItems(true);
|
||||
foreach ( $allFields as $key => $params ) {
|
||||
$valueSelected = $sessionValue->getSelectedValue($key);
|
||||
if ( $valueSelected !== false ) {
|
||||
$inValue = $valueSelected['in'];
|
||||
$exValue = $valueSelected['ex'];
|
||||
|
||||
$inLabel = array();
|
||||
if ( count($inValue)>0 ) {
|
||||
foreach ( $inValue as $value ) {
|
||||
if ( array_key_exists($value, $params['values']) ) {
|
||||
$inLabel[] = $params['values'][$value];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$exLabel = array();
|
||||
if ( count($exValue)>0 ) {
|
||||
foreach ( $exValue as $value ) {
|
||||
if ( array_key_exists($value, $params['values']) ) {
|
||||
$exLabel[] = $params['values'][$value];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$infosCriteres[$key] = array(
|
||||
'label' => $params['label'],
|
||||
'in' => $inLabel,
|
||||
'ex' => $exLabel,
|
||||
);
|
||||
}
|
||||
foreach ( $allFields as $key => $params )
|
||||
{
|
||||
$valueSelected = $sessionValue->getSelectedValue($key);
|
||||
if ( $valueSelected !== null ) {
|
||||
|
||||
$isMultiple = $fields->isMultiple($key);
|
||||
|
||||
$inValue = array();
|
||||
if ( array_key_exists('in', $valueSelected) ) {
|
||||
$inValue = $valueSelected['in'];
|
||||
}
|
||||
|
||||
$exValue = array();
|
||||
if ( array_key_exists('in', $valueSelected) ) {
|
||||
$exValue = $valueSelected['ex'];
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info($key);
|
||||
Zend_Registry::get('firebug')->info($inValue);
|
||||
|
||||
$inLabel = array();
|
||||
if ( is_array($inValue) && count($inValue) > 0 ) {
|
||||
foreach ( $inValue as $value ) {
|
||||
if ( $isMultiple === true ) {
|
||||
$inLabel[] = $fields->labelValueDetail($key, $value);
|
||||
}
|
||||
else if ( array_key_exists($value, $params['values']) ) {
|
||||
$inLabel[] = $params['values'][$value];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( array_key_exists($inValue, $params['values']) ) {
|
||||
$inLabel[] = $params['values'][$inValue];
|
||||
}
|
||||
}
|
||||
|
||||
$exLabel = array();
|
||||
if ( is_array($exValue) && count($exValue)>0 ) {
|
||||
foreach ( $exValue as $value ) {
|
||||
if ( $isMultiple === true ) {
|
||||
$inLabel[] = $fields->labelValueDetail($key, $value);
|
||||
}
|
||||
else if ( array_key_exists($value, $params['values']) ) {
|
||||
$exLabel[] = $params['values'][$value];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( array_key_exists($exValue, $params['values']) ) {
|
||||
$exLabel[] = $params['values'][$inValue];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$infosCriteres[$key] = array(
|
||||
'label' => $params['label'],
|
||||
'in' => $inLabel,
|
||||
'ex' => $exLabel,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->criteres = $infosCriteres;
|
||||
|
@ -16,7 +16,7 @@
|
||||
<table class="table table-bordered table-condensed">
|
||||
<?php foreach ( $this->criteres as $criteres ) { ?>
|
||||
<tr class="active">
|
||||
<td colspan="2"><?=$criteres['label']?></td>
|
||||
<td colspan="2"><strong><?=$criteres['label']?></strong></td>
|
||||
</tr>
|
||||
<?php if ( is_string($criteres['in']) ) {?>
|
||||
<tr>
|
||||
|
@ -1,32 +1,30 @@
|
||||
<fieldset>
|
||||
<legend>Critères</legend>
|
||||
|
||||
<?php foreach ( $this->criteres as $criteres ) { ?>
|
||||
<div>
|
||||
<h3><?=$criteres['label']?></h3>
|
||||
<?php if (is_string($criteres['in'])) {?>
|
||||
<div><?=$criteres['in']?></div>
|
||||
<table class="table table-bordered table-condensed">
|
||||
<?php foreach ( $this->criteres as $criteres ) { ?>
|
||||
<tr class="active">
|
||||
<td><strong><?=$criteres['label']?></strong></td>
|
||||
</tr>
|
||||
<?php if ( is_string($criteres['in']) ) {?>
|
||||
<tr>
|
||||
<td><?=$criteres['in']?></td>
|
||||
</tr>
|
||||
<?php } else {?>
|
||||
|
||||
<?php if ( is_array($criteres['in']) && count($criteres['in'])>0 ) { ?>
|
||||
<div>
|
||||
<p>Inclus :</p>
|
||||
<?php foreach( $criteres['in'] as $item ) {?>
|
||||
<p><?=$item?></p>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if ( is_array($criteres['ex']) && count($criteres['ex'])>0 ) { ?>
|
||||
<div>
|
||||
<p>Exclus :</p>
|
||||
<?php foreach( $criteres['ex'] as $item ) {?>
|
||||
<p><?=$item?></p>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<?php if ( is_array($criteres['in']) && count($criteres['in'])>0 ) { ?>
|
||||
<?php foreach( $criteres['in'] as $item ) {?>
|
||||
<tr>
|
||||
<td><?=$item?><span class="label label-success pull-right">inclus</span></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php }?>
|
||||
</fieldset>
|
||||
|
||||
<?php if ( is_array($criteres['ex']) && count($criteres['ex'])>0 ) { ?>
|
||||
<?php foreach( $criteres['ex'] as $item ) {?>
|
||||
<tr>
|
||||
<td><?=$item?><span class="label label-danger pull-right">exclus</span></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</table>
|
@ -21,7 +21,7 @@ $Years = date('Y') - $YearBegin;
|
||||
</form>
|
||||
<h2>Liste des ciblages</h2>
|
||||
<div>
|
||||
<table>
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th><b>Id</b></th>
|
||||
<th><b>Date de création</b></th>
|
||||
@ -31,7 +31,7 @@ $Years = date('Y') - $YearBegin;
|
||||
<th><b>Actions</b></th>
|
||||
</tr>
|
||||
<?php foreach($this->comptages as $comptage): ?>
|
||||
<tr id="<?=$comptage['idDefinition']?>">
|
||||
<tr title="Critères" id="<?=$comptage['idDefinition']?>">
|
||||
<td><?=$comptage['idDefinition']?></td>
|
||||
<td><?=$comptage['dateAjout']?></td>
|
||||
<td><?=$comptage['reference']?></td>
|
||||
|
@ -18,12 +18,13 @@ $Years = date('Y') - $YearBegin;
|
||||
<option value="<?=$i?>"<?=$select?>><?=str_pad($i, 2, '0', STR_PAD_LEFT)?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<input type="submit" name="submit" value="Ok"/>
|
||||
<input type="submit" name="submit" value="OK"/>
|
||||
</form>
|
||||
</div>
|
||||
<h2>Liste des commandes</h2>
|
||||
<div>
|
||||
<table>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><b>Date de création</b></th>
|
||||
<th><b>Référence</b></th>
|
||||
@ -33,7 +34,9 @@ $Years = date('Y') - $YearBegin;
|
||||
<th><b>Reférence ciblage</b></th>
|
||||
<th><b>Actions</b></th>
|
||||
</tr>
|
||||
<?php foreach($this->commandes as $item): ?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($this->commandes as $item) {?>
|
||||
<tr>
|
||||
<td><?=$item['dateAdded']?></td>
|
||||
<td><?=$item['commandeReference']?></td>
|
||||
@ -46,7 +49,8 @@ $Years = date('Y') - $YearBegin;
|
||||
<a href="<?=$this->url(array('controller'=> 'gestion','action'=>'extract', 'id'=>$item['id']))?>">Extraire les sirets</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -21,7 +21,7 @@ $Years = date('Y') - $YearBegin;
|
||||
</form>
|
||||
<h2>Liste des commandes</h2>
|
||||
<div>
|
||||
<table class="table">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th><b>Date</b></th>
|
||||
<th><b>login</b></th>
|
||||
@ -45,7 +45,7 @@ $Years = date('Y') - $YearBegin;
|
||||
<td><?=$item['nbLigneTotales']?></td>
|
||||
<td><?=$item['uniteInsee']?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php }?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user