aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig4
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig18
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_reading_time.html.twig7
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig25
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig51
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig15
6 files changed, 89 insertions, 31 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig
index 56442116..d278da1b 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig
@@ -1,8 +1,6 @@
1<div class="card-action"> 1<div class="card-action">
2 <span class="reading-time grey-text"> 2 <span class="reading-time grey-text">
3 <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i> 3 {% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %}
4 {{ entry.readingTime / app.user.config.readingSpeed|round }} min&nbsp;
5
6 <i class="material-icons hide-on-med-and-down" title="{{ 'entry.view.created_at'|trans }}">today</i> 4 <i class="material-icons hide-on-med-and-down" title="{{ 'entry.view.created_at'|trans }}">today</i>
7 <span class="hide-on-med-and-down">&nbsp;{{ entry.createdAt|date('Y-m-d') }}</span> 5 <span class="hide-on-med-and-down">&nbsp;{{ entry.createdAt|date('Y-m-d') }}</span>
8 </span> 6 </span>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig
new file mode 100644
index 00000000..bb9b64ce
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig
@@ -0,0 +1,18 @@
1<div class="card">
2 <div class="card-stacked">
3 <div class="card-content">
4 <span class="card-title dot-ellipsis dot-resize-update">
5 <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">
6 {{ entry.title| striptags | truncate(120, true, '…') | raw }}
7 </a>
8 </span>
9 <ul class="tools-list right">
10 <li>
11 <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
12 <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
13 <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
14 </li>
15 </ul>
16 </div>
17 </div>
18</div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_reading_time.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_reading_time.html.twig
new file mode 100644
index 00000000..1a932a9f
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_reading_time.html.twig
@@ -0,0 +1,7 @@
1{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
2<i class="material-icons">timer</i>
3{% if readingTime > 0 %}
4 {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
5{% else %}
6 {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
7{% endif %}
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 c610c8d2..5fca53ae 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
@@ -1,17 +1,22 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %} 1{% extends "WallabagCoreBundle::layout.html.twig" %}
2 2
3{% block title %} 3{% block title %}
4 {% set currentTag = '' %} 4 {% set filter = '' %}
5 {% if tag is defined %} 5 {% if tag is defined %}
6 {% set currentTag = tag %} 6 {% set filter = tag %}
7 {% endif %}
8 {% if searchTerm is defined and searchTerm is not empty %}
9 {% set filter = searchTerm %}
7 {% endif %} 10 {% endif %}
8 {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'currentTag': currentTag} %} 11 {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %}
9{% endblock %} 12{% endblock %}
10 13
11{% block content %} 14{% block content %}
15 {% set listMode = app.user.config.listMode %}
12 <div class="results clearfix"> 16 <div class="results clearfix">
13 <div class="nb-results left"> 17 <div class="nb-results left">
14 {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} 18 {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
19 <a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a>
15 </div> 20 </div>
16 {% if entries.getNbPages > 1 %} 21 {% if entries.getNbPages > 1 %}
17 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} 22 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
@@ -21,8 +26,10 @@
21 <br /> 26 <br />
22 <ul class="row data"> 27 <ul class="row data">
23 {% for entry in entries %} 28 {% for entry in entries %}
24 <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12"> 29 <li id="entry-{{ entry.id|e }}" class="col {% if listMode == 0 %}l3 m6{% endif %} s12">
25 {% if entry.previewPicture is null %} 30 {% if listMode == 1 %}
31 {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %}
32 {% elseif entry.previewPicture is null %}
26 {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %} 33 {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %}
27 {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} 34 {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
28 {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %} 35 {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %}
@@ -104,6 +111,14 @@
104 </div> 111 </div>
105 112
106 <div class="col s12"> 113 <div class="col s12">
114 {{ form_label(form.httpStatus) }}
115 </div>
116
117 <div class="input-field col s12">
118 {{ form_widget(form.httpStatus) }}
119 </div>
120
121 <div class="col s12">
107 {{ form_label(form.readingTime) }} 122 {{ form_label(form.readingTime) }}
108 </div> 123 </div>
109 <div class="input-field col s6"> 124 <div class="input-field col s6">
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
index b445f7d5..15428b92 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
@@ -46,14 +46,14 @@
46 </li> 46 </li>
47 47
48 <li class="bold border-bottom hide-on-med-and-down"> 48 <li class="bold border-bottom hide-on-med-and-down">
49 <a class="waves-effect collapsible-header" href="{{ entry.url|e }}"> 49 <a class="waves-effect collapsible-header original" href="{{ entry.url|e }}" target="_blank">
50 <i class="material-icons small">link</i> 50 <i class="material-icons small">link</i>
51 <span>{{ 'entry.view.left_menu.view_original_article'|trans }}</span> 51 <span>{{ 'entry.view.left_menu.view_original_article'|trans }}</span>
52 </a> 52 </a>
53 <div class="collapsible-body"></div> 53 <div class="collapsible-body"></div>
54 </li> 54 </li>
55 55
56 <li class="bold hide-on-med-and-down"> 56 <li class="bold">
57 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" href="{{ path('reload_entry', { 'id': entry.id }) }}" id="reload"> 57 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" href="{{ path('reload_entry', { 'id': entry.id }) }}" id="reload">
58 <i class="material-icons small">autorenew</i> 58 <i class="material-icons small">autorenew</i>
59 <span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span> 59 <span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span>
@@ -67,7 +67,7 @@
67 {% endif %} 67 {% endif %}
68 68
69 <li class="bold hide-on-med-and-down"> 69 <li class="bold hide-on-med-and-down">
70 <a class="waves-effect collapsible-header" title="{{ markAsReadLabel|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead"> 70 <a class="waves-effect collapsible-header markasread" title="{{ markAsReadLabel|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead">
71 <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i> 71 <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i>
72 <span>{{ markAsReadLabel|trans }}</span> 72 <span>{{ markAsReadLabel|trans }}</span>
73 </a> 73 </a>
@@ -75,21 +75,21 @@
75 </li> 75 </li>
76 76
77 <li class="bold hide-on-med-and-down"> 77 <li class="bold hide-on-med-and-down">
78 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav"> 78 <a class="waves-effect collapsible-header favorite" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
79 <i class="material-icons spall">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i> 79 <i class="material-icons spall">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
80 <span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span> 80 <span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span>
81 </a> 81 </a>
82 <div class="collapsible-body"></div> 82 <div class="collapsible-body"></div>
83 </li> 83 </li>
84 <li class="bold border-bottom hide-on-med-and-down"> 84 <li class="bold border-bottom">
85 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}"> 85 <a class="waves-effect collapsible-header delete" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
86 <i class="material-icons small">delete</i> 86 <i class="material-icons small">delete</i>
87 <span>{{ 'entry.view.left_menu.delete'|trans }}</span> 87 <span>{{ 'entry.view.left_menu.delete'|trans }}</span>
88 </a> 88 </a>
89 <div class="collapsible-body"></div> 89 <div class="collapsible-body"></div>
90 </li> 90 </li>
91 91
92 <li class="bold border-bottom hide-on-med-and-down"> 92 <li class="bold border-bottom">
93 <a class="waves-effect collapsible-header" id="nav-btn-add-tag"> 93 <a class="waves-effect collapsible-header" id="nav-btn-add-tag">
94 <i class="material-icons small">label_outline</i> 94 <i class="material-icons small">label_outline</i>
95 <span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span> 95 <span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span>
@@ -125,7 +125,7 @@
125 {% endif %} 125 {% endif %}
126 {% if craue_setting('share_shaarli') %} 126 {% if craue_setting('share_shaarli') %}
127 <li> 127 <li>
128 <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank"> 128 <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}&amp;tags={{ entry.tags|join(',')|url_encode }}" target="_blank">
129 <i class="tool icon-image icon-image--shaarli" title="shaarli"></i> 129 <i class="tool icon-image icon-image--shaarli" title="shaarli"></i>
130 <span>shaarli</span> 130 <span>shaarli</span>
131 </a> 131 </a>
@@ -139,6 +139,14 @@
139 </a> 139 </a>
140 </li> 140 </li>
141 {% endif %} 141 {% endif %}
142 {% if craue_setting('share_unmark') %}
143 <li>
144 <a href="{{ craue_setting('unmark_url') }}/mark/add?url={{ entry.url|url_encode }}&amp;title={{entry.title|url_encode}}&amp;v=6" target="_blank">
145 <i class="tool icon-image icon-image--unmark" title="unmark"></i>
146 <span>unmark.it</span>
147 </a>
148 </li>
149 {% endif %}
142 {% if craue_setting('carrot') %} 150 {% if craue_setting('carrot') %}
143 <li> 151 <li>
144 <a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" title="carrot"> 152 <a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" title="carrot">
@@ -186,14 +194,6 @@
186 </div> 194 </div>
187 </li> 195 </li>
188 196
189 <li class="bold hide-on-large-only">
190 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
191 <i class="material-icons small">delete</i>
192 <span>{{ 'entry.view.left_menu.delete'|trans }}</span>
193 </a>
194 <div class="collapsible-body"></div>
195 </li>
196
197 <li class="bold"> 197 <li class="bold">
198 <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.description'|trans }}"> 198 <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.description'|trans }}">
199 <i class="material-icons small">error</i> 199 <i class="material-icons small">error</i>
@@ -214,13 +214,7 @@
214 <aside> 214 <aside>
215 <ul class="tools"> 215 <ul class="tools">
216 <li> 216 <li>
217 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} 217 {% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %}
218 <i class="material-icons">timer</i>
219 {% if readingTime > 0 %}
220 {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
221 {% else %}
222 {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
223 {% endif %}
224 </li> 218 </li>
225 <li> 219 <li>
226 <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i> 220 <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i>
@@ -257,6 +251,17 @@
257 <article> 251 <article>
258 {{ entry.content | raw }} 252 {{ entry.content | raw }}
259 </article> 253 </article>
254
255 <div class="fixed-action-btn horizontal click-to-toggle hide-on-large-only">
256 <a class="btn-floating btn-large">
257 <i class="material-icons">menu</i>
258 </a>
259 <ul>
260 <li><a class="btn-floating" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">done</i></a></li>
261 <li><a class="btn-floating" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">star_outline</i></a></li>
262 <li><a class="btn-floating" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a></li>
263 </ul>
264 </div>
260 </div> 265 </div>
261 266
262<script id="annotationroutes" type="application/json"> 267<script id="annotationroutes" type="application/json">
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig
new file mode 100644
index 00000000..f25de94d
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig
@@ -0,0 +1,15 @@
1<form name="search" method="GET" action="{{ path('search')}}">
2 {% if form_errors(form) %}
3 <span class="black-text">{{ form_errors(form) }}</span>
4 {% endif %}
5
6 {% if form_errors(form.term) %}
7 <span class="black-text">{{ form_errors(form.term) }}</span>
8 {% endif %}
9
10 <input type="hidden" name="currentRoute" value="{{ currentRoute }}" />
11
12 {{ form_widget(form.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder'} }) }}
13
14 {{ form_rest(form) }}
15</form>