Merge branch 'master' of git://github.com/chrislemonier/miniflux into feed-title

This commit is contained in:
Frederic Guillot 2013-07-21 11:48:44 -04:00
commit c681854e6a
7 changed files with 15 additions and 6 deletions

2
.gitignore vendored
View File

@ -29,7 +29,7 @@
# OS generated files #
######################
.DS_Store?
.DS_Store
ehthumbs.db
Icon?
Thumbs.db

View File

@ -96,11 +96,14 @@ Router\get_action('show-help', function() {
Router\get_action('show', function() {
$id = Model\decode_item_id(Request\param('id'));
$item = Model\get_item($id);
$feed = Model\get_feed($item['feed_id']);
Model\set_item_read($id);
Response\html(Template\layout('show_item', array(
'item' => Model\get_item($id),
'item' => $item,
'feed' => $feed,
'menu' => 'show'
)));
});
@ -111,12 +114,14 @@ Router\get_action('read', function() {
$id = Model\decode_item_id(Request\param('id'));
$item = Model\get_item($id);
$feed = Model\get_feed($item['feed_id']);
$nav = Model\get_nav_item($item); // must be placed before set_item_read()
Model\set_item_read($id);
Response\html(Template\layout('show_item', array(
'item' => $item,
'feed' => $feed,
'item_nav' => $nav,
'menu' => 'read'
)));

View File

@ -327,7 +327,7 @@ function get_unread_items($offset = null, $limit = null)
{
return \PicoTools\singleton('db')
->table('items')
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.content', 'items.bookmark', 'items.status', 'feeds.site_url')
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.content', 'items.bookmark', 'items.status', 'feeds.site_url', 'feeds.title AS feed_title')
->join('feeds', 'id', 'feed_id')
->eq('status', 'unread')
->desc('updated')
@ -350,7 +350,7 @@ function get_read_items($offset = null, $limit = null)
{
return \PicoTools\singleton('db')
->table('items')
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.bookmark', 'feeds.site_url')
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.bookmark', 'feeds.site_url', 'feeds.title AS feed_title')
->join('feeds', 'id', 'feed_id')
->eq('status', 'read')
->desc('updated')
@ -374,7 +374,7 @@ function get_bookmarks($offset = null, $limit = null)
{
return \PicoTools\singleton('db')
->table('items')
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.status', 'feeds.site_url')
->columns('items.id', 'items.title', 'items.updated', 'items.url', 'items.status', 'feeds.site_url', 'feeds.title AS feed_title')
->join('feeds', 'id', 'feed_id')
->in('status', array('read', 'unread'))
->eq('bookmark', 1)

View File

@ -22,6 +22,7 @@
</a>
</h2>
<p>
<?= Helper\escape($item['feed_title']) ?> |
<?= Helper\get_host_from_url($item['url']) ?> |
<?= dt('%e %B %Y %k:%M', $item['updated']) ?> |
<a href="?action=bookmark&amp;value=0&amp;id=<?= $item_id ?>&amp;redirect=bookmarks&amp;offset=<?= $offset ?>"><?= t('remove bookmark') ?></a> |

View File

@ -24,6 +24,7 @@
</a>
</h2>
<p>
<?= Helper\escape($item['feed_title']) ?> |
<?= Helper\get_host_from_url($item['url']) ?> |
<span class="hide-mobile"><?= dt('%e %B %Y %k:%M', $item['updated']) ?> |</span>

View File

@ -12,6 +12,7 @@
</h1>
<p class="infos">
<?= Helper\escape($feed['title']) ?> |
<?= Helper\get_host_from_url($item['url']) ?> |
<span class="hide-mobile"><?= dt('%A %e %B %Y %k:%M', $item['updated']) ?> |</span>
<?php if ($item['bookmark']): ?>

View File

@ -33,6 +33,7 @@
<?= Helper\escape(Helper\summary(strip_tags($item['content']), 50, 300)) ?>
</p>
<p>
<?= Helper\escape($item['feed_title']) ?> |
<?= Helper\get_host_from_url($item['url']) ?> |
<span class="hide-mobile"><?= dt('%e %B %Y %k:%M', $item['updated']) ?> |</span>