]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
Add icon for public share link
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / entry.html.twig
1 {% extends "WallabagCoreBundle::layout.html.twig" %}
2
3 {% block title %}{{ entry.title|raw }} ({{ entry.domainName|removeWww }}){% endblock %}
4
5 {% block body_class %}entry{% endblock %}
6
7 {% block menu %}
8 <div class="progress">
9 <div class="determinate"></div>
10 </div>
11 <nav class="hide-on-large-only">
12 <div class="nav-wrapper cyan darken-1">
13 <ul>
14 <li>
15 <a class="waves-effect" href="{{ path('homepage') }}">
16 <i class="material-icons">exit_to_app</i>
17 </a>
18 </li>
19 </ul>
20 <ul class="right">
21 <li>
22 <a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_read'|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead">
23 <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i>
24 </a>
25 </li>
26 <li>
27 <a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
28 <i class="material-icons small">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
29 </a>
30 </li>
31 <li>
32 <a href="#" data-activates="slide-out" class="button-collapse right">
33 <i class="material-icons">menu</i>
34 </a>
35 </li>
36 </ul>
37 </div>
38 </nav>
39 <ul id="slide-out" class="collapsible side-nav fixed reader-mode" data-collapsible="accordion">
40 <li class="bold border-bottom hide-on-med-and-down">
41 <a class="waves-effect collapsible-header" href="{{ path('homepage') }}">
42 <i class="material-icons small">exit_to_app</i>
43 <span>{{ 'entry.view.left_menu.back_to_homepage'|trans }}</span>
44 </a>
45 <div class="collapsible-body"></div>
46 </li>
47
48 <li class="bold border-bottom hide-on-med-and-down">
49 <a class="waves-effect collapsible-header" href="{{ entry.url|e }}">
50 <i class="material-icons small">link</i>
51 <span>{{ 'entry.view.left_menu.view_original_article'|trans }}</span>
52 </a>
53 <div class="collapsible-body"></div>
54 </li>
55
56 <li class="bold hide-on-med-and-down">
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>
59 <span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span>
60 </a>
61 <div class="collapsible-body"></div>
62 </li>
63
64 <li class="bold hide-on-med-and-down">
65 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_read'|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead">
66 <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i>
67 <span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span>
68 </a>
69 <div class="collapsible-body"></div>
70 </li>
71
72 <li class="bold hide-on-med-and-down">
73 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
74 <i class="material-icons spall">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
75 <span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span>
76 </a>
77 <div class="collapsible-body"></div>
78 </li>
79 <li class="bold border-bottom hide-on-med-and-down">
80 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
81 <i class="material-icons small">delete</i>
82 <span>{{ 'entry.view.left_menu.delete'|trans }}</span>
83 </a>
84 <div class="collapsible-body"></div>
85 </li>
86
87 <li class="bold border-bottom hide-on-med-and-down">
88 <a class="waves-effect collapsible-header" id="nav-btn-add-tag">
89 <i class="material-icons small">label_outline</i>
90 <span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span>
91 </a>
92 <div class="collapsible-body"></div>
93 </li>
94
95 <li class="bold">
96 <a class="waves-effect collapsible-header">
97 <i class="material-icons small">share</i>
98 <span>{{ 'entry.view.left_menu.share_content'|trans }}</span>
99 </a>
100 <div class="collapsible-body">
101 <ul>
102 {% if craue_setting('share_public') %}
103 <li>
104 <a href="{{ path('share', {'id': entry.id }) }}" target="_blank" class="public icon-link" title="{{ 'entry.view.left_menu.public_link'|trans }}">
105 <span>{{ 'entry.view.left_menu.public_link'|trans }}</span>
106 </a>
107 </li>
108 <li>
109 <a href="{{ path('delete_share', {'id': entry.id }) }}" class="tool public" title="{{ 'entry.view.left_menu.delete_public_link'|trans }}">
110 <span>{{ 'entry.view.left_menu.delete_public_link'|trans }}</span>
111 </a>
112 </li>
113 {% endif %}
114 {% if craue_setting('share_twitter') %}
115 <li>
116 <a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="twitter">
117 <span>twitter</span>
118 </a>
119 </li>
120 {% endif %}
121 {% if craue_setting('share_shaarli') %}
122 <li>
123 <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli">
124 <span>shaarli</span>
125 </a>
126 </li>
127 {% endif %}
128 {% if craue_setting('share_diaspora') %}
129 <li>
130 <a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora}">
131 <span>diaspora*</span>
132 </a>
133 </li>
134 {% endif %}
135 {% if craue_setting('carrot') %}
136 <li>
137 <a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="carrot">
138 <span>Carrot</span>
139 </a>
140 </li>
141 {% endif %}
142 {% if craue_setting('share_mail') %}
143 <li>
144 <a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" title="{{ 'entry.view.left_menu.share_email_label'|trans }}">
145 <i class="material-icons">email</i>
146 <span>{{ 'entry.view.left_menu.share_email_label'|trans }}</span>
147 </a>
148 </li>
149 {% endif %}
150 </ul>
151 </div>
152 </li>
153
154 {% if craue_setting('show_printlink') %}
155 <li class="bold border-bottom hide-on-med-and-down">
156 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.print'|trans }}" href="javascript: window.print();">
157 <i class="material-icons small">print</i>
158 <span>{{ 'entry.view.left_menu.print'|trans }}</span>
159 </a>
160 <div class="collapsible-body"></div>
161 </li>
162 {% endif %}
163
164 <li class="bold">
165 <a class="waves-effect collapsible-header">
166 <i class="material-icons small">file_download</i>
167 <span>{{ 'entry.view.left_menu.download'|trans }}</span>
168 </a>
169 <div class="collapsible-body">
170 <ul>
171 {% if craue_setting('export_epub') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'epub' }) }}" title="Generate ePub file">EPUB</a></li>{% endif %}
172 {% if craue_setting('export_mobi') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'mobi' }) }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
173 {% if craue_setting('export_pdf') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'pdf' }) }}" title="Generate PDF file">PDF</a></li>{% endif %}
174 {% if craue_setting('export_csv') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'csv' }) }}" title="Generate CSV file">CSV</a></li>{% endif %}
175 {% if craue_setting('export_json') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'json' }) }}" title="Generate JSON file">JSON</a></li>{% endif %}
176 {% if craue_setting('export_txt') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'txt' }) }}" title="Generate TXT file">TXT</a></li>{% endif %}
177 {% if craue_setting('export_xml') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'xml' }) }}" title="Generate XML file">XML</a></li>{% endif %}
178 </ul>
179 </div>
180 </li>
181
182 <li class="bold hide-on-large-only">
183 <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', { 'id': entry.id }) }}">
184 <i class="material-icons small">delete</i>
185 <span>{{ 'entry.view.left_menu.delete'|trans }}</span>
186 </a>
187 <div class="collapsible-body"></div>
188 </li>
189
190 <li class="bold">
191 <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 }}">
192 <i class="material-icons small">error</i>
193 <span>{{ 'entry.view.left_menu.problem.label'|trans }}</span>
194 </a>
195 <div class="collapsible-body"></div>
196 </li>
197
198 </ul>
199
200 {% endblock %}
201
202 {% block content %}
203 <div id="article">
204 <header class="mbm">
205 <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
206 </header>
207 <aside>
208 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
209 <span class="link mdi-action-query-builder">
210 {% if readingTime > 0 %}
211 {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
212 {% else %}
213 {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
214 {% endif %}
215 </span>
216 <span class="link mdi-action-today" title="{{ 'entry.view.created_at'|trans }}"> {{ entry.createdAt|date('Y-m-d') }}</span>
217 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
218 <span class="link"><i class="material-icons link">link</i> {{ entry.domainName|removeWww }}</span></a>
219 <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
220 <div id="list">
221 {% for tag in entry.tags %}
222 <div class="chip">
223 {{ tag.label }} <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i class="material-icons">delete</i></a>
224 </div>
225 {% endfor %}
226 </div>
227
228 <div class="input-field nav-panel-add-tag" style="display: none">
229 {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
230 </div>
231
232 {% if entry.previewPicture is not null %}
233 <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div>
234 {% endif %}
235
236 </aside>
237 <article>
238 {{ entry.content | raw }}
239 </article>
240 </div>
241
242 <script id="annotationroutes" type="application/json">
243 {
244 "prefix": "",
245 "urls": {
246 "create": "{{ path('annotations_post_annotation', { 'entry': entry.id }) }}",
247 "update": "{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}",
248 "destroy": "{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}",
249 "search": "{{ path('annotations_get_annotations', { 'entry': entry.id }) }}"
250 },
251 "entryId": "{{ entry.id }}"
252 }</script>
253
254 {% endblock %}
255
256 {% block footer %}
257 {% endblock %}