{% extends "core/base.jinja" %} {% from "com/macros.jinja" import news_moderation_alert %} {% block title %} {% trans %}News{% endtrans %} {% endblock %} {% block additional_css %} {# Atom feed discovery, not really css but also goes there #} {% endblock %} {% block additional_js %} {% endblock %} {% block content %}

{% trans %}Events today and the next few days{% endtrans %}

{% if user.is_authenticated and (user.is_com_admin or user.memberships.board().ongoing().exists()) %} {% trans %}Create news{% endtrans %} {% endif %} {% if user.is_com_admin %} {% trans %}Administrate news{% endtrans %}
{% endif %}
{% if not news_dates %}
{% trans %}Nothing to come...{% endtrans %}
{% else %} {% for day, dates_group in news_dates %}
{{ day|date('D') }}
{{ day|date('d') }}
{{ day|date('b') }}
{% for date in dates_group %}
{% if not date.news.is_moderated %} {# if a non moderated news is in the object list, the logged user is either an admin or the news author #} {{ news_moderation_alert(date.news, user, "newsState") }} {% endif %}
{% if date.news.club.logo %} {{ date.news.club }} {% else %} {{ date.news.club }} {% endif %}

{{ date.news.title }}

{{ date.news.club }}
-
{{ date.news.summary|markdown }}
{% endfor %}
{% endfor %}

{% trans trimmed %} It was too short. You already reached the end of the upcoming events list. {% endtrans %}

{% endif %}

{% trans %}All coming events{% endtrans %}

{% trans %}Birthdays{% endtrans %}

{%- if user.has_perm("core.view_user") -%}
    {%- for year, users in birthdays -%}
  • {% trans age=timezone.now().year - year %}{{ age }} year old{% endtrans %}
  • {%- endfor -%}
{%- elif not user.was_subscribed -%} {# The user cannot view birthdays, because he never subscribed #}

{% trans %}You need to subscribe to access this content{% endtrans %}

{%- else -%} {# There is another reason why user cannot view birthdays (maybe he is banned) but we cannot know exactly what is this reason #}

{% trans %}You cannot access this content{% endtrans %}

{%- endif -%}
{% endblock %}