comparison sat_templates/templates/default/event/admin.html @ 166:178f55b825b7

small refactoring/redesign, better BEM integration: - blog has been redesigned, and almost all blog CSS has been made generic and moved to main styles.css file. - better noscript handling, dynamic elements are created using "magic" classes (dom_update.js) - using better icons for older/newer messages - better state handling, classes now use "state_XXX" - more classes now use BEM convention - menu labels have been moved to a separate template (components/menu_labels.html), so it can be overriden easily by other sites - better styles.css organisation
author Goffi <goffi@goffi.org>
date Wed, 03 Oct 2018 21:00:24 +0200
parents e9f0a4215e46
children f7d6ae06c42f
comparison
equal deleted inserted replaced
165:9e8d9d754337 166:178f55b825b7
14 {% endif %} 14 {% endif %}
15 </div> 15 </div>
16 16
17 {% include 'event/counter.html' %} 17 {% include 'event/counter.html' %}
18 18
19 {% if invitees %} 19 <div class="tab__container">
20 <div class="box"> 20 <div class="tab__header">
21 <h3 class="title">{% trans %}invitees{% endtrans %}</h3> 21 <ul>
22 <table class="table--main"> 22 <li class="tab__btn state_clicked" onclick='tab_select(this, "tab_guests")'>{% trans %}Invitees{% endtrans %}</li>
23 <tr> 23 <li class="tab__btn" onclick='tab_select(this,"tab_invitations")'>{% trans %}Invite people{% endtrans %}</li>
24 <th>{% trans %}name{% endtrans %}</th> 24 <li class="tab__btn" onclick='tab_select(this,"tab_new_post")'>{% trans %}Write a blog post{% endtrans %}</li>
25 <th>{% trans %}coming?{% endtrans %}</th> 25 <li class="tab__btn" onclick='tab_select(this,"tab_blog")'>{% trans %}Read event blog{% endtrans %}</li>
26 <th>{% trans %}guests{% endtrans %}</th> 26 </ul>
27 {% for name, data in invitees.iteritems() %}
28 <tr>
29 <td>{{name}}</td>
30 <td>{{data.attend|default('')}}</td>
31 {% if data.attend == 'no' %}
32 <td>&nbsp;</td>
33 {% else %}
34 <td>{{data.guests|default(0)}}</td>
35 {% endif %}
36 </tr>
37 {% endfor %}
38 <tr>
39 <td colspan=2 class="table__total">{% trans %}total expected{% endtrans %}</td>
40 <td class="table__total_value">{{invitees_guests|default('0')}}</td>
41 </tr>
42 </table>
43 </div> 27 </div>
44 {% endif %}
45 28
46 <div class="box"> 29 <div class="tab__page state_clicked" id="tab_guests">
47 <h3 class="title">{% trans %}invite people{% endtrans %}</h3> 30 {% if invitees %}
48 {% call form.form(class="form--paper form__panel--vertical form__panel--center") %} 31 <table class="table--main">
49 {{ textbox.head(event_service, event_node, 'event') }} 32 <tr>
50 {{ field.meta('event_id', event_id) }} 33 <th>{% trans %}name{% endtrans %}</th>
51 {{ field.textarea("jids", 34 <th>{% trans %}coming?{% endtrans %}</th>
52 _("enter here a list of jid (one per line) to invite"), 35 <th>{% trans %}guests{% endtrans %}</th>
53 class="form__field--medium") }} 36 {% for name, data in invitees.iteritems() %}
54 {{ field.textarea("emails", 37 <tr>
55 _("enter here a list of emails addresses (one per line) to invite"), 38 <td>{{name}}</td>
56 class="form__field--medium") }} 39 <td>{{data.attend|default('')}}</td>
57 {{ field.submit(_("Invite people")) }} 40 {% if data.attend == 'no' %}
58 {% endcall %} 41 <td>&nbsp;</td>
42 {% else %}
43 <td>{{data.guests|default(0)}}</td>
44 {% endif %}
45 </tr>
46 {% endfor %}
47 <tr>
48 <td colspan=2 class="table__total">{% trans %}total expected{% endtrans %}</td>
49 <td class="table__total_value">{{invitees_guests|default('0')}}</td>
50 </tr>
51 </table>
52 {% else %}
53 <p class="message--info">{% trans %}No invitee has answered yet{% endtrans %}</p>
54 {% endif %}
55 </div>
56
57
58 <div class="tab__page" id="tab_invitations">
59 {% call form.form(class="form--paper form__panel--vertical form__panel--center") %}
60 {{ textbox.head(event_service, event_node, 'event') }}
61 {{ field.meta('event_id', event_id) }}
62 {{ field.textarea("jids",
63 _("enter here a list of jid (one per line) to invite"),
64 class="form__field--medium") }}
65 {{ field.textarea("emails",
66 _("enter here a list of emails addresses (one per line) to invite"),
67 class="form__field--medium") }}
68 {{ field.submit(_("Invite people")) }}
69 {% endcall %}
70 </div>
71
72 <div class="tab__page" id="tab_new_post">
73 {% call form.form(class="form--paper form__panel--vertical form__panel--center") %}
74 {{ textbox.head(service, node, 'blog') }}
75 {{ field.text("title",
76 _("title"),
77 class="form__field--big") }}
78 {{ field.textarea("body",
79 _("body"),
80 class="form__field--big") }}
81 {{ field.text("language",
82 _("language"),
83 class="form__field--tiny") }}
84 {{ field.checkbox("comments",
85 _("allow comments"),
86 checked=true) }}
87 {{ field.submit(_("send")) }}
88 {% endcall %}
89 </div>
90
91 <div class="tab__page" id="tab_blog">
92 {% if items is defined %}
93 {% include 'blog/articles.html' %}
94 {% endif %}
95 </div>
96
59 </div> 97 </div>
60 98
61 <div class="box">
62 <h3 class="title">{% trans %}write a blog post{% endtrans %}</h3>
63 {% call form.form(class="form--paper form__panel--vertical form__panel--center") %}
64 {{ textbox.head(service, node, 'blog') }}
65 {{ field.text("title",
66 _("title"),
67 class="form__field--big") }}
68 {{ field.textarea("body",
69 _("body"),
70 class="form__field--big") }}
71 {{ field.text("language",
72 _("language"),
73 class="form__field--tiny") }}
74 {{ field.checkbox("comments",
75 _("allow comments"),
76 checked=true) }}
77 {{ field.submit(_("send")) }}
78 {% endcall %}
79 </div>
80
81 {% if items is defined %}
82 {% include 'blog/articles.html' %}
83 {% endif %}
84
85 {% endblock body %} 99 {% endblock body %}