annotate default/file/discover.html @ 129:ca42dc037bbf

file (discover): new discovery page: the discovery page will show service, own devices and roster contact devices offering file sharing. An extra field allow to enter free jid. Added a small message in photo/discover.html has photo album discovery is not yes implemented. New block and images macros.
author Goffi <goffi@goffi.org>
date Sat, 24 Mar 2018 11:16:14 +0100
parents
children c3f50951f2cc
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>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 <div class="files">
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>
ca42dc037bbf file (discover): new discovery page:
Goffi <goffi@goffi.org>
parents:
diff changeset
69 {% call form.form(class="form_single") %}
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 %}