]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
store domainName in database
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / entries.html.twig
index 5ef5125f1d35772ff279430291af2077be0781ff..7777dc7fe746d03ea82a368d28ced8d9d6658220 100644 (file)
@@ -1,14 +1,26 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title "Unread" %}
+{% block title %}
+  {% set currentRoute = app.request.attributes.get('_route') %}
+
+  {% if currentRoute == 'starred' %}
+    {% trans %}Starred{% endtrans %}
+  {% elseif currentRoute == 'archive' %}
+    {% trans %}Archive{% endtrans %}
+  {% else %}
+    {% trans %}Unread{% endtrans %}
+  {% endif %}
+
+{% endblock %}
 
 {% block content %}
     {% block pager %}
     {% if entries is not empty %}
         <div class="results clearfix">
             <div class="nb-results left">{{ entries.count }} {% trans %}entries{% endtrans %}</div>
+            <div class="left"><form>{{ form_rest(form) }}<button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">Filter</button></form></div>
             <ul class="pagination right">
-                {% for p in range(1, entries.nbPages) %}
+                {% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
                     <li class="{{ currentPage == p ? 'active':'waves-effect'}}">
                         <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}"  >{{ p }}</a>
                     </li>
                     <div class="card">
                         <div class="card-content">
                             <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span>
-                            {% if entry.content| readingTime > 0 %}
-                                <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.content| readingTime }} min</span></div>
+                            {% if entry.readingTime > 0 %}
+                                <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min</span></div>
                             {% else %}
                                 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div>
                             {% endif %}
                             <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
                         </div>
                         <div class="card-action">
-                            <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }}" class="tool original grey-text"><span>{{ entry.url | e | domainName }}</span></a></bold>
+                            <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }}" class="tool original grey-text"><span>{{ entry.domainName }}</span></a></bold>
 
                             <ul class="tools links right">
                                 <li>