{% 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 post" %} {% endif %} {% endblock actions %} {% block panel %}
{# D8's filter chips exactly: 28px tall, 6px radius (not a pill/button), dark ink when active rather than the club accent colour, plain hairline border otherwise. Plus Published for symmetry with the statuses this app actually has. #}
{% trans "All" %} {{ counts.all }} {% trans "Drafts" %} {{ counts.draft }} {% trans "Scheduled" %} {{ counts.scheduled }} {% trans "Published" %} {{ counts.published }}
{% for item in news_items %} {# D8's exact row anatomy: status pill + mono meta on their own line, a real 20px condensed headline below, then a muted author/audience line -- three lines, not a squeezed one-liner. It's a list because rows are plain hairline-divided strips, not because the type is tiny. #}
{% if item.status == "draft" %} {% trans "Draft" %} {% elif item.status == "pending_review" %} {% trans "Pending review" %} {% elif item.is_scheduled %} {% trans "Scheduled" %} {% else %} {% trans "Published" %} {% endif %} {% if item.status == "published" %}{{ item.published_at|date:"j M Y" }} {% else %}{% blocktrans with time=item.modified|timesince %}Edited {{ time }} ago{% endblocktrans %}{% endif %}
{{ item.title }}
{% if item.created_by %}{{ item.created_by }} · {% endif %} {% for team in item.teams.all %}{{ team.short_name }}{% if not forloop.last %}, {% endif %}{% empty %}{% trans "Club-wide" %}{% endfor %}
{% empty %}
{% trans "No news items yet." %}
{% endfor %}
{% include "management/_pagination.html" %}
{% if news_item %} {% include "management/_news_preview.html" %} {% else %}
{% trans "Select a post on the left to preview it here." %}
{% endif %}
{% endblock panel %}