Skip to content
Snippets Groups Projects
Commit 0e91a391 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Merge branch 'hotline#161592_bug_affichage_articles_agenda_affichage_sans_les_styles' into 'master'

hotline#161592 : display articles : when selected in an agenda view, articles...

See merge request !4578
parents a91958de 914d2dc6
Branches
Tags
1 merge request!4578hotline#161592 : display articles : when selected in an agenda view, articles...
Pipeline #18943 passed with stage
in 19 minutes and 23 seconds
- correctif #161592 : Agenda : correction de l'affichage de la consultation des évènements dans le thème Historique.
\ No newline at end of file
......@@ -106,10 +106,10 @@ abstract class ZendAfi_View_Helper_Article_RenderAbstract
}
public function renderReadFullArticle($article) {
public function renderReadFullArticle(Class_Article $article) : string {
if (!$article->hasSummary())
return '';
return $this->view->tagAnchor($this->view->url($article->getUrl()),
return $this->view->tagAnchor($this->view->url($article->getUrl(), null, true),
$this->view->_("Lire l'article complet"),
['class' => 'article_read_full']);
}
......
......@@ -16,11 +16,13 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_View_Helper_Article_RenderContainer_Empty extends ZendAfi_View_Helper_BaseHelper {
public function renderTitre($article) {
return $this->view->tagAnchor($this->view->url($article->getUrl()),
public function renderTitre(Class_Article $article) : string {
return $this->view->tagAnchor($this->view->url($article->getUrl(),
null,
true),
$article->getTitre());
}
......
......@@ -1786,3 +1786,73 @@ class CmsControllerCalendarActionFullTest extends AbstractControllerTestCase {
$this->assertXPath('//a[@href="/cms/articleviewbydate/d/2011-02-17/id_module/1/id_profil/3/select_id_categorie/all"]');
}
}
class CmsControllerCalendarActionWallTest extends AbstractControllerTestCase {
public function setUp() {
parent::setUp();
$cfg_accueil =
['modules' =>
[ '1' => [
'division' => '1',
'type_module' => 'CALENDAR',
'preferences' => [
'titre' => 'Calendrier',
'id_categorie' => 30,
'display_cat_select' => false,
'display_event_info' => 'bib',
'rss_avis' => false,
'ical_feed' => true,
'display_next_event' => true,
'display_order' => 'EventDebut',
'display_mode' => 'FullArticle',
'display_full_page' => true,
'nb_events' => 15,
'display_calendar' => true,
'mode-affichage' => 'wall',
'layout' => 'grid',
'event_filter' => 'none',
'id_module' => 1,
'profile_id' => 3,
'styles_reload' => true]]],
'options' => []];
$this->fixture(Class_Profil::class,
['id' => 3,
'browser' => 'opac',
'libelle' => 'Rendez-vous',
'cfg_accueil' => $cfg_accueil]);
$nanook2 = $this->fixture(Class_Article::class,
['id' => 4,
'titre' => 'Nanook 2 en prod !',
'contenu' => 'youpi !',
'description' => 'youpi !',
'contenu' => 'youpi !',
'events_debut' => '2011-02-17',
'events_fin' => '2011-02-22',
'tags' => 'logiciel']);
$this->onLoaderOfModel(Class_Article::class)
->whenCalled('getArticlesByPreferences')
->answers([$nanook2]);
$this->dispatch('/cms/calendar/id_profil/3/id_module/1/date/2011-02/render/ajax');
}
/** @test */
public function articleTitleLinkShouldDisplayUrlWithoutContext() {
$this->assertXPath('//span[@class="title"]/a[@href="/cms/articleview/id/4"]');
}
/** @test */
public function lirelArticleLinkShouldBeDirectAccessToArticle() {
$this->assertXPath('//a[@href="/cms/articleview/id/4"][@class="article_read_full"]');
}
}
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