Skip to content
Snippets Groups Projects
Commit 5dc85045 authored by ayjuillet's avatar ayjuillet
Browse files

Téléphone : Skin Jquery des écrans de notice

parent 1d90b610
Branches
Tags
No related merge requests found
Showing
with 68 additions and 39 deletions
......@@ -8,13 +8,13 @@ $avis_abon = $this->notice->getAvisAbonne();
<ul data-role="listview" data-inset="true">
<li date-theme="c">
<li data-theme="c">
<?php
echo $this->resumeAvis($this->_('Bibliothécaires'), $avis_bib);
echo $this->resumeAvis($this->_('Lecteurs du portail'), $avis_abon);?>
</li>
<li date-theme="c" data-role="list-divider">
<li data-theme="c" data-role="list-divider">
<?php echo $this->_('Avis des bibliothécaires');?>
</li>
<?php foreach ($avis_bib as $avis) { ?>
......@@ -24,7 +24,7 @@ $avis_abon = $this->notice->getAvisAbonne();
<li><?php echo 'Aucun commentaire';?></li>
<?php } ?>
<li date-theme="c" data-role="list-divider">
<li data-theme="c" data-role="list-divider">
<?php echo $this->_('Avis des lecteurs');?>
</li>
<?php foreach ($avis_abon as $avis) { ?>
......
......@@ -3,7 +3,9 @@ echo $this->toolbar($this->_("Biographie"), array('action' => 'viewnotice'), tru
echo '<h1>'.$this->notice->getTitrePrincipal().'</h1>';
?>
<div class="pave">
<?php echo $this->biographie($this->notice); ?>
</div>
<ul data-role="listview" data-inset="true">
<li>
<?php echo $this->biographie($this->notice); ?>
</li>
</ul>
......@@ -5,9 +5,25 @@ echo $this->toolbar($this->_("Résumés"),
echo '<h1>'.$this->notice->getTitrePrincipal().'</h1>';
?>
<div class="resumes">
<ul data-role="listview" data-inset="true">
<?php
$notice_html=new Class_NoticeHtml($this->notice);
echo $notice_html->getResume($this->notice->findAllResumes());
?>
</div>
$resumes = $this->notice->findAllResumes();
foreach($resumes as $resume){?>
<li data-role="list-divider">
<?php echo $this->_('Source : ') . $resume["source"];?>
</li>
<li>
<?php echo $resume["texte"];?>
</li>
<?php } ?>
<?php if (empty($resumes)) { ?>
<li><?php echo 'Aucun resumé';?></li>
<?php } ?>
</ul>
......@@ -3,12 +3,9 @@ echo $this->toolbar($this->_("Notices similaires"), array('action' => 'viewnotic
echo '<h1>'.$this->notice->getTitrePrincipal().'</h1>';
?>
<div class="pave">
<ul data-role="listview">
<?php
echo $this->listeNotices($this->notices,
count($this->notices),
1,
$this->preferences);
echo $this->listeNotices($this->notices,count($this->notices),1,$this->preferences);
?>
</div>
</ul>
<ul data-role="listview">
<?php
echo $this->toolbar("Recherche", $this->url(array(), null, true));
echo '<div>' . $this->texte_selection . '</div>';
// Liste notices
echo $this->listeNotices($this->liste,
$this->resultat['nombre'],
$this->resultat['page_cours'],
......@@ -12,3 +13,4 @@ echo $this->pager($this->resultat['nombre'],
$this->resultat['page_cours'],
$this->url_retour);
?>
</ul>
......@@ -3,7 +3,9 @@ echo $this->toolbar($this->_("Tags"), array('action' => 'viewnotice') ,true);
echo '<h1>'.$this->notice->getTitrePrincipal().'</h1>';
?>
<div class="pave">
<?php echo $this->tags; ?>
</div>
<ul data-role="listview" data-inset="true">
<li>
<?php echo $this->tags; ?>
</li>
</ul>
<?php
echo $this->toolbar($this->_("Vidéos"));
echo '<h1>'.$this->notice->getTitrePrincipal().'</h1>';?>
<ul data-role="listview" data-inset="true">
<li data-theme="c">
<?php
echo $this->toolbar($this->_("Vidéos"));
echo '<h1>'.$this->notice->getTitrePrincipal().'</h1>';
if ($this->video_id)
echo sprintf('<iframe width="320px" src="http://www.youtube.com/embed/%s"></iframe>',
$this->video_id);
else
echo sprintf('<p>%s</p>', $this->_('Aucune vidéo trouvée'));
?>
if ($this->video_id)
echo sprintf('<iframe src="http://www.youtube.com/embed/%s" frameborder="0" allowfullscreen></iframe>',$this->video_id);
else
echo $this->_('Aucune vidéo trouvée');
?>
</li>
</ul>
......@@ -3,7 +3,7 @@ echo $this->toolbar($this->_("Recherche"),
array('action' => 'simple')); ?>
<ul data-role="listview" data-inset="true">
<li date-theme="c">
<li data-theme="c">
<img src="<?php echo $this->notice->getUrlVignette();?>">
<h3><?php echo $this->iconeSupport($this->notice->getTypeDoc()) . $this->notice->getTitrePrincipal() ;?></h3>
<p><?php echo $this->notice->getAuteurPrincipal();?></p>
......
......@@ -21,7 +21,7 @@
class ZendAfi_View_Helper_Frbr extends Zend_View_Helper_HtmlElement{
protected $linksRenderer;
const NO_RESULT_MESSAGE = 'Aucun lien n\'a été trouvé';
/**
* Retourne les notices liées
*
......@@ -35,7 +35,7 @@ class ZendAfi_View_Helper_Frbr extends Zend_View_Helper_HtmlElement{
if (0 == count($sourceLinks) and 0 == count($targetLinks)){
$noResultMessage = $this->linksRenderer->returnNoResultMessage();
return $noResultMessage;
return $noresultmessage;
}
......
......@@ -25,6 +25,7 @@
// 3=liste vignette
// 4= Liste images bookflip
//////////////////////////////////////////////////////////////////////////////////////////
class ZendAfi_View_Helper_ListeNotices extends ZendAfi_View_Helper_BaseHelper {
/**
* @param array $notices
......
......@@ -56,13 +56,13 @@ class ZendAfi_View_Helper_Telephone_ListeNotices extends ZendAfi_View_Helper_Bas
if ($nombre_resultats == 1)
$html .= $this->translate()->_('1 notice trouvée');
if ($nombre_resultats > 1)
$html .= $this->translate()->_('%s notices trouvées', $nombre_resultats) . '</td><td align="right">page&nbsp;' . $page;
$html .= $this->translate()->_('%s notices trouvées', $nombre_resultats) . '</td><td align="right">page&nbsp;' . $page;
$html .= '</td></tr></table>';
// Liste en fonction du format
$html .= $this->listeVignette($notices, $preferences["liste_codes"]);
return $html;
return '<li>' . $html . '</li>';
}
......@@ -71,7 +71,7 @@ class ZendAfi_View_Helper_Telephone_ListeNotices extends ZendAfi_View_Helper_Bas
$html = '';
foreach ($data as $notice)
$this->_writeNoticeOn($notice, $champs, $html);
return '<div class="liste"><ul>' . $html . '</ul></div>';
return $html;
}
......
......@@ -62,13 +62,13 @@ class Telephone_RechercheControllerHarryPotterViewNoticeTest extends Telephone_R
/** @test */
public function titleShouldBeHarryPotter() {
$this->assertXPathContentContains('//h1', 'Harry Potter à l\'ecole des sorciers');
$this->assertXPathContentContains('//li[@data-theme="c"]', 'Harry Potter à l\'ecole des sorciers');
}
/** @test */
public function auteurShouldBeJKRowling() {
$this->assertXPathContentContains('//h1', 'J.K. Rowling');
$this->assertXPathContentContains('//li[@data-theme="c"]', 'J.K. Rowling');
}
......@@ -86,7 +86,7 @@ class Telephone_RechercheControllerHarryPotterViewNoticeTest extends Telephone_R
/** @test */
public function pageShouldContainsVignetteForHarryPotter() {
$this->assertXPath('//a[contains(@href, "recherche/grandeimage")]//img[contains(@src, "potter.jpg")]');
$this->assertXPath('//img[contains(@src, "potter.jpg")]');
}
......@@ -769,7 +769,7 @@ class Telephone_RechercheControllerHarryPotterVideoNotFoundTest extends Telephon
/** @test */
public function pageShouldDisplayAucuneVideoTrouvee() {
$this->assertXPathContentContains('//p', 'Aucune vidéo');
$this->assertXPathContentContains('//li[@data-theme="c"]', 'Aucune vidéo');
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment