aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/index/normal/entry_header.phtml
blob: 86298e59f9a99ea57fb2f63d7241f6b911bdf0ea (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
<?php
	$topline_read = FreshRSS_Context::$user_conf->topline_read;
	$topline_favorite = FreshRSS_Context::$user_conf->topline_favorite;
	$topline_date = FreshRSS_Context::$user_conf->topline_date;
	$topline_link = FreshRSS_Context::$user_conf->topline_link;
?><ul class="horizontal-list flux_header"><?php
	if (FreshRSS_Auth::hasAccess()) {
		if ($topline_read) {
			?><li class="item manage"><?php
				$arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $this->entry->id()));
				if ($this->entry->isRead()) {
					$arUrl['params']['is_read'] = 0;
				}
				?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
					echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
			?></li><?php
		}
		if ($topline_favorite) {
			?><li class="item manage"><?php
				$arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $this->entry->id()));
				if ($this->entry->isFavorite()) {
					$arUrl['params']['is_favorite'] = 0;
				}
				?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
					echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
			?></li><?php
		}
	}
	?><li class="item website"><a href="<?php echo _url('index', 'index', 'get', 'f_' . $this->feed->id()); ?>"><img class="favicon" src="<?php echo $this->feed->favicon(); ?>" alt="✇" /> <span><?php echo $this->feed->name(); ?></span></a></li>
	<li class="item title"><a target="_blank" rel="noreferrer" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a></li>
	<?php if ($topline_date) { ?><li class="item date"><?php echo $this->entry->date(); ?> </li><?php } ?>
	<?php if ($topline_link) { ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?php echo $this->entry->link(); ?>"><?php echo _i('link'); ?></a></li><?php } ?>
</ul>