summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-04-13 13:02:21 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-04-13 13:02:21 +0200
commitc2bf3ead8ae15288eb99c82643fb0cbd595e1454 (patch)
tree2a4da7c310f3506aa478eade79d8a807d809f2bd /app/views
parent1cc118acdc52895ca500c93b36bbb5cf3a149bc7 (diff)
Export des flux au format RSS pleinement supporté (voir issue #34) - possibilité de les filtrer comme pour la vue principale
Diffstat (limited to 'app/views')
-rwxr-xr-xapp/views/helpers/rss.phtml (renamed from app/views/rss/public.phtml)9
-rw-r--r--app/views/index/index.phtml9
2 files changed, 12 insertions, 6 deletions
diff --git a/app/views/rss/public.phtml b/app/views/helpers/rss.phtml
index 04a035699..b75e6d3bc 100755
--- a/app/views/rss/public.phtml
+++ b/app/views/helpers/rss.phtml
@@ -3,13 +3,12 @@
<channel>
<title><?php echo View::title(); ?></title>
<link><?php echo Url::display(); ?></link>
- <description>Flux public de <?php echo View::title(); ?></description>
- <language>fr</language>
+ <description>Flux RSS de <?php echo View::title(); ?></description>
<pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate>
<lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate>
- <atom:link href="<?php echo Url::display(array('a' => 'rss')); ?>" rel="self" type="application/rss+xml" />
+ <atom:link href="<?php echo _url ('index', 'index', 'output', 'rss'); ?>" rel="self" type="application/rss+xml" />
<?php
-$items = $this->itemPaginator->items ();
+$items = $this->entryPaginator->items ();
foreach ($items as $item) {
?>
<item>
@@ -20,7 +19,7 @@ foreach ($items as $item) {
<dc:creator><?php echo $author; ?></dc:creator>
<?php } ?>
<description><![CDATA[<?php
- echo html_entity_decode($item->notes (false, false));
+ echo $item->content ();
?>]]></description>
<pubDate><?php echo date('D, d M Y H:i:s O', $item->date (true)); ?></pubDate>
<guid><?php echo $item->guid (); ?></guid>
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index f9e953858..cd0ff0504 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -1,3 +1,10 @@
+<?php
+if (Request::param ('output', '') == 'rss') {
+ $this->renderHelper ('rss');
+ return;
+}
+?>
+
<?php $this->partial ('aside_flux'); ?>
<?php $this->partial ('nav_menu'); ?>
@@ -67,7 +74,7 @@ if (isset ($this->entryPaginator)) {
<li class="item">
<div class="dropdown">
<div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>
- <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>">Partager</a>
+ <i class="icon i_share"></i> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>">Partager</a>
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close"><i class="icon i_close"></i></a></li>