Skip to content
Snippets Groups Projects
Commit 540fcc89 authored by Laurent's avatar Laurent
Browse files

hotline #38468: adapt article views to phone

parent 0c900bf7
Branches
Tags
3 merge requests!1659Master,!1587Master,!1540Hotline#38468 version mobile clic sur rebond mediatheque inactif
...@@ -311,11 +311,6 @@ class CmsController extends ZendAfi_Controller_Action { ...@@ -311,11 +311,6 @@ class CmsController extends ZendAfi_Controller_Action {
$this->view->show_content = 'FullContent'; $this->view->show_content = 'FullContent';
} }
$this->_renderArticlesViewScript(); $this->renderScript('cms/articlesview.phtml');
}
protected function _renderArticlesViewScript() {
$this->renderScript('cms/articlesview.phtml');
} }
} }
\ No newline at end of file
...@@ -22,9 +22,6 @@ ...@@ -22,9 +22,6 @@
require_once ROOT_PATH.'application/modules/opac/controllers/CmsController.php'; require_once ROOT_PATH.'application/modules/opac/controllers/CmsController.php';
class Telephone_CmsController extends CmsController { class Telephone_CmsController extends CmsController {
protected function _renderArticlesViewScript() {
$this->renderScript('cms/articleviewbydate.phtml');
}
} }
?> ?>
\ No newline at end of file
<?php
echo $this->toolbar($this->_('Articles'),
$this->url(array(), null, true));
?>
<?php if (0 < count($this->articles)) { ?>
<div class="liste"><ul>
<?php
foreach ($this->articles as $article) {
?>
<li class="lien">
<?php echo $this->tagArticleEvent($article);?>
<span><?php
echo $this->tagAnchor(
$this->url(array('cat' => $article->getIdCat())),
$article->getCategorie()->getLibelle(),
array('class' => 'calendar_event_info')
);?> - <?php
echo $this->tagAnchor(
$article->getUrl(),
$article->getTitre(),
array('class' => 'calendar_event_title')
); ?>
</span>
</li>
<?php } ?>
</ul>
</div>
<?php
} else {
echo '<div class="pave">'.$this->_('Aucun contenu').'</div>';
} ?>
...@@ -10,7 +10,7 @@ echo $this->toolbar($this->_('Articles'), ...@@ -10,7 +10,7 @@ echo $this->toolbar($this->_('Articles'),
<h2><?php echo ('' == $bibliotheque) ? $this->_('Portail') : $this->libelle_bibs[$bibliotheque];?></h2> <h2><?php echo ('' == $bibliotheque) ? $this->_('Portail') : $this->libelle_bibs[$bibliotheque];?></h2>
<ul> <ul>
<?php <?php
foreach ($this->articles as $article) { ?> foreach ($articles as $article) { ?>
<li class="lien"> <li class="lien">
<?php echo $this->tagArticleEvent($article);?> <?php echo $this->tagArticleEvent($article);?>
<span><?php <span><?php
......
...@@ -32,31 +32,29 @@ abstract class AbstractCmsControllerTelephoneTestCase extends TelephoneAbstractC ...@@ -32,31 +32,29 @@ abstract class AbstractCmsControllerTelephoneTestCase extends TelephoneAbstractC
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Article') Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Article')
->whenCalled('getArticlesByPreferences') ->whenCalled('getArticlesByPreferences')
->answers(array( ->answers([
Class_Article::getLoader() Class_Article::newInstanceWithId(1)
->newInstanceWithId(1) ->setTitre('La fête de la banane')
->setTitre('La fête de la banane') ->setContenu('Une fête qui glisse !')
->setContenu('Une fête qui glisse !') ->setEventsDebut('2011-09-03')
->setEventsDebut('2011-09-03') ->setEventsFin('2011-10-03')
->setEventsFin('2011-10-03') ->setCategorie(
->setCategorie( Class_ArticleCategorie::newInstanceWithId(1)
Class_ArticleCategorie::getLoader()->newInstanceWithId(1) ->setLibelle('Alimentaire')
->setLibelle('Alimentaire') ->setBib(Class_Bib::getLoader()
->setBib(Class_Bib::getLoader() ->newInstanceWithId(1)
->newInstanceWithId(1) ->setLibelle('Bonlieu'))
->setLibelle('Bonlieu')) ),
), Class_Article::newInstanceWithId(1)
Class_Article::getLoader() ->setTitre('La fête de la frite')
->newInstanceWithId(1) ->setContenu('')
->setTitre('La fête de la frite') ->setEventsDebut('2011-09-03')
->setContenu('') ->setEventsFin('2011-09-03')
->setEventsDebut('2011-09-03') ->setCategorie(
->setEventsFin('2011-09-03') Class_ArticleCategorie::newInstanceWithId(1)
->setCategorie( ->setLibelle('Alimentaire')
Class_ArticleCategorie::getLoader()->newInstanceWithId(1) ),
->setLibelle('Alimentaire') ]);
),
));
} }
......
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