diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry')
3 files changed, 42 insertions, 87 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 a2caaebf..8636e3be 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 | |||
@@ -34,7 +34,27 @@ | |||
34 | </div> | 34 | </div> |
35 | {% endfor %} | 35 | {% endfor %} |
36 | 36 | ||
37 | <aside id="filter-form" class=""> | 37 | |
38 | <!-- Export --> | ||
39 | <aside id="download-form"> | ||
40 | {% set currentRoute = app.request.attributes.get('_route') %} | ||
41 | {% if currentRoute == 'homepage' %} | ||
42 | {% set currentRoute = 'unread' %} | ||
43 | {% endif %} | ||
44 | <h2>{{ 'entry.list.export_title'|trans }}</h2> | ||
45 | <a href="javascript: void(null);" id="download-form-close" class="close-button--popup close-button">×</a> | ||
46 | <ul> | ||
47 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">EPUB</a></li>{% endif %} | ||
48 | {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">MOBI</a></li>{% endif %} | ||
49 | {% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf' }) }}">PDF</a></li>{% endif %} | ||
50 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">JSON</a></li>{% endif %} | ||
51 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">CSV</a></li>{% endif %} | ||
52 | {% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">TXT</a></li>{% endif %} | ||
53 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} | ||
54 | </ul> | ||
55 | </aside> | ||
56 | <!-- Filter --> | ||
57 | <aside id="filter-form"> | ||
38 | <form method="get" action="{{ path('all') }}"> | 58 | <form method="get" action="{{ path('all') }}"> |
39 | <h2>{{ 'entry.filters.title'|trans }}</h2> | 59 | <h2>{{ 'entry.filters.title'|trans }}</h2> |
40 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> | 60 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> |
@@ -54,6 +74,11 @@ | |||
54 | </div> | 74 | </div> |
55 | 75 | ||
56 | <div class="input-field"> | 76 | <div class="input-field"> |
77 | {{ form_widget(form.isUnread) }} | ||
78 | {{ form_label(form.isUnread) }} | ||
79 | </div> | ||
80 | |||
81 | <div class="input-field"> | ||
57 | {{ form_widget(form.previewPicture) }} | 82 | {{ form_widget(form.previewPicture) }} |
58 | {{ form_label(form.previewPicture) }} | 83 | {{ form_label(form.previewPicture) }} |
59 | </div> | 84 | </div> |
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 5a800332..8c06cf11 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,7 +5,7 @@ | |||
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"> |
@@ -30,10 +30,10 @@ | |||
30 | </ul> | 30 | </ul> |
31 | </div> | 31 | </div> |
32 | {% set nbAnnotations = entry.annotations | length %} | 32 | {% set nbAnnotations = entry.annotations | length %} |
33 | <span class="tool link mdi-communication-comment"> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> | 33 | <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> |
34 | <aside class="tags"> | 34 | <aside class="tags"> |
35 | {% for tag in entry.tags %} | 35 | {% for tag in entry.tags %} |
36 | <span class="mdi-action-label-outline">{{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i>✘</i></a> | 36 | <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> |
37 | {% endfor %} | 37 | {% endfor %} |
38 | <div class="input-field nav-panel-add-tag" style="display: none"> | 38 | <div class="input-field nav-panel-add-tag" style="display: none"> |
39 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | 39 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} |
@@ -46,87 +46,16 @@ | |||
46 | {{ entry.content | raw }} | 46 | {{ entry.content | raw }} |
47 | </article> | 47 | </article> |
48 | </div> | 48 | </div> |
49 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/restoreScroll.js')}}"></script> | 49 | <script id="annotationroutes" type="application/json"> |
50 | <script type="text/javascript"> | 50 | { |
51 | $(document).ready(function() { | 51 | "prefix": "", |
52 | 52 | "urls": { | |
53 | // toggle read property of current article | 53 | "create": "{{ path('annotations_post_annotation', { 'entry': entry.id }) }}", |
54 | /* $('#markAsRead').click(function(){ | 54 | "update": "{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}", |
55 | $("body").css("cursor", "wait"); | 55 | "destroy": "{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}", |
56 | $.ajax( { url: '{{ path('archive_entry', { 'id': entry.id }) }}' }).done( | 56 | "search": "{{ path('annotations_get_annotations', { 'entry': entry.id }) }}" |
57 | function( data ) { | 57 | }, |
58 | if ( data == '1' ) { | 58 | "entryId": "{{ entry.id }}" |
59 | if ( $('#markAsRead').hasClass("archive-off") ) { | 59 | } |
60 | $('#markAsRead').removeClass("archive-off"); | ||
61 | $('#markAsRead').addClass("archive"); | ||
62 | } | ||
63 | else { | ||
64 | $('#markAsRead').removeClass("archive"); | ||
65 | $('#markAsRead').addClass("archive-off"); | ||
66 | } | ||
67 | } | ||
68 | else { | ||
69 | alert('Error! Pls check if you are logged in.'); | ||
70 | } | ||
71 | }); | ||
72 | $("body").css("cursor", "auto"); | ||
73 | });*/ | ||
74 | |||
75 | // toggle favorite property of current article | ||
76 | /* $('#setFav').click(function(){ | ||
77 | $("body").css("cursor", "wait"); | ||
78 | $.ajax( { url: '{{ path('star_entry', { 'id': entry.id }) }}' }).done( | ||
79 | function( data ) { | ||
80 | if ( data == '1' ) { | ||
81 | if ( $('#setFav').hasClass("fav-off") ) { | ||
82 | $('#setFav').removeClass("fav-off"); | ||
83 | $('#setFav').addClass("fav"); | ||
84 | } | ||
85 | else { | ||
86 | $('#setFav').removeClass("fav"); | ||
87 | $('#setFav').addClass("fav-off"); | ||
88 | } | ||
89 | } | ||
90 | else { | ||
91 | alert('Error! Pls check if you are logged in.'); | ||
92 | } | ||
93 | }); | ||
94 | $("body").css("cursor", "auto"); | ||
95 | });*/ | ||
96 | |||
97 | $(window).scroll(function(e){ | ||
98 | var scrollTop = $(window).scrollTop(); | ||
99 | var docHeight = $(document).height(); | ||
100 | var scrollPercent = (scrollTop) / (docHeight); | ||
101 | var scrollPercentRounded = Math.round(scrollPercent*100)/100; | ||
102 | savePercent({{ entry.id }}, scrollPercentRounded); | ||
103 | }); | ||
104 | |||
105 | retrievePercent({{ entry.id }}); | ||
106 | |||
107 | $(window).resize(function(){ | ||
108 | retrievePercent({{ entry.id }}); | ||
109 | }); | ||
110 | }); | ||
111 | |||
112 | var app = new annotator.App(); | ||
113 | app.include(annotator.ui.main, { | ||
114 | element: document.querySelector('article') | ||
115 | }); | ||
116 | app.include(annotator.storage.http, { | ||
117 | prefix: '', | ||
118 | urls: { | ||
119 | create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}', | ||
120 | update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}', | ||
121 | destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}', | ||
122 | search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}' | ||
123 | } | ||
124 | }); | ||
125 | app | ||
126 | .start() | ||
127 | .then(function () { | ||
128 | app.annotations.load({entry: {{ entry.id }}}); | ||
129 | }); | ||
130 | </script> | 60 | </script> |
131 | |||
132 | {% endblock %} | 61 | {% 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 %} |