diff --git a/swh/web/ui/templates/search-form.html b/swh/web/ui/templates/search-form.html new file mode 100644 index 000000000..1303828c5 --- /dev/null +++ b/swh/web/ui/templates/search-form.html @@ -0,0 +1,72 @@ + +

Search with SHA-1 or SHA-256:

+
+
+
+ + + + +
+
+ + +

Search with files

+
+ + + +
+ Drag and drop or click here to hash files and search for them. + Your files will NOT be uploaded, hashing is done locally. + Filesizes over 20Mb may be slow to process, use with care. +
+
+ + +
+ + +
+
+ + + + + + + + + + diff --git a/swh/web/ui/templates/search.html b/swh/web/ui/templates/search.html index 3cce4e808..d8ee8b7f3 100644 --- a/swh/web/ui/templates/search.html +++ b/swh/web/ui/templates/search.html @@ -1,117 +1,47 @@ {% extends "layout.html" %} {% block title %}Search SWH{% endblock %} {% block content %} - - - - - -
- -

Search with SHA-1 or SHA-256:

-
-
-
- - - - -
-
- - -

Search with files

-
- - - -
- Drag and drop or click here to hash files and search for them. - Your files will NOT be uploaded, hashing is done locally. - Filesizes over 20Mb may be slow to process, use with care. -
-
- - -
- - -
-
- -
+ + {% include 'search-form.html' %} - - - {% if search_res is not none %} - {% if search_stats is not none %} - - {% endif %} + {% if search_stats is not none %} + + {% endif %} + {% for res in search_res %} {% if res['filename'] is not none %} {% else %} {% endif %} {% if res['found'] %} {% else %} {% endif %} {% endfor %}
File name SHA1 checksum Result
{{ res['filename'] }}From text input{{ res['sha1'] }} {{ res['sha1'] }}
{% endif %} {% if message is not none and message != '' %} -
{{ message | safe }}
-
- {% endif %} +
{{ message | safe }}
+ +{% endif %} {% endblock %}