]>
Commit | Line | Data |
---|---|---|
ad4d1caa | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
bd9f0815 | 2 | |
4d9128de | 3 | {% block title %}{{ entry.title|e|default('entry.default_title'|trans)|raw }} ({{ entry.domainName|removeWww }}){% endblock %} |
bd9f0815 | 4 | |
bd9f0815 | 5 | {% block content %} |
56349e47 TC |
6 | <div id="article"> |
7 | <header class="mbm"> | |
4d9128de | 8 | <h1>{{ entry.title|e|default('entry.default_title'|trans)|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> |
56349e47 TC |
9 | </header> |
10 | ||
11 | <div id="article_toolbar"> | |
79efca1e JB |
12 | <ul class="links"> |
13 | <li class="topPosF"><a href="#top" title="{{ 'entry.view.left_menu.back_to_top'|trans }}" class="tool top icon icon-arrow-up-thick"><span>{{ 'entry.view.left_menu.set_as_read'|trans }}</span></a></li> | |
a22b8043 | 14 | <li><a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon icon-link original"><span>{{ entry.domainName|removeWww }}</span></a></li> |
79efca1e | 15 | <li><a title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" class="tool icon icon-reload" href="{{ path('reload_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li> |
458beef0 NL |
16 | |
17 | {% set markAsReadLabel = 'entry.view.left_menu.set_as_unread' %} | |
18 | {% if entry.isArchived == 0 %} | |
19 | {% set markAsReadLabel = 'entry.view.left_menu.set_as_read' %} | |
20 | {% endif %} | |
21 | ||
94f2057f NL |
22 | <li><a title="{{ markAsReadLabel|trans }}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %} markasread" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ markAsReadLabel|trans }}</span></a></li> |
23 | <li><a title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %} favorite" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span></a></li> | |
a494c33e | 24 | <li><a id="nav-btn-add-tag" class="tool icon icon-price-tags" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li> |
fa0f5ee1 | 25 | <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li> |
a494c33e TC |
26 | {% if craue_setting('share_public') %} |
27 | <li><a href="{{ path('share', {'id': entry.id }) }}" target="_blank" class="tool icon icon-eye" title="{{ 'entry.view.left_menu.public_link'|trans }}"><span>{{ 'entry.view.left_menu.public_link'|trans }}</span></a></li> | |
28 | <li><a href="{{ path('delete_share', {'id': entry.id }) }}" class="tool icon icon-no-eye" title="{{ 'entry.view.left_menu.delete_public_link'|trans }}"><span>{{ 'entry.view.left_menu.delete_public_link'|trans }}</span></a></li> | |
29 | {% endif %} | |
62682c07 | 30 | {% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/share?text={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" rel="noopener" class="tool twitter icon icon-twitter" title="Tweet"><span>Tweet</span></a></li>{% endif %} |
79efca1e | 31 | {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %} |
a22b8043 MB |
32 | {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&tags={{ entry.tags|join(',')|url_encode }}{% if craue_setting('shaarli_share_origin_url') %}&original_url={{ entry.originUrl|url_encode }}{% endif %}" target="_blank" rel="noopener" class="tool icon-image icon-image--shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %} |
33 | {% if craue_setting('share_scuttle') %}<li><a href="{{ craue_setting('scuttle_url') }}/bookmarks.php?action=add&address={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&tags={{ entry.tags|join(',')|url_encode }}" target="_blank" rel="noopener" class="tool icon-image icon-image--scuttle" title="scuttle"><span>scuttle</span></a></li>{% endif %} | |
34 | {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" rel="noopener" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %} | |
35 | {% if craue_setting('share_unmark') %}<li><a href="{{ craue_setting('unmark_url') }}/mark/add?url={{ entry.url|url_encode }}&title={{entry.title|url_encode}}&v=6" target="_blank" rel="noopener" class="tool unmark icon-image icon-image--unmark" title="unmark"><span>unmark.it</span></a></li>{% endif %} | |
36 | {% if craue_setting('carrot') %}<li><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" rel="noopener" title="carrot"><span>Carrot</span></a></li>{% endif %} | |
79efca1e | 37 | {% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.print'|trans }}</span></a></li>{% endif %} |
aa29fc4e ÉG |
38 | {% if craue_setting('export_epub') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'epub' }) }}" title="Generate ePub file">EPUB</a></li>{% endif %} |
39 | {% if craue_setting('export_mobi') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'mobi' }) }}" title="Generate Mobi file">MOBI</a></li>{% endif %} | |
40 | {% if craue_setting('export_pdf') %}<li><a href="{{ path('export_entry', { 'id': entry.id, 'format': 'pdf' }) }}" title="Generate PDF file">PDF</a></li>{% endif %} | |
29373065 | 41 | <li><a href="mailto:siteconfig@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li> |
79efca1e JB |
42 | </ul> |
43 | </div> | |
d35ba2c3 | 44 | |
add0e14c | 45 | <div id="article-informations"> |
3e85e911 | 46 | <i class="tool icon icon-calendar" title="{{ 'entry.view.created_at'|trans }}"> |
5e9009ce | 47 | {{ entry.createdAt|date('Y-m-d H:i') }} |
a494c33e | 48 | </i> |
d35ba2c3 | 49 | |
7b0b3622 | 50 | {% if entry.publishedAt is not null %} |
5e9009ce NL |
51 | <i class="tool icon icon-pencil2" title="{{ 'entry.view.published_at'|trans }}"> |
52 | {{ entry.publishedAt|date('Y-m-d H:i') }} | |
53 | </i> | |
54 | {% endif %} | |
55 | ||
7b0b3622 NL |
56 | {% if entry.publishedBy is not empty %} |
57 | <i class="tool icon icon-users" title="{{ 'entry.view.published_by'|trans }}"> | |
58 | {% for author in entry.publishedBy %} | |
59 | {{ author }}{% if not loop.last %}, {% endif %} | |
60 | {% endfor %} | |
61 | </i> | |
62 | {% endif %} | |
63 | ||
a494c33e | 64 | <i class="tool icon icon-time"> |
41022cb2 | 65 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed * 200 %} |
add0e14c | 66 | {% if readingTime > 0 %} |
a494c33e | 67 | {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} |
add0e14c | 68 | {% else %} |
a494c33e | 69 | {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} |
add0e14c | 70 | {% endif %} |
a494c33e | 71 | </i> |
add0e14c | 72 | |
b2439a8e | 73 | <span class="tool link"><i class="material-icons">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> |
6de4cd35 KD |
74 | |
75 | {% if entry.originUrl is not empty %} | |
ecf41ab3 | 76 | <i class="material-icons" title="{{ 'entry.view.provided_by'|trans }}">launch</i> |
a22b8043 | 77 | <a href="{{ entry.originUrl|e }}" target="_blank" rel="noopener" class="tool"> |
6de4cd35 KD |
78 | {{ entry.originUrl|striptags|removeSchemeAndWww|truncate(32) }} |
79 | </a> | |
80 | {% endif %} | |
81 | ||
add0e14c | 82 | <aside class="tags"> |
645c0d5b | 83 | <div class="card-entry-tags"> |
add0e14c | 84 | {% for tag in entry.tags %} |
fa0f5ee1 JB |
85 | <span class="label-outline"> |
86 | <i class="material-icons">label_outline</i> | |
87 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | |
88 | <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')" class="nostyle"> | |
89 | <i>✘</i> | |
90 | </a> | |
91 | </span> | |
add0e14c | 92 | {% endfor %} |
645c0d5b | 93 | </div> |
64f81bc3 | 94 | <div class="input-field baggy-add-tag" style="display: none"> |
add0e14c NL |
95 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} |
96 | </div> | |
97 | </aside> | |
98 | </div> | |
bd9f0815 NL |
99 | <article> |
100 | {{ entry.content | raw }} | |
101 | </article> | |
102 | </div> | |
79efca1e | 103 | |
5ecdfcd0 TC |
104 | <script id="annotationroutes" type="application/json"> |
105 | { | |
106 | "prefix": "", | |
107 | "urls": { | |
108 | "create": "{{ path('annotations_post_annotation', { 'entry': entry.id }) }}", | |
109 | "update": "{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}", | |
110 | "destroy": "{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}", | |
111 | "search": "{{ path('annotations_get_annotations', { 'entry': entry.id }) }}" | |
112 | }, | |
113 | "entryId": "{{ entry.id }}" | |
114 | } | |
bd9f0815 | 115 | </script> |
7df80cb3 | 116 | {% endblock %} |