summaryrefslogtreecommitdiff
path: root/app/views/index/reader.phtml
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-24 12:51:17 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-24 12:51:17 +0200
commit0d6993fe08cf57121eadb2aa0e4208420756165a (patch)
tree30ad643938c4ce5ff02286345694221df9d01a40 /app/views/index/reader.phtml
parent9fc536c28763260dd996f64e2cd451605faa64d3 (diff)
Reader view comes back!
See https://github.com/marienfressinaud/FreshRSS/issues/634
Diffstat (limited to 'app/views/index/reader.phtml')
-rw-r--r--app/views/index/reader.phtml44
1 files changed, 44 insertions, 0 deletions
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
new file mode 100644
index 000000000..f07868488
--- /dev/null
+++ b/app/views/index/reader.phtml
@@ -0,0 +1,44 @@
+<?php
+$this->partial('nav_menu');
+
+if (!empty($this->entries)) {
+ $lazyload = FreshRSS_Context::$conf->lazyload;
+ $content_width = FreshRSS_Context::$conf->content_width;
+?>
+
+<div id="stream" class="reader">
+ <?php foreach ($this->entries as $item) { ?>
+
+ <div class="flux<?php echo !$item->isRead() ? ' not_read' : ''; ?><?php echo $item->isFavorite() ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id(); ?>">
+ <div class="flux_content">
+ <div class="content <?php echo $content_width; ?>">
+ <?php
+ $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $item->feed()); //We most likely already have the feed object in cache
+ if (empty($feed)) $feed = $item->feed(true);
+ ?>
+ <a href="<?php echo $item->link(); ?>">
+ <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span>
+ </a>
+ <h1 class="title"><?php echo $item->title(); ?></h1>
+
+ <div class="author"><?php
+ $author = $item->author();
+ echo $author != '' ? _t('by_author', $author) . ' — ' : '',
+ $item->date();
+ ?></div>
+
+ <?php echo $item->content(); ?>
+ </div>
+ </div>
+ </div>
+ <?php } ?>
+
+ <?php $this->renderHelper('pagination'); ?>
+</div>
+
+<?php } else { ?>
+<div id="stream" class="prompt alert alert-warn reader">
+ <h2><?php echo _t('no_feed_to_display'); ?></h2>
+ <a href="<?php echo _url('subscription', 'index'); ?>"><?php echo _t('think_to_add'); ?></a><br /><br />
+</div>
+<?php } ?>