news-reader-php/templates/bucket/show.html.twig
Daniel Siepmann a4e4f5da0d
WIP|Allow to mark entries as read and unread
Add new read link to each entry. If entry was read the link will be
replaced with an unread link.
Clicking the link will mark the entry as read or unread.
Afterwards a redirect to referrer happens. If it is unkown, for whatever
reason, fallback to start.
Flash messages are added and rendered to let user know what happened.

Also respect already read entries when opening a feed.

WIP:

Still need to adjust entry listing for buckets.
Still need to add tests for new feature.

Still need to add new start page to show newest unread entries from all
buckets.
2020-08-14 13:03:08 +02:00

24 lines
739 B
Twig
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends 'base.html.twig' %}
{% block title %}{{ bucket.name }} | {{ parent() }}{% endblock %}
{% block body %}
<header>
<h1>Bucket: {{ bucket.name }} <small>with {{ bucket.feeds | length }} feeds</small></h1>
<nav> </nav>
</header>
{# TODO: collect newest entries of all feeds in controller #}
{{ include('feed/entries.html.twig', {entries: bucket.feeds.first.unreadEntries | slice(0, 10) }) }}
<aside>
<h1>Feeds in this bucket</h1>
<ul>
{% for feed in bucket.feeds %}
<li>
<a href="{{ path('feed', {slug: feed.slug}) }}">{{ feed.name }}</a>
</li>
{% endfor %}
</ul>
</aside>
{% endblock %}