Travail sur la structure html, issue #0001008

This commit is contained in:
Michael RICOIS 2012-01-03 08:44:26 +00:00
parent 1dba6f6ca6
commit a3ba4ad0fa
8 changed files with 78 additions and 54 deletions

View File

@ -17,8 +17,7 @@ Class Zend_View_Helper_Interval extends Zend_View_Helper_Abstract
{
$minMax = $this->getMinMax($name);
$champ = '<div class="ui-state-default" style="margin-top:5px;padding:5px;'/*.((empty($session->ciblage[$name]))?'display:none':null)*/.';">';
$champ .= '<li>';
$champ = '<div style="margin-top:5px;padding:5px;'/*.((empty($session->ciblage[$name]))?'display:none':null)*/.';">';
$champ .= '<div style="margin-top:3px;float:left;text-align:left;">
<label for="amount">'.$libelle .': </label>
</div>';
@ -26,7 +25,6 @@ Class Zend_View_Helper_Interval extends Zend_View_Helper_Abstract
<input name="'.$name.'" class="range slider_Text" type="text" id="'.$name.'" min="'.$minMax[0].'" max="'.$minMax[1].'" style="margin-left:10px;margin-top:3px;float:left;border:0; color:black; font-weight:bold;" />
<div input="'.$name.'" class="slider-range"></div>
</div>';
$champ .= '</li>';
$champ .= '</div>';
return ($champ);

View File

@ -7,9 +7,9 @@ Class Zend_View_Helper_Select extends Zend_View_Helper_Abstract
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$value = $session->getCritere($name);
$champ .= '<div class="'.$name.' ui-state-default" style="cursor:move;'.((!is_string($session->ciblage[$name]) or $session->ciblage[$name] == 'tous')?null:'background-color:#CCF8D2;').'padding:5px;">';
$champ .= '<li>';
$champ .= '<div class="'.$name.' '.((!is_string($value) or $value == 'tous')?null:'background-color:#CCF8D2;').'padding:5px;">';
$champ .= '<div style="float:left;text-align:left;">
<label>'.$libelle.'</label>
</div>';
@ -24,10 +24,8 @@ Class Zend_View_Helper_Select extends Zend_View_Helper_Abstract
$champ .= '<option value="'.$v.'"'.$select.'>'.$item.'</option>';
}
$champ .= '</select>
</div>';
$champ .= '</li>';
</div>';
$champ .= '</div>';
return ($champ);
}

View File

@ -1,23 +1,28 @@
<div>
<?php foreach($this->champs as $champ){
<ul id="fieldsblock">
<?php
$i=0;
foreach($this->champs as $champ) {
$valeur = explode(':', $champ['type']);
switch ($valeur[0]) {
case 'select':
echo $this->Select($champ['name'], $champ['libelle'], $champ['parametres']);
echo '<li>'.$this->Select($champ['name'], $champ['libelle'], $champ['parametres']).'</li>';
break;
case 'interval':
echo $this->Interval($champ['name'], $champ['libelle'], (isset($valeur[1])?$valeur[1]:false));
echo '<li>'.$this->Interval($champ['name'], $champ['libelle'], (isset($valeur[1])?$valeur[1]:false)).'</li>';
break;
case 'text':
echo $this->Text($champ['name'], $champ['libelle']);
echo '<li>'.$this->Text($champ['name'], $champ['libelle']).'</li>';
break;
case 'textarea':
echo $this->Textarea($champ['name'], $champ['libelle']);
echo '<li>'.$this->Textarea($champ['name'], $champ['libelle']).'</li>';
break;
default:
echo $champ['name'].'<br />';
echo '<li>'.$champ['name'].'</li>'.'<br />';
}
} ?>
}
?>
</ul>
</div>
<div style="text-align:right;">

View File

