modification du style

This commit is contained in:
Damien LASSERRE 2011-12-16 15:36:34 +00:00
parent f1b683d07e
commit a433b02c7e
10 changed files with 84 additions and 9 deletions

View File

@ -38,11 +38,19 @@ class CriteresController extends Zend_Controller_Action
{
$this->_helper->layout()->disableLayout();
$champs = array(array('name' => 'ape_etab', 'libelle' => 'Code NAF Etablissement', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'ape_etab', 'libelle' => 'Liste Code NAF Etablissement', 'type' => 'textarea'),
array('name' => 'ape_entrep', 'libelle' => 'Code NAF Entreprise', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'ape_entrep', 'libelle' => 'Liste Code NAF Entreprise', 'type' => 'textarea'),
array('name' => 'NaceEtab', 'libelle' => 'Code NACE de l\'établissement', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'NaceEtab', 'libelle' => 'Liste Code NACE de l\'établissement', 'type' => 'textarea'),
array('name' => 'NaceEtab', 'libelle' => 'Code NACE de l\'établissement', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'NaceEntrep', 'libelle' => 'Liste Code NACE de l\'entreprise', 'type' => 'textarea'),
array('name' => 'age_etab', 'libelle' => 'Code AGE Etablissement', 'type' => 'text'),
array('name' => 'age_entrep', 'libelle' => 'Code AGE Entreprise', 'type' => 'text'),
array('name' => 'NaceEtab', 'libelle' => 'Code NACE de l\'établissement', 'type' => 'text'),
array('name' => 'NaceEntrep', 'libelle' => 'Code NACE de l\'entreprise', 'type' => 'text'),
array('name' => 'teff_entrep', 'libelle' => 'Tranche d\'effectif de l\'entreprise', 'type' => 'interval'),
array('name' => 'teff_etab', 'libelle' => 'Tranche d\'effectif de l\'etablissement', 'type' => 'interval'),
array('name' => 'nbEtab', 'libelle' => 'Nombre d\'établissements', 'type' => 'interval'),
@ -92,8 +100,14 @@ class CriteresController extends Zend_Controller_Action
$this->_helper->layout()->disableLayout();
$this->view->inlineScript()->appendFile('/themes/default/scripts/jquery.jstree.js');
$champs = array(array('name' => 'adr_cp', 'libelle' => 'Code postal', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'adr_cp', 'libelle' => 'Liste Code postal', 'type' => 'textarea'),
array('name' => 'adr_dep', 'libelle' => 'Département', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'adr_dep', 'libelle' => 'Liste Département', 'type' => 'textarea'),
array('name' => 'adr_com', 'libelle' => 'Code commune Insee', 'type' => 'text'),
array('name' => 'ou'),
array('name' => 'adr_com', 'libelle' => 'Liste Code commune Insee', 'type' => 'textarea'),
);
$this->view->champs = $champs;
/*$regionsM = new Application_Model_Regions();

View File

@ -19,9 +19,9 @@ Class Zend_View_Helper_Interval extends Zend_View_Helper_Abstract
<label>'.$libelle.'</label>
</div>';
$champ .= '<div style="text-align:right;">
<input type="text" name="'.$name.'1" value="'.$session[0].'" /> à <input value="'.$session[1].'" type="text" name="'.$name.'2" /> <a class="interval" id="'.$name.'" href=""><img width="10%" src="/themes/default/images/valider.png" /></a>
<input style="border:1px inset silver;" type="text" name="'.$name.'1" value="'.$session[0].'" /> <b>à</b> <input style="border:1px inset silver;" value="'.$session[1].'" type="text" name="'.$name.'2" /> <a class="interval" id="'.$name.'" href=""><img width="10%" src="/themes/default/images/valider.png" /></a>
</div>';
$champ .= '<div>
$champ .= '<div style="padding-top:5px;padding-bottom:5px">
<hr />
</div>';
$champ .= '</div>';

View File

@ -18,11 +18,11 @@ Class Zend_View_Helper_Text extends Zend_View_Helper_Abstract
$champ .= '<div style="float:left;text-align:left;">
<label>'.$libelle.'</label>
</div>';
$champ .= '<div style="text-align:right;">
<input class="criteres" type="text" name="'.$name.'" value="'.((!empty($val))?$this->printHistorique($val):null).'" />
$champ .= '<div style="text-align:right;padding-bottom:5px;margin-right:5px;">
<input style="border:1px inset silver;width:60%" class="criteres" type="text" name="'.$name.'" value="'.((!empty($val))?$this->printHistorique($val):null).'" />
</div>';
$champ .= '<div>
<hr />
$champ .= '<div style="margin-top:5px;margin-bottom:5px">
</div>';
$champ .= '</div>';

View File

@ -0,0 +1,32 @@
<?php
Class Zend_View_Helper_Textarea extends Zend_View_Helper_Abstract
{
public function printHistorique($val)
{
if(is_array($val)) {
return (implode(',', $val));
}
return ($val);
}
public function Textarea($name, $libelle)
{
$session = new Zend_Session_Namespace('ciblage');
$val = $session->ciblage[$name];
$champ = '<div>';
$champ .= '<div style="float:left;text-align:left;">
<label>'.$libelle.'</label>
</div>';
$champ .= '<div style="text-align:right;">
<textarea style="border:1px inset silver;width:60%;height:40px;" name="'.$name.'">'.((!empty($val))?$this->printHistorique($val):'Code séparé par des virgules...').'</textarea>
<br /><a class="interval" id="'.$name.'" href=""><img width="10%" src="/themes/default/images/valider.png" /></a>
</div>';
$champ .= '<div style="margin-top:5px;margin-bottom:5px">
<hr />
</div>';
$champ .= '</div>';
return ($champ);
}
}

View File

@ -10,6 +10,11 @@
case 'text':
echo $this->Text($champ['name'], $champ['libelle']);
break;
case 'textarea':
echo $this->Textarea($champ['name'], $champ['libelle']);
break;
default:
echo $champ['name'].'<br />';
}
} ?>
</div>

View File

@ -7,6 +7,14 @@
case 'interval':
echo $this->Interval($champ['name'], $champ['libelle']);
break;
case 'text':
echo $this->Text($champ['name'], $champ['libelle']);
break;
case 'textarea':
echo $this->Textarea($champ['name'], $champ['libelle']);
break;
default:
echo $champ['name'].'<br />';
}
} ?>
</div>

View File

@ -7,6 +7,14 @@
case 'interval':
echo $this->Interval($champ['name'], $champ['libelle']);
break;
case 'text':
echo $this->Text($champ['name'], $champ['libelle']);
break;
case 'textarea':
echo $this->Textarea($champ['name'], $champ['libelle']);
break;
default:
echo $champ['name'].'<br />';
}
} ?>
</div>

View File

@ -10,6 +10,11 @@
case 'text':
echo $this->Text($champ['name'], $champ['libelle']);
break;
case 'textarea':
echo $this->Textarea($champ['name'], $champ['libelle']);
break;
default:
echo $champ['name'].'<br />';
}
} ?>
</div>

View File

@ -10,6 +10,9 @@
case 'text':
echo $this->Text($champ['name'], $champ['libelle']);
break;
case 'textarea':
echo $this->Textarea($champ['name'], $champ['libelle']);
break;
}
} ?>
</div>

View File

@ -17,7 +17,7 @@
<h3><a href="">Résultats</a></h3>
<div style="padding:0px;height:100px;">
<div id="comptage" style="margin-bottom:40px;">
Nombre d'entreprises sélectionnées :
Nombre sélectionnées :
<span style="font-weight:800;" id="count"><?php echo ((!empty($this->total))?$this->total:'-');?></span>
<br/>
(dont <span style="font-weight:800;" id="insee"><?php echo ((!empty($this->insee))?$this->insee:'-');?></span> unité(s) insee)