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

Scripting – {{ campaign.title }}

Add or update scripts for each creator & deliverable. Approved creators can move to Content while others remain in Scripting.

Back to Campaigns
Campaign Status: {{ campaign.status }}
Creators: {{ creators|length }}
Deliverables: {{ deliverables|length }}
Tip: You can keep reviewing “Changes Requested” creators even if some creators are already in Content.
{% if not creators or not deliverables %}
No creators or deliverables available for scripting. Please shortlist creators and configure deliverables first.
{% else %}
{% for cr in creators %} {% set link = existing_links.get(cr.id) if existing_links is defined else None %} {% set cr_phase = (link.phase if link and link.phase else 'SCRIPTING') %} {% set is_content = (cr_phase == 'CONTENT') %} {# Creator header row (shows creator phase) #} {% for d in deliverables %} {% for u in range(1, (d.quantity or 0) + 1) %} {% set key = (cr.id, d.id, u) %} {% set s = existing_scripts.get(key) %} {% set row_key = cr.id ~ "_" ~ d.id ~ "_" ~ u %} {% set st = s.status if s else 'DRAFT' %} {% endfor %} {% endfor %} {% endfor %}
Creator Deliverable Platform Unit # Script (Text / File) Status Internal Comment
{{ cr.name }} @{{ cr.handle }}
Phase: {{ cr_phase }} {% if is_content %} Moved to Content {% endif %}
{{ cr.name }}
@{{ cr.handle }}
{{ d.deliverable_type.name }} {{ d.platform.name }} Unit {{ u }} {% if is_content %}
This creator is already in Content. Scripts are visible for reference.
Script Text
{{ s.script_text if s and s.script_text else "—" }}
Script File
{% if s and s.script_file %} Download current file {% else %} — {% endif %}
{% else %}
{% if s and s.script_file %} Download current file {% endif %}
{% endif %}
{% if is_content %} {{ st }} {% else %} {% endif %} {% if is_content %}
{{ s.internal_comment if s and s.internal_comment else "—" }}
{% else %} {% endif %}
Cancel
{% endif %} {% endblock %}