{% extends "base.html" %} {% load static %} {% block title %}轮播图管理{% endblock %} {% block content %}
{% if carousels %}
{% for carousel in carousels %} {% endfor %}
排序 预览 标题 描述 链接 状态 操作
{{ carousel.order }} {% if carousel.file %} {% elif carousel.image %} {{ carousel.title }} {% else %} 无媒体 {% endif %} {{ carousel.title }} {{ carousel.description|default:"无描述"|truncatewords:10 }} {% if carousel.post %} {{ carousel.post.title }}
{{ carousel.post.author.username }}
{% else %} 默认跳转社区 {% endif %}
{% if carousel.is_active %} 启用 {% else %} 禁用 {% endif %}
编辑
{% csrf_token %}
{% else %}
🎠

暂无轮播图

点击"添加轮播图"按钮创建第一个轮播图

➕ 添加轮播图
{% endif %}
{% endblock %}