Add titles only option to unread listing

This commit is contained in:
sairuk 2016-10-08 12:05:14 +11:00
parent 57b0e4e124
commit 477f59c43b
2 changed files with 4 additions and 1 deletions

View File

@ -142,6 +142,7 @@ function get_sorting_directions()
function get_display_mode()
{
return array(
'titles' => t('Titles'),
'summaries' => t('Summaries'),
'full' => t('Full contents')
);

View File

@ -88,7 +88,9 @@
</ul>
<?php if ($display_mode === 'full'): ?>
<div class="preview-full-content" <?php echo Miniflux\Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>><?php echo $item['content'] ?></div>
<?php else: ?>
<?php elseif ($display_mode === 'summaries'): ?>
<p class="preview" <?php echo Miniflux\Helper\is_rtl($item) ? 'dir="rtl"' : 'dir="ltr"' ?>><?php echo Miniflux\Helper\escape(Miniflux\Helper\summary(strip_tags($item['content']), 50, 300)) ?></p>
<?php else: ?>
<p class="no-preview"></p>
<?php endif ?>
</article>