]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix #1357, truncate domain name if it's too loooong 1400/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 24 Aug 2015 20:09:57 +0000 (22:09 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 24 Aug 2015 20:09:57 +0000 (22:09 +0200)
app/config/services.yml
src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig

index b3ec7c513317e690f0899ab613e975fa4c2bd4c6..a7fa9bfea3a3bdcd53ce850355b3f9819e42f43d 100644 (file)
@@ -12,3 +12,8 @@ services:
         class: Doctrine\Common\Cache\FilesystemCache
         arguments:
             - %kernel.cache_dir%/doctrine/metadata
+
+    twig.extension.text:
+        class: Twig_Extensions_Extension_Text
+        tags:
+            - { name: twig.extension }
index 118a2f4bedfa39c3f7b207b6d5ef98700a581f12..3f5cf46090e7a3739b70d912df9fb737424252cc 100644 (file)
@@ -37,7 +37,7 @@
                     <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>
                     <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName }}</span></a></li>
                 </ul>
-                <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
+                <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
             </div>
         {% endfor %}
     {% endif %}
index b45552f2df8a00a79e90f04b11e425535b01b3a4..f896dec3492b3d742f122eb81e878a64217c2faa 100644 (file)
                         {% else %}
                             <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div>
                         {% endif %}
-                        <p>{{ entry.content|striptags|slice(0, 300) }}...</p>
+                        <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
                     </div>
                     <div class="card-action">
-                        <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }}" class="tool original grey-text"><span>{{ entry.domainName }}</span></a></bold>
+                        <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }} - {{ entry.domainName }}" class="tool original grey-text"><span>{{ entry.domainName | truncate(18) }}</span></a></bold>
 
                         <ul class="tools links right">
                             <li>
                                 <a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a>
-                                <a title="{% trans %}toggle favorite{% endtrans %}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a>
-                                <a title="{% trans %}delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a>
+                                <a title="{% trans %}Toggle favorite{% endtrans %}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a>
+                                <a title="{% trans %}Delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a>
                             </li>
                         </ul>
                     </div>