Without issue : better display

This commit is contained in:
Michael RICOIS 2014-03-12 14:09:31 +00:00
parent 5ac13207a5
commit 9b91817aba

View File

@ -42,90 +42,79 @@
</table>
</div>
<h2>&Eacute;tablissements</h2>
<?php if (count($this->etabs)>0) { ?>
<div class="paragraph">
<table style="width:100%;">
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<table>
<table class="data">
<?php foreach ($this->etabs as $etab) { ?>
<?php
if ($etab->Siege==1) $type = 'siège ';
else $type = 'établ. ';
if ($etab->Actif==1) $type.= 'actif';
else $type.= 'inactif';
if(intval($etab->Nic)==0 || intval($etab->Nic)>=99990) $type.=' provisoire';
$href = $this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $this->siren.$etab->Nic,
'id' => $this->id,
));
?>
<tr>
<td class="StyleInfoData" width="50" valign="top">
<b><a title="<?=$this->translate("Voir la fiche d'identité")?>" href="<?=$href?>"><?=$etab->Nic?></a></b>
</td>
<td class="StyleInfoData" width="70" valign="top"><?=$type?></td>
<td class="StyleInfoData" width="250">
<?php
if ($etab->Enseigne!='') {
?>
<b><?=$etab->Enseigne?></b><br/>
<?php
if (count($this->etabs)>0)
{
foreach ($this->etabs as $etab)
{
if ($etab->Siege==1) $type = 'siège ';
else $type = 'établ. ';
if ($etab->Actif==1) $type.= 'actif';
else $type.= 'inactif';
if(intval($etab->Nic)==0 || intval($etab->Nic)>=99990) $type.=' provisoire';
$href = $this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $this->siren.$etab->Nic,
'id' => $this->id,
));
?>
<tr>
<td class="StyleInfoData" width="30">
<b><a title="<?=$this->translate("Voir la fiche d'identité")?>" href="<?=$href?>"><?=$etab->Nic?></a></b>
</td>
<td class="StyleInfoData" width="80"><?=$type?></td>
<td class="StyleInfoData" width="190">
<?php
if ($etab->Enseigne!='') {
?>
<b><?=$etab->Enseigne?></b><br/>
<?php
}
?>
<?=$etab->Adresse?><br/>
<?php
if ($etab->Adresse2!='') {?>
<?=$etab->Adresse2?><br/>
<?php
}
?>
<b><?=$etab->CP?> <?=$etab->Ville?></b>
<?php
if ($etab->Tel!='') echo '<br/><i>T&eacute;l : '.$etab->Tel.'</i>&nbsp;&nbsp;&nbsp;';
if ($etab->Fax!='') echo '<br/><i>Fax : '.$etab->Fax.'</i>';
?>
</td>
<td class="StyleInfoData" width="260">
<?=$etab->NafEtab.' : '.$etab->NafEtabLib?>
<?php
if ($etab->Actif==1 && !empty($etab->EffEtTrLib) && !empty($etab->EffEtTr) && !in_array($etab->EffEtTr, array('N/C', 'NN', 0)) ){
?>
<br/><i><?=$etab->EffEtTrLib?></i>
<?php
}
?>
</td>
</tr>
<?php
}
}
?>
</table>
<?=$etab->Adresse?><br/>
<?php
if ($etab->Adresse2!='') {?>
<?=$etab->Adresse2?><br/>
<?php
}
?>
<b><?=$etab->CP?> <?=$etab->Ville?></b>
<?php
if ($etab->Tel!='') echo '<br/><i>T&eacute;l : '.$etab->Tel.'</i>&nbsp;&nbsp;&nbsp;';
if ($etab->Fax!='') echo '<br/><i>Fax : '.$etab->Fax.'</i>';
?>
</td>
</tr>
<?php if($this->hasPrefCarte){?>
<tr>
<td align="center" colspan="3">
<?=$this->action('carte', 'identite', null, array('siret'=>$this->siret, 'id'=>$this->id, 'actif'=>$this->actif) )?>
</td>
</tr>
<?php }?>
<td class="StyleInfoData" valign="top">
<?=$etab->NafEtab.' : '.$etab->NafEtabLib?>
<?php
if ($etab->Actif==1 && !empty($etab->EffEtTrLib) && !empty($etab->EffEtTr) && !in_array($etab->EffEtTr, array('N/C', 'NN', 0)) ){
?>
<br/><i><?=$etab->EffEtTrLib?></i>
<?php
}
?>
</td>
</tr>
<?php } ?>
</table>
</div>
<?php if (empty($this->AutrePage)):?>
<?php if($this->hasPrefCarte){?>
<div class="paragraph">
<?=$this->action('carte', 'identite', null, array('siret'=>$this->siret, 'id'=>$this->id, 'actif'=>$this->actif) )?>
</div>
<?php }?>
<?php } ?>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php endif;?>
<?php }?>
</div>