Fix entry reading time

This commit is contained in:
Simounet 2016-12-27 22:37:24 +01:00
parent 7719346328
commit 6ed615ac74
3 changed files with 9 additions and 10 deletions

View file

@ -1,8 +1,6 @@
<div class="card-action">
<span class="reading-time grey-text">
<i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
{{ entry.readingTime / app.user.config.readingSpeed|round }} min&nbsp;
{% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %}
<i class="material-icons hide-on-med-and-down" title="{{ 'entry.view.created_at'|trans }}">today</i>
<span class="hide-on-med-and-down">&nbsp;{{ entry.createdAt|date('Y-m-d') }}</span>
</span>

View file

@ -0,0 +1,7 @@
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
<i class="material-icons">timer</i>
{% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
{% else %}
{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
{% endif %}

View file

@ -214,13 +214,7 @@
<aside>
<ul class="tools">
<li>
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
<i class="material-icons">timer</i>
{% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
{% else %}
{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
{% endif %}
{% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %}
</li>
<li>
<i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i>