]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Entry / entries.html.twig
index 4679714e6398355bcdf5355dd04ece6db626821f..859b166b18c8abd4a60cfdfa070cb2c3366a3142 100644 (file)
@@ -1,20 +1,25 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
 {% block title %}
-    {% set currentTag = '' %}
+    {% set filter = '' %}
     {% if tag is defined %}
-        {% set currentTag = tag %}
+        {% set filter = tag %}
     {% endif %}
-    {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'currentTag': currentTag} %}
+    {% if searchTerm is defined and searchTerm is not empty %}
+        {% set filter = searchTerm %}
+    {% endif %}
+    {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %}
 {% endblock %}
 
 {% block content %}
 
+    {% set listMode = app.user.config.listMode %}
     <div class="results">
         <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
         <div class="pagination">
-            <i class="btn-clickable download-btn material-icons md-36">file_download</i>
-            <i class="btn-clickable filter-btn material-icons md-36">filter_list</i>
+            <a href="{{ path('switch_view_mode') }}"><i class="listMode-btn material-icons md-36">{% if listMode == 0 %}list{% else %}view_module{% endif %}</i></a>
+            <i class="btn-clickable download-btn material-icons md-36 js-export-action">file_download</i>
+            <i class="btn-clickable filter-btn material-icons md-36 js-filters-action">filter_list</i>
             {% if entries.getNbPages > 1 %}
                 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
             {% endif %}
@@ -22,7 +27,7 @@
     </div>
 
     {% for entry in entries %}
-        <div id="entry-{{ entry.id|e }}" class="entry">
+        <div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}">
             <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title|e|raw }}</a></h2>
 
             {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
                 <li><a title="{{ 'entry.list.delete'|trans }}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.delete'|trans }}</span></a></li>
                 <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName|removeWww }}</span></a></li>
             </ul>
-            {% if entry.previewPicture is null %}
+            {% if (entry.previewPicture is null or listMode == 1) %}
                 <ul class="card-entry-tags">
                     {% for tag in entry.tags %}
                         <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
                     {% endfor %}
                 </ul>
-                <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
+                <p {% if listMode == 1 %}class="hide"{% endif %}>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
             {% else %}
                 <ul class="card-entry-labels">
                 {% for tag in entry.tags | slice(0, 3) %}
                 </div>
             </div>
 
+            <div id="filter-http-status" class="filter-group">
+                {{ form_label(form.httpStatus) }}
+                <div class="input-field ">
+                    {{ form_widget(form.httpStatus) }}
+                </div>
+            </div>
+
             <div id="filter-reading-time" class="filter-group">
                 <div class="">
                     {{ form_label(form.readingTime) }}