Dev#25728 bonus ajouter la possibilite de flux rss a la boite sitotheque
Merged
requested to merge dev#25728_bonus_ajouter_la_possibilite_de_flux_rss_a_la_boite_sitotheque into WIP
Merge request reports
Activity
Filter activity
39 39 <td class="droite">Titre </td> 40 40 <td class="gauche"><input type="text" name="titre" size="50" value="<?php print($this->preferences['titre']); ?>"></td> 41 41 </tr> 42 <tr> 43 <td class="droite">Proposer un fil Rss </td> 44 <td class="gauche"> 45 <?php echo $this->formCheckbox('rss_avis', 46 $this->preferences['rss_avis'], 47 null, 48 array('1', '0')) ?> 49 </td> 62 [ 63 'title' => html_entity_decode($data->getTitre()), 64 'link' => (($this->_type == 'SITO') 65 ? $data->getUrl() 66 : $this->getActionController()->getRequest()->getScheme() . '://' 67 . $this->getActionController()->getRequest()->getServer('HTTP_HOST') 68 . $this->_view->url($data->getUrl())), 69 'lastUpdate' => (($this->_type == 'SITO') 70 ? strtotime($data->getDateMaj()) 71 : strtotime($data->getPubDate())), 72 'description' => (($this->_type == 'SITO') 73 ? html_entity_decode($data->getDescription()) 74 : html_entity_decode(Class_CmsUrlTransformer::imgUrlRelativeToAbsolute($this->_view->tagArticleEvent($data) 75 . $data->getFullContent()))) 76 ]; 77 } 83 $this->getActionController()->getResponse()->setBody($feed->saveXML()); 84 } 85 86 87 protected function _getObjectDatas($id_module, $profil, $preferences) { 88 if ($this->_type == 'SITO') 89 return Class_Sitotheque::getSitesFromIdsAndCategories( 90 explode('-', $preferences['id_items']), 91 explode('-', $preferences['id_categorie']));; 92 if ($this->_type == 'NEWS') 93 return Class_Calendar::getAllnextEvents($id_module, $profil); 94 if ($this->_type == 'ARTICLE') { 95 $articles = Class_Article::getArticlesByPreferences($preferences); 96 return Class_Article::filterByLocaleAndWorkflow($articles); 97 } 98 } 92 if ($this->_type == 'NEWS') 93 return Class_Calendar::getAllnextEvents($id_module, $profil); 94 if ($this->_type == 'ARTICLE') { 95 $articles = Class_Article::getArticlesByPreferences($preferences); 96 return Class_Article::filterByLocaleAndWorkflow($articles); 97 } 98 } 99 100 101 protected function _getDescription() { 102 if ($this->_type == 'NEWS') 103 return 'Agenda: '; 104 if ($this->_type == 'ARTICLE') 105 return 'Articles: '; 106 return ''; 107 } 107 } 108 109 110 protected function _getLink($profil, $id_module) { 111 if ($this->_type == 'NEWS') 112 return $profil->urlForModule('cms', 'articleviewbydate', $id_module); 113 if ($this->_type == 'ARTICLE') 114 return $profil->urlForModule('cms', 'viewselection', $id_module); 115 return ''; 116 } 117 118 119 public function direct($id_module, $id_profil, $view, $type) { 120 $this->renderRss($id_module, $id_profil, $view, $type); 121 } 122 } 315 315 public function displayOrderSelectionShouldBePresent() { 316 316 $this->assertXPath('//input[@type="radio"][@name="display_order"][@value="Selection"]'); 317 317 } 318 319 /** @test */ 320 public function rssFlowPreferenceShouldBePresent() { 321 $this->assertXPath('//input[@type="checkbox"][@name="rss_avis"]', $this->_response->getBody()); 322 }
Please register or sign in to reply