aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-05 15:35:01 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-05 15:35:01 +0200
commit4a749cad8d151d0275eaef9beeb6c3359076bffb (patch)
treee44f3aa014c15decfddc2bca546526cee828d2d7 /src/Wallabag
parent52d806ea6b28c389c38d1ceaad0e4dfb20e8e672 (diff)
downloadwallabag-4a749cad8d151d0275eaef9beeb6c3359076bffb.tar.gz
wallabag-4a749cad8d151d0275eaef9beeb6c3359076bffb.tar.zst
wallabag-4a749cad8d151d0275eaef9beeb6c3359076bffb.zip
Round estimated time and add reading speed for Baggy
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig18
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig2
2 files changed, 9 insertions, 11 deletions
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 @@
23 {% for entry in entries %} 23 {% for entry in entries %}
24 <div id="entry-{{ entry.id|e }}" class="entry"> 24 <div id="entry-{{ entry.id|e }}" class="entry">
25 <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2> 25 <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
26 {% if entry.readingTime > 0 %} 26
27 <div class="estimatedTime"> 27 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
28 <div class="estimatedTime">
28 <span class="tool reading-time"> 29 <span class="tool reading-time">
29 {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }} 30 {% if readingTime > 0 %}
30 </span> 31 {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
31 </div>
32 {% else %} 32 {% else %}
33 <div class="estimatedTime"> 33 {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
34 <span class="tool reading-time">
35 {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
36 </span>
37 </div>
38 {% endif %} 34 {% endif %}
35 </span>
36 </div>
39 37
40 <ul class="tools links"> 38 <ul class="tools links">
41 <li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li> 39 <li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index 433b1cae..8782d639 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -54,7 +54,7 @@
54 <span class="tool reading-time"> 54 <span class="tool reading-time">
55 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} 55 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
56 {% if readingTime > 0 %} 56 {% if readingTime > 0 %}
57 {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime}) }} 57 {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
58 {% else %} 58 {% else %}
59 {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} 59 {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
60 {% endif %} 60 {% endif %}