diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry')
3 files changed, 69 insertions, 90 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 778625ae..92eecb9b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig | |||
@@ -28,13 +28,43 @@ | |||
28 | </ul> | 28 | </ul> |
29 | {% if entry.previewPicture is null %} | 29 | {% if entry.previewPicture is null %} |
30 | <p>{{ entry.content|striptags|slice(0, 300) }}…</p> | 30 | <p>{{ entry.content|striptags|slice(0, 300) }}…</p> |
31 | <ul class="card-entry-tags"> | ||
32 | {% for tag in entry.tags %} | ||
33 | <li>{{ tag.label }}</li> | ||
34 | {% endfor %} | ||
35 | </ul> | ||
31 | {% else %} | 36 | {% else %} |
37 | <ul class="card-entry-labels"> | ||
38 | {% for tag in entry.tags | slice(0, 3) %} | ||
39 | <li>{{ tag.label }}</li> | ||
40 | {% endfor %} | ||
41 | </ul> | ||
32 | <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /> | 42 | <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /> |
33 | {% endif %} | 43 | {% endif %} |
34 | </div> | 44 | </div> |
35 | {% endfor %} | 45 | {% endfor %} |
36 | 46 | ||
37 | <aside id="filter-form" class=""> | 47 | |
48 | <!-- Export --> | ||
49 | <aside id="download-form"> | ||
50 | {% set currentRoute = app.request.attributes.get('_route') %} | ||
51 | {% if currentRoute == 'homepage' %} | ||
52 | {% set currentRoute = 'unread' %} | ||
53 | {% endif %} | ||
54 | <h2>{{ 'entry.list.export_title'|trans }}</h2> | ||
55 | <a href="javascript: void(null);" id="download-form-close" class="close-button--popup close-button">×</a> | ||
56 | <ul> | ||
57 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">EPUB</a></li>{% endif %} | ||
58 | {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">MOBI</a></li>{% endif %} | ||
59 | {% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf' }) }}">PDF</a></li>{% endif %} | ||
60 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">JSON</a></li>{% endif %} | ||
61 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">CSV</a></li>{% endif %} | ||
62 | {% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">TXT</a></li>{% endif %} | ||
63 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} | ||
64 | </ul> | ||
65 | </aside> | ||
66 | <!-- Filter --> | ||
67 | <aside id="filter-form"> | ||
38 | <form method="get" action="{{ path('all') }}"> | 68 | <form method="get" action="{{ path('all') }}"> |
39 | <h2>{{ 'entry.filters.title'|trans }}</h2> | 69 | <h2>{{ 'entry.filters.title'|trans }}</h2> |
40 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> | 70 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index d7374dc7..ce47a677 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig | |||
@@ -5,30 +5,30 @@ | |||
5 | {% block content %} | 5 | {% block content %} |
6 | <div id="article"> | 6 | <div id="article"> |
7 | <header class="mbm"> | 7 | <header class="mbm"> |
8 | <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> | 8 | <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> |
9 | </header> | 9 | </header> |
10 | 10 | ||
11 | <div id="article_toolbar"> | 11 | <div id="article_toolbar"> |
12 | <ul class="links"> | 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> | 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> |
14 | <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li> | 14 | <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li> |
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> | 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> |
16 | <li><a title="{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span></a></li> | 16 | <li><a title="{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span></a></li> |
17 | <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 %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span></a></li> | 17 | <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 %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span></a></li> |
18 | <li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li> | 18 | <li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li> |
19 | <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li> | 19 | <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li> |
20 | {% if craue_setting('share_twitter') %}<li><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="Tweet"><span>Tweet</span></a></li>{% endif %} | 20 | {% if craue_setting('share_twitter') %}<li><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="Tweet"><span>Tweet</span></a></li>{% endif %} |
21 | {% 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 %} | 21 | {% 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 %} |
22 | {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %} | 22 | {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %} |
23 | {% 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" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %} | 23 | {% 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" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %} |
24 | {% 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" title="carrot"><span>Carrot</span></a></li>{% endif %} | 24 | {% 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" title="carrot"><span>Carrot</span></a></li>{% endif %} |
25 | {% 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 %} | 25 | {% 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 %} |
26 | {% if craue_setting('export_epub') %}<li><a href="?epub&method=id&value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %} | 26 | {% if craue_setting('export_epub') %}<li><a href="?epub&method=id&value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %} |
27 | {% if craue_setting('export_mobi') %}<li><a href="?mobi&method=id&value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %} | 27 | {% if craue_setting('export_mobi') %}<li><a href="?mobi&method=id&value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %} |
28 | {% if craue_setting('export_pdf') %}<li><a href="?pdf&method=id&value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %} | 28 | {% if craue_setting('export_pdf') %}<li><a href="?pdf&method=id&value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %} |
29 | <li><a href="mailto:hello@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> | 29 | <li><a href="mailto:hello@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> |
30 | </ul> | 30 | </ul> |
31 | </div> | 31 | </div> |
32 | <div class="link mdi-action-today"> | 32 | <div class="link mdi-action-today"> |
33 | {{ 'entry.view.created_at'|trans }}: {{ entry.createdAt|date('Y-m-d') }} | 33 | {{ 'entry.view.created_at'|trans }}: {{ entry.createdAt|date('Y-m-d') }} |
34 | </div> | 34 | </div> |
@@ -43,10 +43,10 @@ | |||
43 | </div> | 43 | </div> |
44 | 44 | ||
45 | {% set nbAnnotations = entry.annotations | length %} | 45 | {% set nbAnnotations = entry.annotations | length %} |
46 | <span class="tool link mdi-communication-comment"> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | 46 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> |
47 | <aside class="tags"> | 47 | <aside class="tags"> |
48 | {% for tag in entry.tags %} | 48 | {% for tag in entry.tags %} |
49 | <span class="mdi-action-label-outline">{{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i>✘</i></a> | 49 | <span class="label-outline"><i class="material-icons">label_outline</i> {{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"class="nostyle"><i>✘</i></a> |
50 | {% endfor %} | 50 | {% endfor %} |
51 | <div class="input-field nav-panel-add-tag" style="display: none"> | 51 | <div class="input-field nav-panel-add-tag" style="display: none"> |
52 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | 52 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} |
@@ -59,54 +59,22 @@ | |||
59 | {{ entry.content | raw }} | 59 | {{ entry.content | raw }} |
60 | </article> | 60 | </article> |
61 | </div> | 61 | </div> |
62 | |||
63 | <script id="annotationroutes" type="application/json"> | ||
64 | { | ||
65 | "prefix": "", | ||
66 | "urls": { | ||
67 | "create": "{{ path('annotations_post_annotation', { 'entry': entry.id }) }}", | ||
68 | "update": "{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}", | ||
69 | "destroy": "{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}", | ||
70 | "search": "{{ path('annotations_get_annotations', { 'entry': entry.id }) }}" | ||
71 | }, | ||
72 | "entryId": "{{ entry.id }}" | ||
73 | } | ||
74 | </script> | ||
62 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/restoreScroll.js')}}"></script> | 75 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/restoreScroll.js')}}"></script> |
63 | <script type="text/javascript"> | 76 | <script type="text/javascript"> |
64 | $(document).ready(function() { | 77 | $(document).ready(function() { |
65 | |||
66 | // toggle read property of current article | ||
67 | /* $('#markAsRead').click(function(){ | ||
68 | $("body").css("cursor", "wait"); | ||
69 | $.ajax( { url: '{{ path('archive_entry', { 'id': entry.id }) }}' }).done( | ||
70 | function( data ) { | ||
71 | if ( data == '1' ) { | ||
72 | if ( $('#markAsRead').hasClass("archive-off") ) { | ||
73 | $('#markAsRead').removeClass("archive-off"); | ||
74 | $('#markAsRead').addClass("archive"); | ||
75 | } | ||
76 | else { | ||
77 | $('#markAsRead').removeClass("archive"); | ||
78 | $('#markAsRead').addClass("archive-off"); | ||
79 | } | ||
80 | } | ||
81 | else { | ||
82 | alert('Error! Pls check if you are logged in.'); | ||
83 | } | ||
84 | }); | ||
85 | $("body").css("cursor", "auto"); | ||
86 | });*/ | ||
87 | |||
88 | // toggle starred property of current article | ||
89 | /* $('#setFav').click(function(){ | ||
90 | $("body").css("cursor", "wait"); | ||
91 | $.ajax( { url: '{{ path('star_entry', { 'id': entry.id }) }}' }).done( | ||
92 | function( data ) { | ||
93 | if ( data == '1' ) { | ||
94 | if ( $('#setFav').hasClass("fav-off") ) { | ||
95 | $('#setFav').removeClass("fav-off"); | ||
96 | $('#setFav').addClass("fav"); | ||
97 | } | ||
98 | else { | ||
99 | $('#setFav').removeClass("fav"); | ||
100 | $('#setFav').addClass("fav-off"); | ||
101 | } | ||
102 | } | ||
103 | else { | ||
104 | alert('Error! Pls check if you are logged in.'); | ||
105 | } | ||
106 | }); | ||
107 | $("body").css("cursor", "auto"); | ||
108 | });*/ | ||
109 | |||
110 | $(window).scroll(function(e){ | 78 | $(window).scroll(function(e){ |
111 | var scrollTop = $(window).scrollTop(); | 79 | var scrollTop = $(window).scrollTop(); |
112 | var docHeight = $(document).height(); | 80 | var docHeight = $(document).height(); |
@@ -121,25 +89,5 @@ | |||
121 | retrievePercent({{ entry.id }}); | 89 | retrievePercent({{ entry.id }}); |
122 | }); | 90 | }); |
123 | }); | 91 | }); |
124 | |||
125 | var app = new annotator.App(); | ||
126 | app.include(annotator.ui.main, { | ||
127 | element: document.querySelector('article') | ||
128 | }); | ||
129 | app.include(annotator.storage.http, { | ||
130 | prefix: '', | ||
131 | urls: { | ||
132 | create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}', | ||
133 | update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}', | ||
134 | destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}', | ||
135 | search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}' | ||
136 | } | ||
137 | }); | ||
138 | app | ||
139 | .start() | ||
140 | .then(function () { | ||
141 | app.annotations.load({entry: {{ entry.id }}}); | ||
142 | }); | ||
143 | </script> | 92 | </script> |
144 | |||
145 | {% endblock %} | 93 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/pager.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/pager.html.twig index ac74676a..faaa21a8 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/pager.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/pager.html.twig | |||
@@ -2,7 +2,8 @@ | |||
2 | <div class="results"> | 2 | <div class="results"> |
3 | <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div> | 3 | <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div> |
4 | <div class="pagination"> | 4 | <div class="pagination"> |
5 | <a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a> | 5 | <i class="btn-clickable download-btn material-icons md-36">file_download</i> |
6 | <i class="btn-clickable filter-btn material-icons md-36">filter_list</i> | ||
6 | {% if entries.getNbPages > 1 %} | 7 | {% if entries.getNbPages > 1 %} |
7 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | 8 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} |
8 | {% endif %} | 9 | {% endif %} |