{% extends "management/base.html" %} {% load i18n lucide ui %} {% block heading %}{% trans "News" %}{% endblock heading %} {% block actions %} {% if can_add_news %} {% lucide "plus" size=16 %} {% trans "New news item" %} {% endif %} {% endblock actions %} {% block panel %}

{% trans "Title" %} | {% trans "Teams" %} | {% trans "Visibility" %} | {% trans "Status" %} |
--- | --- | --- | --- | ---
{% for news_item in news_items %}

{{ news_item.title }}

{% for team in news_item.teams.all %} {{ team.short_name }} {% empty %} {% trans "Club-wide" %} {% endfor %}

{{ news_item.get_visibility_display }}

{% if news_item.status == "draft" %} {% trans "Draft" %} {% elif news_item.is_scheduled %} {% blocktrans with date=news_item.published_at %}Scheduled for {{ date }}{% endblocktrans %} {% else %} {% trans "Published" %} {% endif %}

{% if news_item.can_edit %}
{% lucide "pencil" size=14 %} {% trans "Edit" %}
{% endif %}

{% empty %}
{% trans "No news items yet." %}
{% endfor %}

{% trans "Delete news item" as delete_news_title %} {% trans "Delete" as delete_label %} {% for news_item in news_items %} {% if news_item.can_edit %} {% url 'management:news_delete' news_item.pk as news_delete_url %} {% blocktrans with title=news_item.title asvar delete_news_body %}Delete “{{ title }}”? Its photos go with it. This cannot be undone.{% endblocktrans %} {% include "controlpanel/_confirm_modal.html" with modal_id=news_item.pk|dom_id:"news_delete_modal" title=delete_news_title body=delete_news_body action_url=news_delete_url submit_label=delete_label %} {% endif %} {% endfor %} {% endblock panel %}