{% extends "base.html" %} {% block content %}

Content – {{ campaign.title }}

Upload content files and caption text per unit. Only creators moved to Content are editable here.

Back to Campaigns
Campaign Status: {{ campaign.status }}
Content Creators: {{ creators|length }}
Deliverables: {{ deliverables|length }}
Tip: Creators still in Scripting won’t block others — they can remain there until scripts are approved.
{# ========================= Pending creators reference (names only) ========================= #} {% set pending_names = [] %} {% if existing_links is defined and existing_links %} {% for cid, link in existing_links.items() %} {% set ph = (link.phase if link and link.phase else 'SCRIPTING') %} {% set ph_u = (ph|string)|upper %} {% if ph_u != 'CONTENT' %} {% if link.creator and link.creator.name %} {% set _ = pending_names.append(link.creator.name) %} {% endif %} {% endif %} {% endfor %} {% endif %} {% if pending_names %}
Creators pending script approval (reference):
{{ pending_names|unique|list|join(', ') }}
{% endif %} {% if not deliverables %}
No deliverables available for content. Configure deliverables first.
{% elif not creators %}
No creators are in Content phase yet. Approve scripts in Script Approval to unlock content.
{% else %}
{% for cr in creators %} {# Phase resolution (case-insensitive) #} {% set link = (existing_links.get(cr.id) if existing_links is defined and existing_links else None) %} {% set cr_phase_raw = (link.phase if link and link.phase else 'SCRIPTING') %} {% set cr_phase = (cr_phase_raw|string)|upper %} {% set is_content = (cr_phase == 'CONTENT') %} {% for d in deliverables %} {% for u in range(1, (d.quantity or 0) + 1) %} {% set key = (cr.id, d.id, u) %} {% set c = (existing_contents.get(key) if existing_contents is defined and existing_contents else None) %} {% set row_key = cr.id ~ "_" ~ d.id ~ "_" ~ u %} {% set st = (c.status if c and c.status else 'DRAFT') %} {% set st_u = (st|string)|upper %} {% endfor %} {% endfor %} {% endfor %}
Creator Deliverable Platform Unit # Caption / File Status Internal Comment
{{ cr.name }} @{{ cr.handle }}
Phase: {{ cr_phase }} Enabled
{{ cr.name }}
@{{ cr.handle }}
{{ d.deliverable_type.name }} {{ d.platform.name }} Unit {{ u }}
{% if c and c.content_file %} Download current file {% endif %}
Cancel
{% endif %} {% endblock %}