Amélioration de l'affichage de la version mobile

This commit is contained in:
Michael RICOIS 2012-04-20 08:07:15 +00:00
parent 8547e8ccc4
commit d5d94d4860
4 changed files with 80 additions and 38 deletions

View File

@ -0,0 +1,8 @@
<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="f">
<li data-role="list-divider">Overview</li>
<li><a href="<?=$this->url(array('controller'=>'recherche', 'action'=>'entreprise'), null, true);?>">Recherche Entreprise</a></li>
<li><a href="<?=$this->url(array('controller'=>'recherche', 'action'=>'dirigeant'), null, true);?>">Recherche Dirigeants</a></li>
<li><a href="<?=$this->url(array('controller'=>'recherche', 'action'=>'actionnaire'), null, true);?>">Recherche Actionnaires</a></li>
<li><a href="<?=$this->url(array('controller'=>'recherche', 'action'=>'annonce'), null, true);?>">Recherche Annonces</a></li>
<li><a href="<?=$this->url(array('controller'=>'recherche', 'action'=>'entreprise'), null, true);?>">Recherche dans vos surveillances</a></li>
</ul>

View File

@ -10,9 +10,11 @@
<body>
<div data-role="page" data-theme="b">
<div data-role="header">
<a href="index.html" data-role="button" data-icon="home" data-iconpos="notext">Menu</a>
<h1>Titre</h1>
<a href="index.html" data-role="button" data-icon="search" data-iconpos="notext">Recherche</a>
<a href="<?=$this->url(array('controller'=>'index'), null, true)?>" data-role="button"
data-icon="home" data-iconpos="notext">Menu</a>
<h1><?=$this->headTitle()?></h1>
<a href="<?=$this->url(array('controller'=>'index'), null, true)?>" data-role="button"
data-icon="search" data-iconpos="notext">Recherche</a>
</div>
<div data-role="content">
<?=$this->layout()->content?>

View File

@ -6,8 +6,6 @@
<?=$this->message?></p>
</div>
<?php }?>
<h3>RECHERCHE ENTREPRISE</h3>
<form class="recherche" name="<?=$this->form->getName()?>"
method="<?=$this->form->getMethod()?>" action="<?=$this->form->getAction()?>">
<?=$this->form->type?>
@ -19,6 +17,8 @@
</div>
<div data-role="fieldcontain">
<?=$this->form->numero?>
</div>
<div data-role="fieldcontain">
<?=$this->form->voie?>
</div>
<div data-role="fieldcontain">
@ -30,9 +30,11 @@
<div data-role="fieldcontain">
<?=$this->form->naf?>
</div>
<?php if ($this->form->pays) {?>
<div data-role="fieldcontain">
<?=$this->form->pays?>
</div>
<?php }?>
<div data-role="fieldcontain">
<?=$this->form->submit?>
<?=$this->form->reset?>

View File

@ -1,7 +1,6 @@
<?php
class Form_RechercheEntreprise extends Zend_Form
{
{
public $elementDecorators = array(
'ViewHelper',
'Errors',
@ -18,15 +17,20 @@ class Form_RechercheEntreprise extends Zend_Form
require_once 'Scores/Utilisateur.php';
$user = new Utilisateur();
$theme = '';
if ( Zend_Registry::isRegistered('theme') ) {
$theme = Zend_Registry::get('theme');
if ( $theme->name=='mobile' ) {
$this->elementDecorators = array(
'ViewHelper',
'Errors',
array('Label'),
);
}
$rtheme = Zend_Registry::get('theme');
if ( !empty($rtheme->name) ) {
$theme = $rtheme->name;
}
}
if ( $theme=='mobile' ) {
$this->elementDecorators = array(
'ViewHelper',
'Errors',
array('Label'),
);
}
$this->setName('recherche');
@ -63,29 +67,55 @@ class Form_RechercheEntreprise extends Zend_Form
),
));
//numero
$this->addElement('text', 'numero', array(
'filters' => array('StringTrim'),
'label' => 'N° & Voie',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 2,
'maxlength' => 4,
),
));
//voie
$this->addElement('text', 'voie', array(
'filters' => array('StringTrim'),
'label' => '',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 20,
'maxlength' => 100,
),
));
if ( $theme=='mobile' ) {
//numero
$this->addElement('text', 'numero', array(
'filters' => array('StringTrim'),
'label' => 'N°',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 2,
'maxlength' => 4,
),
));
//voie
$this->addElement('text', 'voie', array(
'filters' => array('StringTrim'),
'label' => 'Voie',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 20,
'maxlength' => 100,
),
));
} else {
//numero
$this->addElement('text', 'numero', array(
'filters' => array('StringTrim'),
'label' => 'N° & Voie',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 2,
'maxlength' => 4,
),
));
//voie
$this->addElement('text', 'voie', array(
'filters' => array('StringTrim'),
'label' => '',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 20,
'maxlength' => 100,
),
));
}
//cpVille
$this->addElement('text', 'cpVille', array(