{% extends "management/base.html" %} {% load i18n lucide ui %} {% block heading %}{{ news_item.title }}{% endblock heading %} {% block topbar_context %} {% if news_item.status == "draft" %} {% trans "Draft" %} {% elif news_item.is_scheduled %} {% blocktrans with date=news_item.published_at %}Scheduled for {{ date }}{% endblocktrans %} {% else %} {% blocktrans with date=news_item.published_at %}Published {{ date }}{% endblocktrans %} {% endif %} {{ news_item.get_visibility_display }} {% endblock topbar_context %} {% block actions %} {% if can_edit %} {% lucide "pencil" size=16 %} {% trans "Edit" %}
{% endif %} {% if can_publish %} {% if news_item.status == "draft" %}
{% else %}
{% endif %} {% endif %} {% endblock actions %} {% block panel %}
{% if news_item.teams.all %}
{% for team in news_item.teams.all %} {{ team.short_name }} {% endfor %}
{% else %}
{% trans "Club-wide" %}
{% endif %}

{{ news_item.body }}

{% if news_item.created_by %}
{{ news_item.created_by.first_name|slice:":1" }}{{ news_item.created_by.last_name|slice:":1" }} {% blocktrans with name=news_item.created_by %}Posted by {{ name }}{% endblocktrans %}
{% endif %}
{% if news_item.title_en or news_item.body_en %}

## {% lucide "languages" size=18 %} {% trans "English" %}

{% if news_item.title_en %}

{{ news_item.title_en }}

{% endif %} {% if news_item.body_en %}

{{ news_item.body_en }}

{% endif %}
{% endif %}

## {% lucide "image" size=18 %} {% trans "Photos" %}

{% if can_edit %}
{% endif %}
{% for photo in news_item.photos.all %}
{% if photo.is_main %} {% trans "Main" %} {% endif %} {% if can_edit %}
{% if not photo.is_main %} {% csrf_token %}
{% endif %}
{% url 'management:news_photo_delete' news_item.pk photo.pk as delete_photo_url %} {% trans "Delete photo" as delete_photo_title %} {% trans "This photo will be permanently removed." as delete_photo_body %} {% trans "Delete" as delete_label %} {% include "controlpanel/_confirm_modal.html" with modal_id=photo.pk|dom_id:"delete_photo_modal" title=delete_photo_title body=delete_photo_body action_url=delete_photo_url submit_label=delete_label submit_icon="trash-2" %} {% endif %}
{% empty %}

{% trans "No photos yet." %}

{% endfor %}
{% if can_edit %} {% trans "Add photos" as add_photos_label %} {% url 'management:news_photo_upload' news_item.pk as add_photos_url %} {% include "controlpanel/_modal_form.html" with modal_id="add_photos_modal" title=add_photos_label form=photo_upload_form action_url=add_photos_url submit_label=add_photos_label submit_icon="image-plus" %} {% trans "Delete news item" as delete_news_title %} {% blocktrans asvar delete_news_body %}Delete “{{ news_item }}”? Its photos go with it. This cannot be undone.{% endblocktrans %} {% trans "Delete" as delete_label %} {% url 'management:news_delete' news_item.pk as delete_news_url %} {% include "controlpanel/_confirm_modal.html" with modal_id="delete_news_modal" title=delete_news_title body=delete_news_body action_url=delete_news_url submit_label=delete_label %} {% endif %} {% if can_publish %} {% if news_item.status == "draft" %} {% trans "Publish" as publish_label %} {% url 'management:news_publish' news_item.pk as publish_url %} {% trans "Leave as now to publish immediately, or pick a future date/time to schedule it." as publish_blurb %} {% include "controlpanel/_modal_form.html" with modal_id="publish_modal" title=publish_label form=publish_form action_url=publish_url submit_label=publish_label submit_icon="upload" blurb=publish_blurb %} {% else %} {% trans "Unpublish" as unpublish_label %} {% blocktrans asvar unpublish_body %}This pulls “{{ news_item }}” back to a draft. It won't be visible anywhere until it's published again.{% endblocktrans %} {% url 'management:news_unpublish' news_item.pk as unpublish_url %} {% include "controlpanel/_confirm_modal.html" with modal_id="unpublish_modal" title=unpublish_label body=unpublish_body action_url=unpublish_url submit_label=unpublish_label submit_icon="eye-off" %} {% endif %} {% endif %} {% endblock panel %}