mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-16 05:19:20 -04:00
Now you can open the original page in the reader view with the same shortcut you'll use in the normal view. I've changed how we identify the link to make it more flexible. The previous way was too restrictive since the selector used a really strict path to get the url. There was another way to achieve the same thing without changing the selector. It was quite ugly since some meaningless class would be added on the markup to match the selector query. See #1400
48 lines
1.6 KiB
PHTML
48 lines
1.6 KiB
PHTML
<?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 target="_blank" rel="noreferrer" class="go_website" 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 } ?>
|