issue #0001517 : Affichage explication données, colonnes en sortie,....
This commit is contained in:
parent
f602c4ccff
commit
c012b6f02f
@ -141,10 +141,16 @@ class ProfilController extends Zend_Controller_Action
|
||||
|
||||
public function helpAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$key = $request->getParam('key');
|
||||
|
||||
$dico = new Enrichissement();
|
||||
|
||||
|
||||
$this->view->assign('lib', $dico->getDicoLib($key));
|
||||
$this->view->assign('help', $dico->getDicoHelp($key));
|
||||
$this->view->assign('columns', $dico->getDicoColumns($key));
|
||||
}
|
||||
|
||||
}
|
@ -162,5 +162,12 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$('div#dico li').click(function(e){
|
||||
e.preventDefault();
|
||||
var key = $(this).attr('id');
|
||||
$.post('<?=$this->url(array('controller'=>'profil','action'=>'help'))?>', { key: key},
|
||||
function(data){ $('div#help').html(data); });
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
12
application/views/scripts/profil/help.phtml
Normal file
12
application/views/scripts/profil/help.phtml
Normal file
@ -0,0 +1,12 @@
|
||||
<p>Element : <?=$this->lib?></p>
|
||||
<p><?=$this->help?></p>
|
||||
|
||||
<p>Colonnes de sortie</p>
|
||||
<ul>
|
||||
<?php if ( count($this->columns)>0 ) {?>
|
||||
<?php foreach ( $this->columns as $code => $lib ) {?>
|
||||
<li><?=$code?> : <?=$lib?></li>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</ul>
|
||||
|
@ -4,10 +4,14 @@ class Enrichissement
|
||||
//Traiter la demande en créant les requetes sql nécessaires
|
||||
protected $tabDico = array(
|
||||
'idSd' => array(
|
||||
'lib' => "Identifiant S&D"
|
||||
'lib' => "SD : Identifiant",
|
||||
'help' => "",
|
||||
'columns' => array(
|
||||
'code' => 'lib',
|
||||
)
|
||||
),
|
||||
'source' => array(
|
||||
'lib' => "Source S&D"
|
||||
'lib' => "SD : Source"
|
||||
),
|
||||
'triCode' => array(
|
||||
'lib' => "Code Tribunal"
|
||||
@ -376,16 +380,40 @@ class Enrichissement
|
||||
'dateFermetureEt'=> array(),
|
||||
'activite'=> array(),
|
||||
'situationJuridique'=> array(),
|
||||
'indiScore'=> array(),
|
||||
'indiScore'=> array(
|
||||
'lib' => 'SD : indiScore',
|
||||
|
||||
),
|
||||
'AdresseNormalise' => array(
|
||||
'lib' => 'INSEE : AdresseNormalise',
|
||||
'columns' => array(
|
||||
'AdresseL1_NOM' => '',
|
||||
'AdresseL2_NOM2' => '',
|
||||
'AdresseL3_ADRCOMP' => '',
|
||||
'AdresseL4_VOIE' => '',
|
||||
'AdresseL5_DISTSP' => '',
|
||||
'AdresseL6_POST' => '',
|
||||
'AdresseL7_PAYS' => '',
|
||||
),
|
||||
),
|
||||
'SiretSuc' => array(
|
||||
'lib' => 'INSEE : Siret Successeur',
|
||||
'help' => "",
|
||||
'columns' => array(
|
||||
'SiretSuc' => '',
|
||||
'SiretSucNbDem' => '',
|
||||
'SiretSucSiege' => '',
|
||||
'SiretSucActif' => '',
|
||||
'SiretSucCodeEve' => '',
|
||||
'SiretSucDateEve' => '',
|
||||
'SiretSucOrigine' => '',
|
||||
)
|
||||
),
|
||||
'dirigeant'=> array(),
|
||||
'bilanN'=> array('values'=>''),
|
||||
'bilanN1'=> array('values'=>''),
|
||||
'bilanN2'=> array('values'=>''),
|
||||
'annonces'=> array('values'=>''),
|
||||
'AdresseNormalise' => array(),
|
||||
'SiretSuc' => array(
|
||||
'lib' => 'Siret Successeur'
|
||||
),
|
||||
);
|
||||
|
||||
public function __construct(){}
|
||||
@ -481,11 +509,32 @@ class Enrichissement
|
||||
return false;
|
||||
}
|
||||
|
||||
//Retourne les caractéristiques des clés
|
||||
public function getDicoDef($key)
|
||||
//Retourne le texte d'aide
|
||||
public function getDicoHelp($key)
|
||||
{
|
||||
if (array_key_exists($key, $this->tabDico))
|
||||
{
|
||||
$element = $this->tabDico[$key];
|
||||
if (array_key_exists('help', $element) && !empty($element['help'])) {
|
||||
return $element['help'];
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//Retourne les colonnes de sortie
|
||||
public function getDicoColumns($key)
|
||||
{
|
||||
if (array_key_exists($key, $this->tabDico))
|
||||
{
|
||||
$element = $this->tabDico[$key];
|
||||
if ( array_key_exists('columns', $element) ) {
|
||||
return $element['columns'];
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user