diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-23 12:45:24 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-23 12:45:24 +0100 |
commit | 163eae0bb15d0daa5390f434a42a8176eca186e7 (patch) | |
tree | 0e1ab2c2bb9591e826e73d875cbb04fdabb3f77f /src/WallabagBundle/Resources/views/Entry | |
parent | bd9f08157cc10619e9bb9dace6df43090dde44a9 (diff) | |
download | wallabag-163eae0bb15d0daa5390f434a42a8176eca186e7.tar.gz wallabag-163eae0bb15d0daa5390f434a42a8176eca186e7.tar.zst wallabag-163eae0bb15d0daa5390f434a42a8176eca186e7.zip |
toggle archive / fav actions
Diffstat (limited to 'src/WallabagBundle/Resources/views/Entry')
-rw-r--r-- | src/WallabagBundle/Resources/views/Entry/entries.html.twig | 20 | ||||
-rw-r--r-- | src/WallabagBundle/Resources/views/Entry/entry.html.twig | 18 |
2 files changed, 26 insertions, 12 deletions
diff --git a/src/WallabagBundle/Resources/views/Entry/entries.html.twig b/src/WallabagBundle/Resources/views/Entry/entries.html.twig index 81177298..de343aa2 100644 --- a/src/WallabagBundle/Resources/views/Entry/entries.html.twig +++ b/src/WallabagBundle/Resources/views/Entry/entries.html.twig | |||
@@ -7,6 +7,20 @@ | |||
7 | {% endblock %} | 7 | {% endblock %} |
8 | 8 | ||
9 | {% block content %} | 9 | {% block content %} |
10 | {% block pager %} | ||
11 | {% if entries is not empty %} | ||
12 | <div class="results"> | ||
13 | <div class="nb-results">{{ entries.count }} {% trans %}entries{% endtrans %}</div> | ||
14 | <div class="pagination"> | ||
15 | {% for p in range(1, entries.count) %} | ||
16 | <li> | ||
17 | <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}">{{ p }}</a> | ||
18 | </li> | ||
19 | {% endfor %} | ||
20 | </div> | ||
21 | </div> | ||
22 | {% endif %} | ||
23 | {% endblock %} | ||
10 | 24 | ||
11 | {% if entries is empty %} | 25 | {% if entries is empty %} |
12 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> | 26 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> |
@@ -21,9 +35,9 @@ | |||
21 | {% endif %} | 35 | {% endif %} |
22 | 36 | ||
23 | <ul class="tools links"> | 37 | <ul class="tools links"> |
24 | <li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isRead == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li> | 38 | <li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isRead == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li> |
25 | <li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isFav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li> | 39 | <li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isFav == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li> |
26 | <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans %}delete{% endtrans %}</span></a></li> | 40 | <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}delete{% endtrans %}</span></a></li> |
27 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.url | e | domainName }}</span></a></li> | 41 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.url | e | domainName }}</span></a></li> |
28 | </ul> | 42 | </ul> |
29 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | 43 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> |
diff --git a/src/WallabagBundle/Resources/views/Entry/entry.html.twig b/src/WallabagBundle/Resources/views/Entry/entry.html.twig index 19d4650e..8c08b2ef 100644 --- a/src/WallabagBundle/Resources/views/Entry/entry.html.twig +++ b/src/WallabagBundle/Resources/views/Entry/entry.html.twig | |||
@@ -11,9 +11,9 @@ | |||
11 | <ul class="links"> | 11 | <ul class="links"> |
12 | <li class="topPosF"><a href="#top" title="{% trans %}Back to top{% endtrans %}" class="tool top icon icon-arrow-up-thick"><span>{% trans %}Back to top{% endtrans %}</span></a></li> | 12 | <li class="topPosF"><a href="#top" title="{% trans %}Back to top{% endtrans %}" class="tool top icon icon-arrow-up-thick"><span>{% trans %}Back to top{% endtrans %}</span></a></li> |
13 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | domainName }}</span></a></li> | 13 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | domainName }}</span></a></li> |
14 | <li><a title="{% trans %}Mark as read{% endtrans %}" class="tool icon icon-check {% if entry.isRead == 0 %}archive-off{% else %}archive{% endif %}" href="javascript: void(null);" id="markAsRead"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li> | 14 | <li><a title="{% trans %}Mark as read{% endtrans %}" class="tool icon icon-check {% if entry.isRead == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li> |
15 | <li><a title="{% trans %}Favorite{% endtrans %}" class="tool icon icon-star {% if entry.isFav == 0 %}fav-off{% else %}fav{% endif %}" href="javascript: void(null);" id="setFav"><span>{% trans %}Toggle favorite{% endtrans %}</span></a></li> | 15 | <li><a title="{% trans %}Favorite{% endtrans %}" class="tool icon icon-star {% if entry.isFav == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle favorite{% endtrans %}</span></a></li> |
16 | <li><a title="{% trans %}Delete{% endtrans %}" class="tool delete icon icon-trash" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans %}Delete{% endtrans %}</span></a></li> | 16 | <li><a title="{% trans %}Delete{% endtrans %}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}Delete{% endtrans %}</span></a></li> |
17 | {% if 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="{% trans %}Tweet{% endtrans %}"><span>{% trans %}Tweet{% endtrans %}</span></a></li>{% endif %} | 17 | {% if 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="{% trans %}Tweet{% endtrans %}"><span>{% trans %}Tweet{% endtrans %}</span></a></li>{% endif %} |
18 | {% if 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="{% trans %}Email{% endtrans %}"><span>{% trans %}Email{% endtrans %}</span></a></li>{% endif %} | 18 | {% if 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="{% trans %}Email{% endtrans %}"><span>{% trans %}Email{% endtrans %}</span></a></li>{% endif %} |
19 | {% if share_shaarli %}<li><a href="{{ shaarli_url }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans %}shaarli{% endtrans %}"><span>{% trans %}shaarli{% endtrans %}</span></a></li>{% endif %} | 19 | {% if share_shaarli %}<li><a href="{{ shaarli_url }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans %}shaarli{% endtrans %}"><span>{% trans %}shaarli{% endtrans %}</span></a></li>{% endif %} |
@@ -43,9 +43,9 @@ | |||
43 | $(document).ready(function() { | 43 | $(document).ready(function() { |
44 | 44 | ||
45 | // toggle read property of current article | 45 | // toggle read property of current article |
46 | $('#markAsRead').click(function(){ | 46 | /* $('#markAsRead').click(function(){ |
47 | $("body").css("cursor", "wait"); | 47 | $("body").css("cursor", "wait"); |
48 | $.ajax( { url: './?action=toggle_archive&id={{ entry.id|e }}' }).done( | 48 | $.ajax( { url: '{{ path('archive_entry', { 'id': entry.id }) }}' }).done( |
49 | function( data ) { | 49 | function( data ) { |
50 | if ( data == '1' ) { | 50 | if ( data == '1' ) { |
51 | if ( $('#markAsRead').hasClass("archive-off") ) { | 51 | if ( $('#markAsRead').hasClass("archive-off") ) { |
@@ -62,12 +62,12 @@ | |||
62 | } | 62 | } |
63 | }); | 63 | }); |
64 | $("body").css("cursor", "auto"); | 64 | $("body").css("cursor", "auto"); |
65 | }); | 65 | });*/ |
66 | 66 | ||
67 | // toggle favorite property of current article | 67 | // toggle favorite property of current article |
68 | $('#setFav').click(function(){ | 68 | /* $('#setFav').click(function(){ |
69 | $("body").css("cursor", "wait"); | 69 | $("body").css("cursor", "wait"); |
70 | $.ajax( { url: './?action=toggle_fav&id={{ entry.id|e }}' }).done( | 70 | $.ajax( { url: '{{ path('star_entry', { 'id': entry.id }) }}' }).done( |
71 | function( data ) { | 71 | function( data ) { |
72 | if ( data == '1' ) { | 72 | if ( data == '1' ) { |
73 | if ( $('#setFav').hasClass("fav-off") ) { | 73 | if ( $('#setFav').hasClass("fav-off") ) { |
@@ -84,7 +84,7 @@ | |||
84 | } | 84 | } |
85 | }); | 85 | }); |
86 | $("body").css("cursor", "auto"); | 86 | $("body").css("cursor", "auto"); |
87 | }); | 87 | });*/ |
88 | 88 | ||
89 | $(window).scroll(function(e){ | 89 | $(window).scroll(function(e){ |
90 | var scrollTop = $(window).scrollTop(); | 90 | var scrollTop = $(window).scrollTop(); |