From c59d0c200ed2c64bb6cbb35adfe7f18298d81af4 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Sun, 11 Jan 2015 19:34:11 +0100 Subject: Fix torrent W3C+UX Puts links to torrents and magnets in tool bar Fixes a lot of W3C errors --- searx/templates/oscar/result_templates/torrent.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'searx/templates') diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html index 9258a0cb7..1893282b3 100644 --- a/searx/templates/oscar/result_templates/torrent.html +++ b/searx/templates/oscar/result_templates/torrent.html @@ -4,9 +4,11 @@ {% if result.publishedDate %}{% endif %} {{ icon('link') }} {{ _('cached') }} +{% if result.magnetlink %}{{ icon('magnet') }} {{ _('magnet link') }}{% endif %} +{% if result.torrentfile %}{{ icon('download-alt') }} {{ _('torrent file') }}{% endif %}

{{ icon('transfer') }} {{ _('Seeder') }} {{ result.seed }} • {{ _('Leecher') }} {{ result.leech }} -{% if result.filesize %}
{{ icon('floppy-disk') }} {{ _('Filesize') }} +{% if result.filesize %}
{{ icon('floppy-disk') }} {{ _('Filesize') }} {% if result.filesize < 1024 %}{{ result.filesize }} Byte {% elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} kb @@ -14,13 +16,11 @@ {% elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} GB {% else %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024/1024) }} TB{% endif %} {% endif %} -{% if result.files %}
{{ icon('file') }} {{ _('Number of Files') }} {{ result.files }}{% endif %}

-

- {{ icon('magnet') }} {{ _('magnet link') }} - {% if result.torrentfile %}
{{ icon('download-alt') }} {{ _('torrent file') }}{% endif %} -

+{% if result.files %}
{{ icon('file') }} {{ _('Number of Files') }} {{ result.files }}{% endif %} + +{% if result.content %}
{{ result.content|safe }}{% endif %} -{% if result.content %}

{{ result.content|safe }}

{% endif %} +

-- cgit v1.2.3