diff options
| author | 2015-01-31 14:45:37 +0100 | |
|---|---|---|
| committer | 2015-01-31 14:45:37 +0100 | |
| commit | a97bbd9bd54c5fa56d54b3c214cf4e8af96af8b2 (patch) | |
| tree | 6e83890bc1b3814a12c3b7bedc0d5944f30f507b /app/views/index/reader.phtml | |
| parent | 42fd539a1b14f883077048a35864b4294b6efe94 (diff) | |
| parent | e91b72b63cd11ae3c4f59e48439e93955242c673 (diff) | |
Merge branch 'dev'
Conflicts:
CHANGELOG
README.fr.md
README.md
app/Controllers/feedController.php
app/Controllers/indexController.php
app/i18n/en.php
app/i18n/fr.php
app/views/helpers/view/normal_view.phtml
app/views/stats/index.phtml
app/views/stats/repartition.phtml
constants.php
p/scripts/main.js
Diffstat (limited to 'app/views/index/reader.phtml')
| -rw-r--r-- | app/views/index/reader.phtml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml new file mode 100644 index 000000000..a19ee322e --- /dev/null +++ b/app/views/index/reader.phtml @@ -0,0 +1,47 @@ +<?php +$this->partial('nav_menu'); + +if (!empty($this->entries)) { + $lazyload = FreshRSS_Context::$user_conf->lazyload; + $content_width = FreshRSS_Context::$user_conf->content_width; +?> + +<div id="stream" class="reader"><?php + foreach ($this->entries as $item) { + $item = Minz_ExtensionManager::callHook('entry_before_display', $item); + if (is_null($item)) { + continue; + } + ?><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('gen.short.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('index.feed.empty'); ?></h2> + <a href="<?php echo _url('subscription', 'index'); ?>"><?php echo _t('index.feed.add'); ?></a><br /><br /> +</div> +<?php } ?> |
