diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-08-12 09:05:21 +0200 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-08-12 09:05:21 +0200 |
commit | 930334cd6d486843b536412391a549815efd038e (patch) | |
tree | 485eeecc3bd3db3613d47de25662d5c9163e4afe /src/Wallabag/CoreBundle/Resources/views/Entry | |
parent | fedaf005377e6d62ff0986f7f54afef3287a6451 (diff) | |
parent | 2686457448372543fdf4f1fc54c4fd20f0f02c2c (diff) | |
download | wallabag-930334cd6d486843b536412391a549815efd038e.tar.gz wallabag-930334cd6d486843b536412391a549815efd038e.tar.zst wallabag-930334cd6d486843b536412391a549815efd038e.zip |
Merge pull request #1297 from wallabag/v2-estimated-time
store estimated reading time in database (#393)
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/Entry')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig | 7 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig index bf3caf09..7629ef35 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig | |||
@@ -21,11 +21,12 @@ | |||
21 | {% if entries is empty %} | 21 | {% if entries is empty %} |
22 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> | 22 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> |
23 | {% else %} | 23 | {% else %} |
24 | <div><form>{{ form_rest(form) }}<button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">Filter</button></form></div> | ||
24 | {% for entry in entries %} | 25 | {% for entry in entries %} |
25 | <div id="entry-{{ entry.id|e }}" class="entrie"> | 26 | <div id="entry-{{ entry.id|e }}" class="entry"> |
26 | <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2> | 27 | <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2> |
27 | {% if entry.content| readingTime > 0 %} | 28 | {% if entry.readingTime > 0 %} |
28 | <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} {{ entry.content| readingTime }} min</span></div> | 29 | <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min</span></div> |
29 | {% else %} | 30 | {% else %} |
30 | <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} <small class="inferieur"><</small> 1 min</span></div> | 31 | <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} <small class="inferieur"><</small> 1 min</span></div> |
31 | {% endif %} | 32 | {% endif %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig index 5ec9bc03..a39a8dc3 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig | |||
@@ -17,8 +17,8 @@ | |||
17 | <pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate> | 17 | <pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate> |
18 | <description> | 18 | <description> |
19 | <![CDATA[ | 19 | <![CDATA[ |
20 | {%- if entry.content|readingTime > 0 -%} | 20 | {%- if entry.readingTime > 0 -%} |
21 | {% trans %}estimated reading time :{% endtrans %} {{ entry.content|readingTime }} min | 21 | {% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min |
22 | {%- else -%} | 22 | {%- else -%} |
23 | {% trans %}estimated reading time :{% endtrans %} < 1 min | 23 | {% trans %}estimated reading time :{% endtrans %} < 1 min |
24 | {%- endif %} | 24 | {%- endif %} |