| 1 | {% extends 'base/base.html' %} |
| 2 | {% import 'input/form.html' as form with context %} |
| 3 | {% import 'input/field.html' as field with context %} |
| 4 | {% import 'input/textbox.html' as textbox with context %} |
| 5 | |
| 6 | {% block body %} |
| 7 | <div class='invitation_header box'> |
| 8 | <h1>{% trans name=event.name %}{{name}} administration{% endtrans %}</h1> |
| 9 | {% if event.image is defined %} |
| 10 | <p><img class='event__picture' src="{{event.image}}"></p> |
| 11 | {% endif %} |
| 12 | {% if event.description is defined %} |
| 13 | <p>{{event.description}}</p> |
| 14 | {% endif %} |
| 15 | </div> |
| 16 | |
| 17 | {% include 'event/counter.html' %} |
| 18 | |
| 19 | <div class="tab__container"> |
| 20 | <div class="tab__header"> |
| 21 | <ul> |
| 22 | <li class="tab__btn state_clicked" onclick='tab_select(this, "tab_guests")'>{% trans %}Invitees{% endtrans %}</li> |
| 23 | <li class="tab__btn" onclick='tab_select(this,"tab_invitations")'>{% trans %}Invite people{% endtrans %}</li> |
| 24 | <li class="tab__btn" onclick='tab_select(this,"tab_new_post")'>{% trans %}Write a blog post{% endtrans %}</li> |
| 25 | <li class="tab__btn" onclick='tab_select(this,"tab_blog")'>{% trans %}Read event blog{% endtrans %}</li> |
| 26 | </ul> |
| 27 | </div> |
| 28 | |
| 29 | <div class="tab__page state_clicked" id="tab_guests"> |
| 30 | {% if invitees %} |
| 31 | <table class="table--main"> |
| 32 | <tr> |
| 33 | <th>{% trans %}name{% endtrans %}</th> |
| 34 | <th>{% trans %}coming?{% endtrans %}</th> |
| 35 | <th>{% trans %}guests{% endtrans %}</th> |
| 36 | </tr> |
| 37 | {% for name, data in invitees.items() %} |
| 38 | <tr> |
| 39 | <td>{{name}}</td> |
| 40 | <td>{{data.attend|default('')}}</td> |
| 41 | {% if data.attend == 'no' %} |
| 42 | <td> </td> |
| 43 | {% else %} |
| 44 | <td>{{data.guests|default(0)}}</td> |
| 45 | {% endif %} |
| 46 | </tr> |
| 47 | {% endfor %} |
| 48 | <tr> |
| 49 | <td colspan=2 class="table__total">{% trans %}total expected{% endtrans %}</td> |
| 50 | <td class="table__total_value">{{invitees_guests|default('0')}}</td> |
| 51 | </tr> |
| 52 | </table> |
| 53 | {% else %} |
| 54 | <p class="message--info">{% trans %}No invitee has answered yet{% endtrans %}</p> |
| 55 | {% endif %} |
| 56 | </div> |
| 57 | |
| 58 | |
| 59 | <div class="tab__page" id="tab_invitations"> |
| 60 | {% call form.form(class="form--paper form__panel--vertical form__panel--center") %} |
| 61 | {{ textbox.head(event_service, event_node, 'event') }} |
| 62 | {{ field.meta('event_id', event_id) }} |
| 63 | {{ field.textarea("jids", |
| 64 | _("enter here a list of jid (one per line) to invite"), |
| 65 | class="form__field--medium") }} |
| 66 | {{ field.textarea("emails", |
| 67 | _("enter here a list of emails addresses (one per line) to invite"), |
| 68 | class="form__field--medium") }} |
| 69 | {{ field.submit(_("Invite people")) }} |
| 70 | {% endcall %} |
| 71 | </div> |
| 72 | |
| 73 | <div class="tab__page" id="tab_new_post"> |
| 74 | {% call form.form(class="form--paper form__panel--vertical form__panel--center") %} |
| 75 | {{ textbox.head(service, node, 'blog') }} |
| 76 | {{ field.text("title", |
| 77 | _("title"), |
| 78 | class="form__field--big") }} |
| 79 | {{ field.textarea("body", |
| 80 | _("body"), |
| 81 | class="form__field--big") }} |
| 82 | {{ field.text("language", |
| 83 | _("language"), |
| 84 | class="form__field--tiny") }} |
| 85 | {{ field.checkbox("comments", |
| 86 | _("allow comments"), |
| 87 | checked=true) }} |
| 88 | {{ field.submit(_("send")) }} |
| 89 | {% endcall %} |
| 90 | </div> |
| 91 | |
| 92 | <div class="tab__page" id="tab_blog"> |
| 93 | {% if blog_items is defined %} |
| 94 | {% include 'blog/articles.html' %} |
| 95 | {% endif %} |
| 96 | </div> |
| 97 | |
| 98 | </div> |
| 99 | |
| 100 | {% endblock body %} |