annotate sat_templates/templates/default/file/discover.html @ 164:e9f0a4215e46

multi-sites handling (moved templates to "templates" sub-directory) + noscript styles handling.
author Goffi <goffi@goffi.org>
date Mon, 10 Sep 2018 08:53:33 +0200
parents sat_templates/default/file/discover.html@954759f0e8fa
children f7d6ae06c42f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
129
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {% extends 'base/base.html' %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 {% import 'components/block.html' as block %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 {% import 'components/images.html' as images with context %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 {% import 'input/form.html' as form with context %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 {% import 'input/field.html' as field with context %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
6
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 {% block body %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 {{ icon_defs('server', 'desktop', 'mobile', 'globe', 'terminal') }}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 <p class="instructions--head">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 {% trans %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 Please select the device you want to access
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 {% endtrans %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 </p>
131
c3f50951f2cc components: menu update
Goffi <goffi@goffi.org>
parents: 129
diff changeset
14 <div class="disco_files">
129
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 {% if disco_service_entities %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 <div class="files__services">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
17 {{ block.separator(_("services")) }}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 <ul class="grid grid--center">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% for entity,ident in disco_service_entities.iteritems() %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 <li class='grid__item grid__item--medium grid__item--selectable'>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 <a href="{{entities_url[entity]}}">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 {{ icon('server', cls='file__icon') }}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
23 <span>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
24 {% if disco_service_entities|count == 1 %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
25 {% trans %}your server{% endtrans %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 {% else %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
27 {{ ident.values()[0].values()[0][0] }}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
28 {% endif %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
29 </span>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
30 </a>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
31 </li>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 {% endfor %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
33 </ul>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 </div>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 {% endif %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 {% if disco_own_entities %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 <div class="files__own">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 {{ block.separator(_("your devices")) }}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
39 <ul class="grid grid--center">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 {% for entity,ident in disco_own_entities.iteritems() %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 <li class='grid__item grid__item--medium grid__item--selectable'>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
42 <a href="{{entities_url[entity]}}">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
43 {{images.get_icon_client(ident)}}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 <span>{{ ident.values()[0].values()[0][0] }}</span>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
45 </a>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 </li>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
47 {% endfor %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 </ul>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 </div>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
50 {% endif %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
51 {% if disco_roster_entities %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
52 <div class="files__roster">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
53 {{ block.separator(_("your contacts devices")) }}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
54 <ul class="grid grid--center">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
55 {% for entity,ident in disco_roster_entities.iteritems() %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
56 <li class='grid__item grid__item--medium grid__item--selectable'>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
57 <a href="{{entities_url[entity]}}">
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
58 {{images.get_icon_client(ident)}}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
59 <span>{{entity.userhost()}}</span>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
60 </a>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
61 </li>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
62 {% endfor %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
63 </ul>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
64 </div>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
65 {% endif %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
66 </div>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
67
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
68 <p class="instructions--alt">{% trans %}Or enter a full jid of a device{% endtrans %}</p>
155
954759f0e8fa css: styles improvments + following a bit more BEM conventions
Goffi <goffi@goffi.org>
parents: 147
diff changeset
69 {% call form.form(class="form--single") %}
129
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
70 {{ field.text("jid", _("device full jid"), required=true)}}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
71 {{ field.submit(_("Access")) }}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
72 {% endcall %}
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
73 {% endblock body %}