miniflux-legacy/templates/read_item.php

59 lines
2.7 KiB
PHP
Raw Normal View History

2013-02-18 03:48:21 +01:00
<?php if (empty($item)): ?>
2013-04-13 03:08:55 +02:00
<p class="alert alert-info"><?= t('Item not found') ?></p>
2013-02-18 03:48:21 +01:00
<?php else: ?>
<?php $item_id = Model\encode_item_id($item['id']) ?>
<article class="item" id="current-item" data-item-id="<?= Model\encode_item_id($item['id']) ?>">
2013-02-18 03:48:21 +01:00
<h1>
2013-04-03 04:49:14 +02:00
<a href="<?= $item['url'] ?>" rel="noreferrer" target="_blank" id="original-item"><?= Helper\escape($item['title']) ?></a>
2013-02-18 03:48:21 +01:00
</h1>
<p class="infos">
2013-02-24 20:04:56 +01:00
<?= Helper\get_host_from_url($item['url']) ?> |
<?= dt('%A %e %B %Y %k:%M', $item['updated']) ?> |
<?php if (isset($item['starred']) && $item['starred']=='starred'): ?>
<a href="?action=mark-read-item-unstarred&amp;id=<?= $item_id ?>"><?= t('mark as unstarred') ?></a>
<?php else: ?>
<a href="?action=mark-read-item-starred&amp;id=<?= $item_id ?>"><?= t('mark as starred') ?></a>
<?php endif ?>
2013-02-18 03:48:21 +01:00
</p>
<?= $item['content'] ?>
2013-03-27 02:57:12 +01:00
<?php if (isset($item_nav)): ?>
<nav>
<span class="nav-left">
<?php if ($item_nav['previous']): ?>
<a href="?action=read&amp;id=<?= Model\encode_item_id($item_nav['previous']['id']) ?>" id="previous-item">« <?= t('Previous') ?></a>
2013-03-27 02:57:12 +01:00
<?php else: ?>
2013-04-13 03:08:55 +02:00
« <?= t('Previous') ?>
2013-03-27 02:57:12 +01:00
<?php endif ?>
</span>
<span class="nav-middle">
<?php if ($item_nav['previous'] && $item_nav['next']): ?>
<a href="?action=default#item-<?= Model\encode_item_id($item_nav['next']['id']) ?>"><?= t('Unread items') ?></a>
2013-03-27 02:57:12 +01:00
<?php elseif ($item_nav['previous'] && ! $item_nav['next']): ?>
<a href="?action=default#item-<?= Model\encode_item_id($item_nav['previous']['id']) ?>"><?= t('Unread items') ?></a>
2013-03-27 02:57:12 +01:00
<?php elseif (! $item_nav['previous'] && $item_nav['next']): ?>
<a href="?action=default#item-<?= Model\encode_item_id($item_nav['next']['id']) ?>"><?= t('Unread items') ?></a>
2013-03-27 02:57:12 +01:00
<?php elseif (! $item_nav['previous'] && ! $item_nav['next']): ?>
2013-04-13 03:08:55 +02:00
<a href="?action=default"><?= t('Unread items') ?></a>
2013-03-27 02:57:12 +01:00
<?php endif ?>
</span>
<span class="nav-right">
<?php if ($item_nav['next']): ?>
<a href="?action=read&amp;id=<?= Model\encode_item_id($item_nav['next']['id']) ?>" id="next-item"><?= t('Next') ?> »</a>
2013-03-27 02:57:12 +01:00
<?php else: ?>
2013-04-13 03:08:55 +02:00
<?= 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 ?>