summaryrefslogtreecommitdiff
path: root/app/views/helpers/view/reader_view.phtml
blob: e37c78cb45075b7df7fcb67157b9356ed3b25c58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
$this->partial ('nav_menu');

if (!empty($this->entries)) {
	$lazyload = $this->conf->lazyload;
	$content_width = $this->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->cat_aside, $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 (); ?>
					<?php echo $author != '' ? Minz_Translate::t ('by_author', $author) . ' — ' : ''; ?>
					<?php echo $item->date (); ?>
				</div>

				<?php
					if ($lazyload) {
						echo lazyimg($item->content ());
					} else {
						echo $item->content();
					}
				?>
			</div>
		</div>
	</div>
	<?php } ?>

	<?php $this->renderHelper('pagination'); ?>
</div>

<?php } else { ?>
<div id="stream" class="alert alert-warn reader">
	<span class="alert-head"><?php echo Minz_Translate::t ('no_feed_to_display'); ?></span>
	<?php echo Minz_Translate::t ('think_to_add'); ?>
</div>
<?php } ?>