@ -1,8 +1,4 @@
<style>
ul {list-style-type: none;}
.ui-state-default {
margin-top:5px;
}
.slider-range
{
width:150px;
@ -14,28 +10,31 @@ ul {list-style-type: none;}
}
</style>
<div>
<ul id="sortable">
<?php $i=0; foreach($this->champs as $champ){
$valeur = explode(':', $champ['type']);
switch ($valeur[0]) {
case 'select':
echo $this->Select($champ['name'], $champ['libelle'], $champ['parametres']);
$i++;
break;
case 'interval':
echo $this->Interval($champ['name'], $champ['libelle'], (isset($valeur[1])?$valeur[1]:false));
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 />';*/
}
} ?>
</ul>
<ul id="fieldsblock">
<?php
$i=0;
foreach($this->champs as $champ) {
$valeur = explode(':', $champ['type']);
switch ($valeur[0]) {
case 'select':
echo '<li>'.$this->Select($champ['name'], $champ['libelle'], $champ['parametres']).'</li>';
$i++;
break;
case 'interval':
echo '<li>'.$this->Interval($champ['name'], $champ['libelle'], (isset($valeur[1])?$valeur[1]:false)).'</li>';
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 />';*/
}
}
?>
</ul>
</div>
<div style="text-align:right;margin-top:20px;">

View File

@ -1,12 +1,15 @@
<div>
<?php foreach($this->champs as $champ){
<ul id="fieldsblock">
<?php
$i=0;
foreach($this->champs as $champ) {
$valeur = explode(':', $champ['type']);
switch ($valeur[0]) {
case 'select':
//echo $this->SelectBilan($champ['name'], $champ['libelle'], $champ['parametres']);
break;
case 'interval':
echo $this->Interval($champ['name'], $champ['libelle'], (isset($valeur[1])?$valeur[1]:false));
echo '<li>'.$this->Interval($champ['name'], $champ['libelle'], (isset($valeur[1])?$valeur[1]:false)).'</li>';
break;
/*case 'text':
echo $this->Text($champ['name'], $champ['libelle']);
@ -17,9 +20,12 @@
default:
echo $champ['name'].'<br />';*/
}
} ?>
}
?>
</ul>
</div>
<div style="text-align:right;">
<a href="">Réinitialiser les critères financiers</a>
</div>

View File

@ -1,5 +1,11 @@
<div>
<?php foreach($this->champs as $champ){
<ul id="fieldsblock">
<?php
$i=0;
foreach($this->champs as $champ) {
?>
<li>
<?php
$valeur = explode(':', $champ['type']);
switch ($valeur[0]) {
case 'select':
@ -17,7 +23,12 @@
default:
echo $champ['name'].'<br />';
}
} ?>
?>
</li>
<?php
}
?>
</ul>
</div>
<div style="text-align:right;">

View File

@ -1,23 +1,28 @@
<div>
<?php foreach($this->champs as $champ){
<ul id="fieldsblock">
<?php
$i=0;
foreach($this->champs as $champ) {
$valeur = explode(':', $champ['type']);
switch ($valeur[0]) {
case 'select':
echo $this->Select($champ['name'], $champ['libelle'], $champ['parametres']);
echo '<li>'.$this->Select($champ['name'], $champ['libelle'], $champ['parametres']).'</li>';
break;
case 'interval':
echo $this->Interval($champ['name'], $champ['libelle'], (isset($valeur[1])?$valeur[1]:false));
echo '<li>'.$this->Interval($champ['name'], $champ['libelle'], (isset($valeur[1])?$valeur[1]:false)).'</li>';
break;
case 'text':
echo $this->Text($champ['name'], $champ['libelle']);
echo '<li>'.$this->Text($champ['name'], $champ['libelle']).'</li>';
break;
case 'textarea':
echo $this->Textarea($champ['name'], $champ['libelle']);
echo '<li>'.$this->Textarea($champ['name'], $champ['libelle']).'</li>';
break;
default:
echo $champ['name'].'<br />';
echo '<li>'.$champ['name'].'</li>'.'<br />';
}
} ?>
}
?>
</ul>
</div>
<div style="text-align:right;">

View File

@ -246,3 +246,5 @@ h3 {
{
height:200px;
}
#fieldsblock ul { list-style-type: none; }