| 1 | {# overview of current events |
| 2 | |
| 3 | @variable item(xmlui_item): item to display |
| 4 | @variable comments(data_object.BlogItems): comments of the item |
| 5 | @variable comments_service(unicode): service for adding comments |
| 6 | @variable comments_node(unicode): node for adding comments |
| 7 | #} |
| 8 | |
| 9 | {% if not embedded %}{% extends 'base/base.html' %}{% endif %} |
| 10 | {% import 'components/block.html' as block with context %} |
| 11 | |
| 12 | {% block body %} |
| 13 | {{ icon_defs('calendar') }} |
| 14 | |
| 15 | <section class="section"> |
| 16 | <div class="message is-warning"> |
| 17 | <div class="message-body"> |
| 18 | {% trans %}There is not events discovery yet, this will come in the future.{% endtrans %} |
| 19 | </div> |
| 20 | </div> |
| 21 | |
| 22 | <div class="content has-items-centered is-flex"> |
| 23 | {{ component.action_button(url_event_new) }} |
| 24 | </div> |
| 25 | |
| 26 | {% if events is defined %} |
| 27 | <div class="message"> |
| 28 | <div class="message-body"> |
| 29 | {% trans nb_events=events|length%} |
| 30 | You have currently {{nb_events}} event in your personal list |
| 31 | {% pluralize %} |
| 32 | You have currently {{nb_events}} events in your personal list |
| 33 | {% endtrans %} |
| 34 | </div> |
| 35 | </div> |
| 36 | |
| 37 | {% call(part, interest) block.interests_grid(events|reverse, 'calendar') %} |
| 38 | {% if part == "header-title" %} |
| 39 | <a href="{{interest.url}}"> |
| 40 | <span class="tag is-medium is-rounded {{ 'is-light' if interest.start is in_the_past else 'is-info' }}"> |
| 41 | {{interest.start|date_fmt("full", date_only=true)}} |
| 42 | </span> |
| 43 | </a> |
| 44 | {% elif part == "content" %} |
| 45 | <a href="{{interest.url}}"> |
| 46 | <div><em>{{ interest.name[""]|default(_("unnamed")) }}</em></div> |
| 47 | </a> |
| 48 | <a href="{{interest.url}}"> |
| 49 | <div class="has-text-weight-semibold {{ 'has-text-grey' if interest.start is in_the_past else 'has-text-black' }}"> |
| 50 | {{interest.start|date_fmt("relative")}} |
| 51 | </div> |
| 52 | </a> |
| 53 | {% endif %} |
| 54 | |
| 55 | {% endcall %} |
| 56 | |
| 57 | {% endif %} |
| 58 | </section> |
| 59 | {% endblock body %} |