diff options
Diffstat (limited to 'themes/baggy/view.twig')
-rwxr-xr-x | themes/baggy/view.twig | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index ffb512a3..62af2516 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig | |||
@@ -8,13 +8,14 @@ | |||
8 | <ul class="links"> | 8 | <ul class="links"> |
9 | <li class="topPosF"><a href="#top" title="{% trans "Back to top" %}" class="tool top icon icon-arrow-up-thick"><span>{% trans "Back to top" %}</span></a></li> | 9 | <li class="topPosF"><a href="#top" title="{% trans "Back to top" %}" class="tool top icon icon-arrow-up-thick"><span>{% trans "Back to top" %}</span></a></li> |
10 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | getDomain }}</span></a></li> | 10 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | getDomain }}</span></a></li> |
11 | <li><a title="{% trans "Mark as read" %}" class="tool icon icon-check {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "Toggle mark as read" %}</span></a></li> | 11 | <li><a title="{% trans "Mark as read" %}" class="tool icon icon-check {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="javascript: void(null);" id="markAsRead"><span>{% trans "Toggle mark as read" %}</span></a></li> |
12 | <li><a title="{% trans "Favorite" %}" class="tool icon icon-star {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "Toggle favorite" %}</span></a></li> | 12 | <li><a title="{% trans "Favorite" %}" class="tool icon icon-star {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="javascript: void(null);" id="setFav"><span>{% trans "Toggle favorite" %}</span></a></li> |
13 | <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> | 13 | <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> |
14 | {% if constant('SHARE_TWITTER') == 1 %}<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" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} | 14 | {% if constant('SHARE_TWITTER') == 1 %}<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" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} |
15 | {% if constant('SHARE_MAIL') == 1 %}<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" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} | 15 | {% if constant('SHARE_MAIL') == 1 %}<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" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} |
16 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} | 16 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} |
17 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numflattrs }})</a></li>{% endif %}{% endif %} | 17 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numflattrs }})</a></li>{% endif %}{% endif %} |
18 | {% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool icon icon-print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %} | ||
18 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li> | 19 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li> |
19 | </ul> | 20 | </ul> |
20 | </div> | 21 | </div> |
@@ -32,6 +33,50 @@ | |||
32 | <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script> | 33 | <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script> |
33 | <script type="text/javascript"> | 34 | <script type="text/javascript"> |
34 | $(document).ready(function() { | 35 | $(document).ready(function() { |
36 | |||
37 | // toggle read property of current article | ||
38 | $('#markAsRead').click(function(){ | ||
39 | $("body").css("cursor", "wait"); | ||
40 | $.ajax( { url: './?action=toggle_archive&id={{ entry.id|e }}' }).done( | ||
41 | function( data ) { | ||
42 | if ( data == '1' ) { | ||
43 | if ( $('#markAsRead').hasClass("archive-off") ) { | ||
44 | $('#markAsRead').removeClass("archive-off"); | ||
45 | $('#markAsRead').addClass("archive"); | ||
46 | } | ||
47 | else { | ||
48 | $('#markAsRead').removeClass("archive"); | ||
49 | $('#markAsRead').addClass("archive-off"); | ||
50 | } | ||
51 | } | ||
52 | else { | ||
53 | alert('Error! Pls check if you are logged in.'); | ||
54 | } | ||
55 | }); | ||
56 | $("body").css("cursor", "auto"); | ||
57 | }); | ||
58 | |||
59 | // toggle favorite property of current article | ||
60 | $('#setFav').click(function(){ | ||
61 | $("body").css("cursor", "wait"); | ||
62 | $.ajax( { url: './?action=toggle_fav&id={{ entry.id|e }}' }).done( | ||
63 | function( data ) { | ||
64 | if ( data == '1' ) { | ||
65 | if ( $('#setFav').hasClass("fav-off") ) { | ||
66 | $('#setFav').removeClass("fav-off"); | ||
67 | $('#setFav').addClass("fav"); | ||
68 | } | ||
69 | else { | ||
70 | $('#setFav').removeClass("fav"); | ||
71 | $('#setFav').addClass("fav-off"); | ||
72 | } | ||
73 | } | ||
74 | else { | ||
75 | alert('Error! Pls check if you are logged in.'); | ||
76 | } | ||
77 | }); | ||
78 | $("body").css("cursor", "auto"); | ||
79 | }); | ||
35 | 80 | ||
36 | $(window).scroll(function(e){ | 81 | $(window).scroll(function(e){ |
37 | var scrollTop = $(window).scrollTop(); | 82 | var scrollTop = $(window).scrollTop(); |