diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-01-25 22:02:44 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-02-04 20:31:26 +0100 |
commit | 365a38984e32d152ec0170991a61bf704756cf1e (patch) | |
tree | 0d2b5e8c06bd3dad99f4eced2ee846728e1b9101 /src | |
parent | 6c08fb68b8e7883df7f6c1a2ba7c56ced4c1153b (diff) | |
download | wallabag-365a38984e32d152ec0170991a61bf704756cf1e.tar.gz wallabag-365a38984e32d152ec0170991a61bf704756cf1e.tar.zst wallabag-365a38984e32d152ec0170991a61bf704756cf1e.zip |
better display for txt
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/EntriesExport.php | 4 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 79fe6eaa..6e06086f 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php | |||
@@ -366,8 +366,8 @@ class EntriesExport | |||
366 | { | 366 | { |
367 | $content = ''; | 367 | $content = ''; |
368 | foreach ($this->entries as $entry) { | 368 | foreach ($this->entries as $entry) { |
369 | $content .= $entry->getTitle(); | 369 | $content .= "\n\n" . str_repeat("=",100) . "\n\n" . $entry->getTitle() . "\n\n" . str_repeat("=",100) . "\n\n"; |
370 | $content .= strip_tags($entry->getContent()); | 370 | $content .= trim(preg_replace('/\s+/S', ' ', strip_tags($entry->getContent()))) . "\n\n"; |
371 | } | 371 | } |
372 | return Response::create( | 372 | return Response::create( |
373 | $content, | 373 | $content, |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index 8ad24fbf..e9925e3d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | |||
@@ -107,7 +107,7 @@ | |||
107 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">{% trans %}XML{% endtrans %}</a></li>{% endif %} | 107 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">{% trans %}XML{% endtrans %}</a></li>{% endif %} |
108 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">{% trans %}JSON{% endtrans %}</a></li>{% endif %} | 108 | {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">{% trans %}JSON{% endtrans %}</a></li>{% endif %} |
109 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">{% trans %}CSV{% endtrans %}</a></li>{% endif %} | 109 | {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">{% trans %}CSV{% endtrans %}</a></li>{% endif %} |
110 | {% if craue_setting('export_txt') %}<li class="bold"><del><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">{% trans %}TXT{% endtrans %}</a></del></li>{% endif %} | 110 | {% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">{% trans %}TXT{% endtrans %}</a></li>{% endif %} |
111 | </ul> | 111 | </ul> |
112 | </div> | 112 | </div> |
113 | 113 | ||