diff options
| author | 2014-12-07 15:03:42 +0100 | |
|---|---|---|
| committer | 2014-12-07 15:03:42 +0100 | |
| commit | ea849d7c68cc3de33825c1daafd06b9f8bbf747c (patch) | |
| tree | ce5b3f47f5d81e1209581322d987c5603ee0acd3 /app/views/helpers/index/normal/entry_header.phtml | |
| parent | 7ef4d6c033d6d12a644b6cf39940591901fdcb3b (diff) | |
Prepare better organization of view files for exts
View files must be well-splitted to simplify work for extensions.
See https://github.com/FreshRSS/FreshRSS/issues/252
Diffstat (limited to 'app/views/helpers/index/normal/entry_header.phtml')
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml new file mode 100644 index 000000000..b751b884f --- /dev/null +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -0,0 +1,40 @@ +<?php + $topline_read = FreshRSS_Context::$conf->topline_read; + $topline_favorite = FreshRSS_Context::$conf->topline_favorite; + $topline_date = FreshRSS_Context::$conf->topline_date; + $topline_link = FreshRSS_Context::$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 + } + } + $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $this->entry->feed()); //We most likely already have the feed object in cache + if ($feed == null) { + $feed = $this->entry->feed(true); + if ($feed == null) { + $feed = FreshRSS_Feed::example(); + } + } + ?><li class="item website"><a href="<?php echo _url('index', 'index', 'get', 'f_' . $feed->id()); ?>"><img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li> + <li class="item title"><a target="_blank" 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" href="<?php echo $this->entry->link(); ?>"><?php echo _i('link'); ?></a></li><?php } ?> +</ul> |
