diff --git a/application/modules/telephone/views/scripts/recherche/avis.phtml b/application/modules/telephone/views/scripts/recherche/avis.phtml index a651872bb1c5d29132cf286fe7b1db6a31f72f23..9820e0128342fe261b152d0aeb5ada7ae566cbb0 100644 --- a/application/modules/telephone/views/scripts/recherche/avis.phtml +++ b/application/modules/telephone/views/scripts/recherche/avis.phtml @@ -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) { ?> diff --git a/application/modules/telephone/views/scripts/recherche/biographie.phtml b/application/modules/telephone/views/scripts/recherche/biographie.phtml index 6c3eb17db60d512ff8b6109cf35b92aab4e3e251..41715985e30a749301e5941f834347b034100354 100644 --- a/application/modules/telephone/views/scripts/recherche/biographie.phtml +++ b/application/modules/telephone/views/scripts/recherche/biographie.phtml @@ -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> diff --git a/application/modules/telephone/views/scripts/recherche/resume.phtml b/application/modules/telephone/views/scripts/recherche/resume.phtml index 45d8b97c3da23a3c200653d89adb19166cd2bbb1..1ecc414f37ed65ed3d1ec2036e29d784165c3ed6 100644 --- a/application/modules/telephone/views/scripts/recherche/resume.phtml +++ b/application/modules/telephone/views/scripts/recherche/resume.phtml @@ -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> + + + + + diff --git a/application/modules/telephone/views/scripts/recherche/similaires.phtml b/application/modules/telephone/views/scripts/recherche/similaires.phtml index 778ee0127e1446684c7ff0cc47f84633361aa6c2..ed0780ecd2e331ac12ea7161e67472e85308101a 100644 --- a/application/modules/telephone/views/scripts/recherche/similaires.phtml +++ b/application/modules/telephone/views/scripts/recherche/similaires.phtml @@ -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> diff --git a/application/modules/telephone/views/scripts/recherche/simple.phtml b/application/modules/telephone/views/scripts/recherche/simple.phtml index 7a19e40090d006f3091e738c5047bdb859c6c3bc..9bda89ed472b2001e445c61593e5c876ea821266 100644 --- a/application/modules/telephone/views/scripts/recherche/simple.phtml +++ b/application/modules/telephone/views/scripts/recherche/simple.phtml @@ -1,7 +1,8 @@ +<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> diff --git a/application/modules/telephone/views/scripts/recherche/tags.phtml b/application/modules/telephone/views/scripts/recherche/tags.phtml index e14ed81d205e3892ebbbd69141283610419d4119..6b3b509f7890168bab89f1dac518e00dc5728651 100644 --- a/application/modules/telephone/views/scripts/recherche/tags.phtml +++ b/application/modules/telephone/views/scripts/recherche/tags.phtml @@ -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> diff --git a/application/modules/telephone/views/scripts/recherche/videos.phtml b/application/modules/telephone/views/scripts/recherche/videos.phtml index cac0db02726078336201ebc13268135841904042..d8bcabcaf056de7d8f2b21a579fdd619cd655813 100644 --- a/application/modules/telephone/views/scripts/recherche/videos.phtml +++ b/application/modules/telephone/views/scripts/recherche/videos.phtml @@ -1,11 +1,20 @@ + + + <?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> + + + diff --git a/application/modules/telephone/views/scripts/recherche/viewnotice.phtml b/application/modules/telephone/views/scripts/recherche/viewnotice.phtml index efd89d825513f748d120c57cf9b9f940c7870bb7..105fa3cc7f68561588f58613a813f60729f33d42 100644 --- a/application/modules/telephone/views/scripts/recherche/viewnotice.phtml +++ b/application/modules/telephone/views/scripts/recherche/viewnotice.phtml @@ -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> diff --git a/library/ZendAfi/View/Helper/Frbr.php b/library/ZendAfi/View/Helper/Frbr.php index bce96c5ea0e13814d2a5951fe6949841312c2828..378aaa314b948c641c5c0e5187b3a557ea9e4043 100644 --- a/library/ZendAfi/View/Helper/Frbr.php +++ b/library/ZendAfi/View/Helper/Frbr.php @@ -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; } diff --git a/library/ZendAfi/View/Helper/ListeNotices.php b/library/ZendAfi/View/Helper/ListeNotices.php index 65bd18edf88a407c47d609017a73d82f4866067a..df2171c0dd07a8685e06a80a4de4f1b01a98236f 100644 --- a/library/ZendAfi/View/Helper/ListeNotices.php +++ b/library/ZendAfi/View/Helper/ListeNotices.php @@ -25,6 +25,7 @@ // 3=liste vignette // 4= Liste images bookflip ////////////////////////////////////////////////////////////////////////////////////////// + class ZendAfi_View_Helper_ListeNotices extends ZendAfi_View_Helper_BaseHelper { /** * @param array $notices diff --git a/library/ZendAfi/View/Helper/Telephone/ListeNotices.php b/library/ZendAfi/View/Helper/Telephone/ListeNotices.php index d35485534f9660bcbc2e28cfeb5d58ea6472f491..7a25598295fd16cdc1ed184ca3babfdfbfeda9ba 100644 --- a/library/ZendAfi/View/Helper/Telephone/ListeNotices.php +++ b/library/ZendAfi/View/Helper/Telephone/ListeNotices.php @@ -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 ' . $page; + $html .= $this->translate()->_('%s notices trouvées', $nombre_resultats) . '</td><td align="right">page ' . $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; } diff --git a/tests/application/modules/telephone/controllers/RechercheControllerHarryPotterTest.php b/tests/application/modules/telephone/controllers/RechercheControllerHarryPotterTest.php index 2e50f263828d24b3d2717e8895e0e0e611096b0d..0c22736c4992f3fb42f4d30040d0634bdb0f4c0a 100644 --- a/tests/application/modules/telephone/controllers/RechercheControllerHarryPotterTest.php +++ b/tests/application/modules/telephone/controllers/RechercheControllerHarryPotterTest.php @@ -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'); } }