]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Add support of originUrl field in material entry view
authorKevin Decherf <kevin@kdecherf.com>
Sat, 9 Sep 2017 19:00:32 +0000 (21:00 +0200)
committerKevin Decherf <kevin@kdecherf.com>
Sun, 19 Nov 2017 14:02:11 +0000 (15:02 +0100)
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig

index 4cff7bf2db489491618b6a61eb35c31086366ec4..0d242d2bfd29602ec7e5fbbd8e448932ad92c630 100644 (file)
                         <i class="material-icons link">comment</i>
                         {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}
                     </li>
+                    {% if entry.originUrl is not empty %}
+                        <li>
+                            <i class="material-icons" title="Provided by">launch</i>
+                            <a href="{{ entry.originUrl|e }}" target="_blank" class="tool">
+                                {{ entry.originUrl|striptags|removeSchemeAndWww|truncate(32) }}
+                            </a>
+                        </li>
+                    {% endif %}
                 </ul>
                 <ul class="tags">
                     {% for tag in entry.tags %}