diff sat_templates/default/file/discover.html @ 147:33c7ce833d3f

install: setup.py fix + moved "default" dir in a "sat_templates" dir: the merge request at https://bugs.goffi.org/mr/view/3 was a good basis, but not fully working ("default" dir was removed), this patch fixes it, and do some improvments: - moved "default" in "sat_templates" dir, which correspond to the python module, so it can be found easily from python - added VERSION, and mercurial hash detection, in the same way as for Cagou and backend - slight modification of classifiers - replaces tabs coming from MR by spaces
author Goffi <goffi@goffi.org>
date Sat, 02 Jun 2018 17:25:43 +0200
parents default/file/discover.html@c3f50951f2cc
children 954759f0e8fa
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sat_templates/default/file/discover.html	Sat Jun 02 17:25:43 2018 +0200
@@ -0,0 +1,73 @@
+{% extends 'base/base.html' %}
+{% import 'components/block.html' as block %}
+{% import 'components/images.html' as images with context %}
+{% import 'input/form.html' as form with context %}
+{% import 'input/field.html' as field with context %}
+
+{% block body %}
+{{ icon_defs('server', 'desktop', 'mobile', 'globe', 'terminal') }}
+<p class="instructions--head">
+    {% trans %}
+    Please select the device you want to access
+    {% endtrans %}
+</p>
+<div class="disco_files">
+    {% if disco_service_entities %}
+        <div class="files__services">
+            {{ block.separator(_("services")) }}
+            <ul class="grid grid--center">
+                {% for entity,ident in disco_service_entities.iteritems() %}
+                    <li class='grid__item grid__item--medium grid__item--selectable'>
+                        <a href="{{entities_url[entity]}}">
+                            {{ icon('server', cls='file__icon') }}
+                            <span>
+                                {% if disco_service_entities|count == 1 %}
+                                    {% trans %}your server{% endtrans %}
+                                {% else %}
+                                    {{ ident.values()[0].values()[0][0] }}
+                                {% endif %}
+                            </span>
+                        </a>
+                    </li>
+                {% endfor %}
+            </ul>
+        </div>
+    {% endif %}
+    {% if disco_own_entities %}
+        <div class="files__own">
+            {{ block.separator(_("your devices")) }}
+            <ul class="grid grid--center">
+                {% for entity,ident in disco_own_entities.iteritems() %}
+                    <li class='grid__item grid__item--medium grid__item--selectable'>
+                        <a href="{{entities_url[entity]}}">
+                            {{images.get_icon_client(ident)}}
+                            <span>{{ ident.values()[0].values()[0][0] }}</span>
+                        </a>
+                    </li>
+                {% endfor %}
+            </ul>
+        </div>
+    {% endif %}
+    {% if disco_roster_entities %}
+        <div class="files__roster">
+            {{ block.separator(_("your contacts devices")) }}
+            <ul class="grid grid--center">
+                {% for entity,ident in disco_roster_entities.iteritems() %}
+                    <li class='grid__item grid__item--medium grid__item--selectable'>
+                        <a href="{{entities_url[entity]}}">
+                            {{images.get_icon_client(ident)}}
+                            <span>{{entity.userhost()}}</span>
+                        </a>
+                    </li>
+                {% endfor %}
+            </ul>
+        </div>
+    {% endif %}
+</div>
+
+<p class="instructions--alt">{% trans %}Or enter a full jid of a device{% endtrans %}</p>
+{% call form.form(class="form_single") %}
+    {{ field.text("jid", _("device full jid"), required=true)}}
+    {{ field.submit(_("Access")) }}
+{% endcall %}
+{% endblock body %}