miniflux-legacy/app/templates/item/show.php

124 lines
6.0 KiB
PHP
Raw Permalink Normal View History

2013-02-18 03:48:21 +01:00
<?php if (empty($item)): ?>
<p class="alert alert-error"><?php echo t('Item not found') ?></p>
2013-02-18 03:48:21 +01:00
<?php else: ?>
2013-10-15 04:38:07 +02:00
<article
class="item"
id="current-item"
data-item-id="<?php echo $item['id'] ?>"
data-item-status="<?php echo $item['status'] ?>"
data-item-bookmark="<?php echo $item['bookmark'] ?>"
2013-10-15 04:38:07 +02:00
>
2014-02-05 03:47:59 +01:00
<?php if (isset($item_nav)): ?>
2014-11-08 18:55:30 +01:00
<nav class="top">
2014-02-05 03:47:59 +01:00
<span class="nav-left">
<?php if ($item_nav['previous']): ?>
<a href="?action=show&amp;menu=<?php echo $menu ?><?php echo $group_id ? '&amp;group_id='.$group_id : '' ?>&amp;id=<?php echo $item_nav['previous']['id'] ?>" id="previous-item" title="<?php echo Miniflux\Helper\escape($item_nav['previous']['title']) ?>"><?php echo t('Previous') ?></a>
2014-02-05 04:12:27 +01:00
<?php else: ?>
<?php echo t('Previous') ?>
2014-02-05 03:47:59 +01:00
<?php endif ?>
</span>
<span class="nav-right">
<?php if ($item_nav['next']): ?>
<a href="?action=show&amp;menu=<?php echo $menu ?><?php echo $group_id ? '&amp;group_id='.$group_id : '' ?>&amp;id=<?php echo $item_nav['next']['id'] ?>" id="next-item" title="<?php echo Miniflux\Helper\escape($item_nav['next']['title']) ?>"><?php echo t('Next') ?></a>
2014-02-05 04:12:27 +01:00
<?php else: ?>
<?php echo t('Next') ?>
2014-02-05 03:47:59 +01:00
<?php endif ?>
</span>
</nav>
<?php endif ?>
<h1 <?php echo Miniflux\Helper\rtl($item) ?>>
<a href="<?php echo $item['url'] ?>" rel="noreferrer" target="_blank" class="original"><?php echo Miniflux\Helper\escape($item['title']) ?></a>
2013-02-18 03:48:21 +01:00
</h1>
2014-02-15 03:21:14 +01:00
<ul class="item-infos">
<li>
<a
2016-03-03 15:51:47 +01:00
class="bookmark-icon"
href="?action=bookmark&amp;value=<?php echo (int)!$item['bookmark'] ?>&amp;id=<?php echo $item['id'] ?>&amp;redirect=show&amp;menu=<?php echo $menu ?>"
title="<?php echo ($item['bookmark']) ? t('remove bookmark') : t('bookmark') ?>"
data-reverse-title="<?php echo ($item['bookmark']) ? t('bookmark') :t('remove bookmark') ?>"
2013-10-15 04:38:07 +02:00
data-action="bookmark"
></a>
2014-02-15 03:21:14 +01:00
</li>
<li>
<a href="?action=feed-items&amp;feed_id=<?php echo $feed['id'] ?>"><?php echo Miniflux\Helper\escape($feed['title']) ?></a>
2014-02-15 03:21:14 +01:00
</li>
2015-12-09 20:25:13 +01:00
<?php if (!empty($item['author'])): ?>
<li>
<?php echo Miniflux\Helper\escape($item['author']) ?>
2015-12-09 20:25:13 +01:00
</li>
<?php endif ?>
2014-02-15 03:21:14 +01:00
<li class="hide-mobile">
<span title="<?php echo dt('%e %B %Y %k:%M', $item['updated']) ?>"><?php echo Miniflux\Helper\relative_time($item['updated']) ?></span>
2014-02-15 03:21:14 +01:00
</li>
<?php if ($item['enclosure_url']): ?>
2014-02-18 04:04:49 +01:00
<li>
<a href="<?php echo $item['enclosure_url'] ?>" rel="noreferrer" target="_blank"><?php echo t('attachment') ?></a>
2014-02-18 04:04:49 +01:00
</li>
<?php endif ?>
2014-02-15 03:21:14 +01:00
<li class="hide-mobile">
<span id="download-item"
data-failure-message="<?php echo t('unable to fetch content') ?>"
data-before-message="<?php echo t('in progress...') ?>"
data-after-message="<?php echo t('content downloaded') ?>">
<a href="#" data-action="download-item"><?php echo t('download content') ?></a>
2014-02-15 03:21:14 +01:00
</span>
</li>
2015-12-09 09:56:40 +01:00
<?php if ($group_id): ?>
<li>
<a href="?action=unread&amp;group_id=<?php echo $group_id ?>"><?php echo t('Back to the group') ?></a>
2015-12-09 09:56:40 +01:00
</li>
<?php endif; ?>
2014-02-15 03:21:14 +01:00
</ul>
2013-02-18 03:48:21 +01:00
<div id="item-content" <?php echo Miniflux\Helper\rtl($item) ?>>
2014-02-18 04:04:49 +01:00
<?php if ($item['enclosure_url']): ?>
2014-02-18 04:04:49 +01:00
<?php if (strpos($item['enclosure_type'], 'audio') !== false): ?>
<div id="item-content-enclosure">
2014-02-18 04:04:49 +01:00
<audio controls>
<source src="<?php echo $item['enclosure_url'] ?>" type="<?php echo $item['enclosure_type'] ?>">
2014-02-18 04:04:49 +01:00
</audio>
</div>
2014-02-18 04:04:49 +01:00
<?php elseif (strpos($item['enclosure_type'], 'video') !== false): ?>
<div id="item-content-enclosure">
2014-02-18 04:04:49 +01:00
<video controls>
<source src="<?php echo $item['enclosure_url'] ?>" type="<?php echo $item['enclosure_type'] ?>">
2014-02-18 04:04:49 +01:00
</video>
</div>
<?php elseif (strpos($item['enclosure_type'], 'image') !== false && $item['content'] === ''): ?>
<div id="item-content-enclosure">
<img src="<?php echo $item['enclosure_url'] ?>" alt="enclosure"/>
</div>
2014-02-18 04:04:49 +01:00
<?php endif ?>
<?php endif ?>
2014-05-25 14:47:03 +02:00
<?php echo $item['content'] ?>
</div>
2013-03-27 02:57:12 +01:00
<?php if (isset($item_nav)): ?>
2014-02-05 03:47:59 +01:00
<nav class="bottom">
2013-03-27 02:57:12 +01:00
<span class="nav-left">
<?php if ($item_nav['previous']): ?>
<a href="?action=show&amp;menu=<?php echo $menu ?><?php echo $group_id ? '&amp;group_id='.$group_id : '' ?>&amp;id=<?php echo $item_nav['previous']['id'] ?>" id="previous-item" title="<?php echo Miniflux\Helper\escape($item_nav['previous']['title']) ?>"><?php echo t('Previous') ?></a>
2014-02-05 04:12:27 +01:00
<?php else: ?>
<?php echo t('Previous') ?>
2013-03-27 02:57:12 +01:00
<?php endif ?>
</span>
<span class="nav-right">
<?php if ($item_nav['next']): ?>
<a href="?action=show&amp;menu=<?php echo $menu ?><?php echo $group_id ? '&amp;group_id='.$group_id : '' ?>&amp;id=<?php echo $item_nav['next']['id'] ?>" id="next-item" title="<?php echo Miniflux\Helper\escape($item_nav['next']['title']) ?>"><?php echo t('Next') ?></a>
2014-02-05 04:12:27 +01:00
<?php else: ?>
<?php echo t('Next') ?>
2013-03-27 02:57:12 +01:00
<?php endif ?>
</span>
</nav>
<?php endif ?>
2013-02-18 03:48:21 +01:00
</article>
<?php endif ?>