Merge pull request #5378 from wallabag/harmonize-unread-items

Show when articles is read
This commit is contained in:
Kevin Decherf 2022-01-07 23:21:07 +01:00 committed by GitHub
commit 561c46c99c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 6 deletions

View file

@ -1,4 +1,4 @@
<div class="card{% if currentRoute == 'tag_entries' and entry.isArchived %} archived{% endif %}">
<div class="card{% if currentRoute in routes and entry.isArchived %} archived{% endif %}">
<div class="card-body">
<div class="card-fullimage">
<ul class="card-entry-labels">

View file

@ -1,4 +1,4 @@
<div class="card-stacked{% if currentRoute == 'tag_entries' and entry.isArchived %} archived{% endif %}">
<div class="card-stacked{% if currentRoute in routes and entry.isArchived %} archived{% endif %}">
{% include "@WallabagCore/themes/material/Entry/Card/_mass_checkbox.html.twig" with {'entry': entry} only %}
<div class="card-preview">
<a href="{{ path('view', { 'id': entry.id }) }}">

View file

@ -1,4 +1,4 @@
<div class="card{% if currentRoute == 'tag_entries' and entry.isArchived %} archived{% endif %}">
<div class="card{% if currentRoute in routes and entry.isArchived %} archived{% endif %}">
<div class="card-body">
<div class="card-image waves-effect waves-block waves-light">
<ul class="card-entry-labels">

View file

@ -20,6 +20,7 @@
{% block content %}
{% set listMode = app.user.config.listMode %}
{% set entriesWithArchivedClassRoutes = ['tag_entries', 'search', 'all'] %}
{% set currentRoute = app.request.attributes.get('_route') %}
{% if currentRoute == 'homepage' %}
{% set currentRoute = 'unread' %}
@ -57,11 +58,11 @@
{% for entry in entries %}
<li id="entry-{{ entry.id|e }}" class="entry col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12">
{% if listMode == 1 %}
{% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': currentRoute} only %}
{% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': currentRoute, 'routes': entriesWithArchivedClassRoutes} only %}
{% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
{% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': currentRoute} only %}
{% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': currentRoute, 'routes': entriesWithArchivedClassRoutes} only %}
{% else %}
{% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': currentRoute} only %}
{% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': currentRoute, 'routes': entriesWithArchivedClassRoutes} only %}
{% endif %}
</li>
{% endfor %}