refactor(plugin): rename Plan to Program and add audience/UTM routes

Rename the Plan bundle to Program across config, routes, menus, and
controllers (Plan -> Initiative), bump version to 0.16.0, and introduce
new audience and UTM taxonomy routes and permissions to support the
expanded Programs feature set.
This commit is contained in:
Alexandre Gain committed 2026-11-13 22:01:32 +01:00
1 parent 8268fad886
commit 71ff11390b
121 files changed
+5011 -2874

No files matched your search

+34 -34
View File
@@ -1,23 +1,23 @@
{% extends '@MauticCore/Default/content.html.twig' %}
{% block mauticContent %}planTask{% endblock %}
{% block mauticContent %}programTask{% endblock %}
{% block headerTitle %}
{% if entity.id %}
{{ 'mautic.plan.task.header.edit'|trans({'%name%': entity.name}) }}
{{ 'mautic.program.task.header.edit'|trans({'%name%': entity.name}) }}
{% else %}
{{ 'mautic.plan.task.header.new'|trans }}
{{ 'mautic.program.task.header.new'|trans }}
{% endif %}
{% endblock %}
{# The dependencies and the RACI rows: the same editable, sortable rows as the plan form's
collections. Adding, removing and reordering is handled by Assets/js/plan.js through the
plan-collection-* classes. #}
{# The dependencies and the RACI rows: the same editable, sortable rows as the initiative form's
collections. Adding, removing and reordering is handled by Assets/js/program.js through the
initiative-collection-* classes. #}
{% macro dependency_row(dependency) %}
<li class="plan-collection-row list-group-item">
<li class="initiative-collection-row list-group-item">
<div class="row">
<div class="col-xs-1 text-center">
<span class="plan-collection-handle text-muted" title="{{ 'mautic.plan.task.dependency.drag'|trans }}" style="cursor: move;">
<span class="initiative-collection-handle text-muted" title="{{ 'mautic.program.task.dependency.drag'|trans }}" style="cursor: move;">
<i class="ri-draggable ri-lg"></i>
</span>
</div>
@@ -29,7 +29,7 @@
{{ form_widget(dependency.position) }}
</div>
<div class="col-xs-1 text-right">
<button type="button" class="btn btn-ghost btn-sm plan-collection-remove" title="{{ 'mautic.plan.task.dependency.remove'|trans }}">
<button type="button" class="btn btn-ghost btn-sm initiative-collection-remove" title="{{ 'mautic.program.task.dependency.remove'|trans }}">
<i class="ri-delete-bin-line"></i>
</button>
</div>
@@ -38,10 +38,10 @@
{% endmacro %}
{% macro raci_row(raci) %}
<li class="plan-collection-row list-group-item">
<li class="initiative-collection-row list-group-item">
<div class="row">
<div class="col-xs-1 text-center">
<span class="plan-collection-handle text-muted" title="{{ 'mautic.plan.task.raci.drag'|trans }}" style="cursor: move;">
<span class="initiative-collection-handle text-muted" title="{{ 'mautic.program.task.raci.drag'|trans }}" style="cursor: move;">
<i class="ri-draggable ri-lg"></i>
</span>
</div>
@@ -53,7 +53,7 @@
{{ form_widget(raci.position) }}
</div>
<div class="col-xs-1 text-right">
<button type="button" class="btn btn-ghost btn-sm plan-collection-remove" title="{{ 'mautic.plan.task.raci.remove'|trans }}">
<button type="button" class="btn btn-ghost btn-sm initiative-collection-remove" title="{{ 'mautic.program.task.raci.remove'|trans }}">
<i class="ri-delete-bin-line"></i>
</button>
</div>
@@ -68,14 +68,14 @@
<div class="pa-md">
{{ form_row(form.name) }}
<div class="row">
{# The selected type's pictogram; updated by plan.js when the type changes. #}
{# The selected type's pictogram; updated by program.js when the type changes. #}
<div class="col-xs-1 text-center pt-lg">
<i class="plan-item-type-icon {{ plan_item_type_icon('task', form.type.vars.value) }}" style="font-size: 28px;" aria-hidden="true"></i>
<i class="initiative-item-type-icon {{ program_item_type_icon('task', form.type.vars.value) }}" style="font-size: 28px;" aria-hidden="true"></i>
</div>
<div class="col-xs-11">
{{ form_row(form.type) }}
{# Filled with the selected type's description by plan.js. #}
<p class="help-block plan-item-type-help">{{ plan_item_type_description('task', form.type.vars.value) }}</p>
{# Filled with the selected type's description by program.js. #}
<p class="help-block initiative-item-type-help">{{ program_item_type_description('task', form.type.vars.value) }}</p>
</div>
</div>
{{ form_row(form.description) }}
@@ -84,7 +84,7 @@
</div>
<div class="col-md-3 height-auto">
<div class="pr-lg pl-lg pt-md pb-md">
{{ form_row(form.plan) }}
{{ form_row(form.initiative) }}
{{ form_row(form.taskKind) }}
{{ form_row(form.startDate) }}
{{ form_row(form.endDate) }}
@@ -92,7 +92,7 @@
{{ form_row(form.status) }}
{% else %}
{# A phase has no status of its own: its state comes from its tasks. #}
<p class="text-muted small">{{ 'mautic.plan.task.kind.phase_status_note'|trans }}</p>
<p class="text-muted small">{{ 'mautic.program.task.kind.phase_status_note'|trans }}</p>
{% endif %}
{{ form_row(form.plannedWork) }}
</div>
@@ -100,42 +100,42 @@
</div>
<div class="pa-md">
<div class="col-md-12">
{# Dependencies: several edges, each another task of the plan with the relation type. #}
<div class="plan-collection plan-task-dependencies"
{# Dependencies: several edges, each another task of the initiative with the relation type. #}
<div class="initiative-collection initiative-task-dependencies"
data-prototype="{{ _self.dependency_row(form.dependencies.vars.prototype)|e('html_attr') }}"
data-prototype-name="__dependency__">
<h4 class="mt-lg mb-sm">{{ 'mautic.plan.task.field.dependencies'|trans }}</h4>
<h4 class="mt-lg mb-sm">{{ 'mautic.program.task.field.dependencies'|trans }}</h4>
{{ form_errors(form.dependencies) }}
<p class="text-muted plan-collection-empty{% if form.dependencies|length > 0 %} hide{% endif %}">
{{ 'mautic.plan.task.dependency.empty'|trans }}
<p class="text-muted initiative-collection-empty{% if form.dependencies|length > 0 %} hide{% endif %}">
{{ 'mautic.program.task.dependency.empty'|trans }}
</p>
<ul class="list-group plan-collection-list">
<ul class="list-group initiative-collection-list">
{% for dependency in form.dependencies %}
{{ _self.dependency_row(dependency) }}
{% endfor %}
</ul>
<button type="button" class="btn btn-ghost plan-collection-add">
<i class="ri-add-line"></i> {{ 'mautic.plan.task.dependency.add'|trans }}
<button type="button" class="btn btn-ghost initiative-collection-add">
<i class="ri-add-line"></i> {{ 'mautic.program.task.dependency.add'|trans }}
</button>
</div>
{% do form.dependencies.setRendered %}
{# RACI: one row per role, several stakeholders per role, picked from the plan's. #}
<div class="plan-collection plan-task-raci"
{# RACI: one row per role, several stakeholders per role, picked from the initiative's. #}
<div class="initiative-collection initiative-task-raci"
data-prototype="{{ _self.raci_row(form.raci.vars.prototype)|e('html_attr') }}"
data-prototype-name="__raci__">
<h4 class="mt-lg mb-sm">{{ 'mautic.plan.task.field.raci'|trans }}</h4>
<h4 class="mt-lg mb-sm">{{ 'mautic.program.task.field.raci'|trans }}</h4>
{{ form_errors(form.raci) }}
<p class="text-muted plan-collection-empty{% if form.raci|length > 0 %} hide{% endif %}">
{{ 'mautic.plan.task.raci.empty'|trans }}
<p class="text-muted initiative-collection-empty{% if form.raci|length > 0 %} hide{% endif %}">
{{ 'mautic.program.task.raci.empty'|trans }}
</p>
<ul class="list-group plan-collection-list">
<ul class="list-group initiative-collection-list">
{% for raci in form.raci %}
{{ _self.raci_row(raci) }}
{% endfor %}
</ul>
<button type="button" class="btn btn-ghost plan-collection-add">
<i class="ri-add-line"></i> {{ 'mautic.plan.task.raci.add'|trans }}
<button type="button" class="btn btn-ghost initiative-collection-add">
<i class="ri-add-line"></i> {{ 'mautic.program.task.raci.add'|trans }}
</button>
</div>
{% do form.raci.setRendered %}