From 4a749cad8d151d0275eaef9beeb6c3359076bffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 5 Apr 2016 15:35:01 +0200 Subject: Round estimated time and add reading speed for Baggy --- .../views/themes/baggy/Entry/entries.html.twig | 18 ++++++++---------- .../views/themes/material/Entry/entries.html.twig | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index f718043b..22f456da 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -23,19 +23,17 @@ {% for entry in entries %}

{{ entry.title|raw }}

- {% if entry.readingTime > 0 %} -
+ + {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} +
- {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }} - -
+ {% if readingTime > 0 %} + {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }} {% else %} -
- - {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} - -
+ {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} {% endif %} + +