aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WallabagBundle/Resources/views/Entry
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2015-01-23 16:28:37 +0100
committerNicolas Lœuillet <nicolas@loeuillet.org>2015-01-23 16:28:37 +0100
commitad4d1caa9e744af57ca58a4e57576533eb682d00 (patch)
tree37d6c284d2afc7fc62cdf80be419b536ab4ea603 /src/WallabagBundle/Resources/views/Entry
parentb84a80559a1167b5500fbc5eb4965d3b08b371ef (diff)
downloadwallabag-ad4d1caa9e744af57ca58a4e57576533eb682d00.tar.gz
wallabag-ad4d1caa9e744af57ca58a4e57576533eb682d00.tar.zst
wallabag-ad4d1caa9e744af57ca58a4e57576533eb682d00.zip
move WallabagBundle into Wallabag:CoreBundle
Diffstat (limited to 'src/WallabagBundle/Resources/views/Entry')
-rw-r--r--src/WallabagBundle/Resources/views/Entry/entries.html.twig47
-rw-r--r--src/WallabagBundle/Resources/views/Entry/entry.html.twig104
-rw-r--r--src/WallabagBundle/Resources/views/Entry/new.html.twig11
3 files changed, 0 insertions, 162 deletions
diff --git a/src/WallabagBundle/Resources/views/Entry/entries.html.twig b/src/WallabagBundle/Resources/views/Entry/entries.html.twig
deleted file mode 100644
index de343aa2..00000000
--- a/src/WallabagBundle/Resources/views/Entry/entries.html.twig
+++ /dev/null
@@ -1,47 +0,0 @@
1{% extends "WallabagBundle::layout.html.twig" %}
2
3{% block title "Unread" %}
4
5{% block menu %}
6 {% include "WallabagBundle::_menu.html.twig" %}
7{% endblock %}
8
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 %}
24
25 {% if entries is empty %}
26 <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div>
27 {% else %}
28 {% for entry in entries %}
29 <div id="entry-{{ entry.id|e }}" class="entrie">
30 <h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
31 {% if entry.content| readingTime > 0 %}
32 <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} {{ entry.content| readingTime }} min</span></div>
33 {% else %}
34 <div class="estimatedTime"><span class="tool reading-time">{% trans %}estimated reading time :{% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div>
35 {% endif %}
36
37 <ul class="tools links">
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>
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>
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>
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>
42 </ul>
43 <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
44 </div>
45 {% endfor %}
46 {% endif %}
47{% endblock %}
diff --git a/src/WallabagBundle/Resources/views/Entry/entry.html.twig b/src/WallabagBundle/Resources/views/Entry/entry.html.twig
deleted file mode 100644
index 8c08b2ef..00000000
--- a/src/WallabagBundle/Resources/views/Entry/entry.html.twig
+++ /dev/null
@@ -1,104 +0,0 @@
1{% extends "WallabagBundle::layout.html.twig" %}
2
3{% block title %}{{ entry.title|raw }} ({{ entry.url | e | domainName }}){% endblock %}
4
5{% block menu %}
6 {% include "WallabagBundle::_menu.html.twig" %}
7{% endblock %}
8
9{% block content %}
10 <div id="article_toolbar">
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>
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="{{ 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="{{ 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="{{ 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 %}
18 {% if share_mail %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;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 }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans %}shaarli{% endtrans %}"><span>{% trans %}shaarli{% endtrans %}</span></a></li>{% endif %}
20 {% if share_diaspora %}<li><a href="{{ diaspora_url }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="{% trans %}diaspora{% endtrans %}"><span>{% trans %}diaspora{% endtrans %}</span></a></li>{% endif %}
21 {# {% if flattr %}{% if flattr.status == flattrable %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans %}flattr{% endtrans %}"><span>{% trans %}flattr{% endtrans %}</span></a></li>{% elseif flattr.status == flattred %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans %}flattr{% endtrans %}><span>{% trans %}flattr{% endtrans %}</span> ({{ flattr.numFlattrs }})</a></li>{% endif %}{% endif %} #}
22 {% if 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="{% trans %}carrot{% endtrans %}"><span>Carrot</span></a></li>{% endif %}
23 {% if show_printlink %}<li><a title="{% trans %}Print{% endtrans %}" class="tool icon icon-print" href="javascript: window.print();"><span>{% trans %}Print{% endtrans %}</span></a></li>{% endif %}
24 {% if export_epub %}<li><a href="./?epub&amp;method=id&amp;value={{ entry.id|e }}" title="Generate ePub file">EPUB</a></li>{% endif %}
25 {% if export_mobi %}<li><a href="./?mobi&amp;method=id&amp;value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
26 {% if export_pdf %}<li><a href="./?pdf&amp;method=id&amp;value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %}
27 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans %}Does this article appear wrong?{% endtrans %}" class="tool bad-display icon icon-delete"><span>{% trans %}Does this article appear wrong?{% endtrans %}</span></a></li>
28 </ul>
29 </div>
30 <div id="article">
31 <header class="mbm">
32 <h1>{{ entry.title|raw }}</h1>
33 </header>
34 <aside class="tags">
35 tags: {# {% for tag in tags %}<a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> {% endfor %}<a href="./?view=edit-tags&amp;id={{ entry.id|e }}" title="{% trans %}Edit tags{% endtrans %}">✎</a> #}
36 </aside>
37 <article>
38 {{ entry.content | raw }}
39 </article>
40 </div>
41 <script src="{{ asset('themes/_global/js/restoreScroll.js')}}"></script>
42 <script type="text/javascript">
43 $(document).ready(function() {
44
45 // toggle read property of current article
46 /* $('#markAsRead').click(function(){
47 $("body").css("cursor", "wait");
48 $.ajax( { url: '{{ path('archive_entry', { 'id': entry.id }) }}' }).done(
49 function( data ) {
50 if ( data == '1' ) {
51 if ( $('#markAsRead').hasClass("archive-off") ) {
52 $('#markAsRead').removeClass("archive-off");
53 $('#markAsRead').addClass("archive");
54 }
55 else {
56 $('#markAsRead').removeClass("archive");
57 $('#markAsRead').addClass("archive-off");
58 }
59 }
60 else {
61 alert('Error! Pls check if you are logged in.');
62 }
63 });
64 $("body").css("cursor", "auto");
65 });*/
66
67 // toggle favorite property of current article
68 /* $('#setFav').click(function(){
69 $("body").css("cursor", "wait");
70 $.ajax( { url: '{{ path('star_entry', { 'id': entry.id }) }}' }).done(
71 function( data ) {
72 if ( data == '1' ) {
73 if ( $('#setFav').hasClass("fav-off") ) {
74 $('#setFav').removeClass("fav-off");
75 $('#setFav').addClass("fav");
76 }
77 else {
78 $('#setFav').removeClass("fav");
79 $('#setFav').addClass("fav-off");
80 }
81 }
82 else {
83 alert('Error! Pls check if you are logged in.');
84 }
85 });
86 $("body").css("cursor", "auto");
87 });*/
88
89 $(window).scroll(function(e){
90 var scrollTop = $(window).scrollTop();
91 var docHeight = $(document).height();
92 var scrollPercent = (scrollTop) / (docHeight);
93 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
94 savePercent({{ entry.id|e }}, scrollPercentRounded);
95 });
96
97 retrievePercent({{ entry.id|e }});
98
99 $(window).resize(function(){
100 retrievePercent({{ entry.id|e }});
101 });
102 });
103 </script>
104{% endblock %} \ No newline at end of file
diff --git a/src/WallabagBundle/Resources/views/Entry/new.html.twig b/src/WallabagBundle/Resources/views/Entry/new.html.twig
deleted file mode 100644
index 78da791f..00000000
--- a/src/WallabagBundle/Resources/views/Entry/new.html.twig
+++ /dev/null
@@ -1,11 +0,0 @@
1{% extends "WallabagBundle::layout.html.twig" %}
2
3{% block title %}{% trans %}Save new entry{% endtrans %}{% endblock %}
4
5{% block menu %}
6 {% include "WallabagBundle::_menu.html.twig" %}
7{% endblock %}
8
9{% block content %}
10 {{ form(form) }}
11{% endblock %} \ No newline at end of file