refactor(plugin): rebrand as MT3SMarketingProgram, release 0.17.0

Rename the plugin's vendor/namespace from experiential/Program to mt3s/MT3SMarketingProgram (composer: mt3s/mautic-marketing-program-bundle):

- ProgramBundle -> MT3SMarketingProgramBundle; extension, integration,
  config support, permissions, events and twig extension renamed likewise
- Initiative* -> Program*: controller (InitiativeController ->
  ProgramController), model, entities, repositories, form types and views
  (new _tabs/_task_table/_tab_table_filter partials, details page)
- Settings config form theme -> _config_mt3smarketingprogramconfig_widget;
  routes and translations re-prefixed (mt3s_marketing_program_*)
- Assets: icon.svg -> mt3s-mp-icon.svg; program.js -> mt3s-mp-program.js
  (OnLoad hooks renamed mt3sMpProgram*)
- Add Command/RefreshStatsCommand; Migrations/Version_0_17_0.php renames
  the tables to mt3s_mp_program_*
This commit is contained in:
Alexandre Gain committed 2026-11-15 17:48:01 +01:00
1 parent 687d33d30c
commit ea88b7a772
131 files changed
+3238 -2836

No files matched your search

@@ -0,0 +1,93 @@
{#
# The program's tasks, for the Tasks tab of the program detail page and form. Same harmonized columns as the
# other tabs: Pictogram (no label), Type, Name, Description, Start date, End date, Status (last). No ID
# column. Rows are in tree order: each task is followed by its sub-tasks, indented under it.
#
# Parameters:
# program: the Program
# taskTree: rows from TaskModel::getTaskTree(): {task, depth}, in display order
# readOnly: true on the program form: no links, no filter, so that following one can't drop unsaved changes
# taskPermissions: mt3smarketingprogram:tasks:* permissions (create, editown, editother), when not read-only
#
# Links carry returnTo=program, so that Save and Cancel on the task form come back to this program page
# (see TaskController). Opened from Programs > Tasks, the task form goes back to the task list.
#}
{% set readOnly = readOnly|default(false) %}
{% set taskPermissions = taskPermissions|default({}) %}
{% set canCreate = not readOnly and program.id and taskPermissions['mt3smarketingprogram:tasks:create']|default(false) %}
{% if canCreate %}
<div class="mb-md">
<a class="btn btn-ghost program-task-add" href="{{ path('mt3s_marketing_program_task_action', {'objectAction': 'new', 'program': program.id, 'returnTo': 'program'}) }}" data-toggle="ajax">
<i class="ri-add-line"></i> {{ 'mt3s.marketing_program.task.add'|trans }}
</a>
</div>
{% endif %}
{% if not program.id %}
<p class="text-muted">{{ 'mt3s.marketing_program.task.save_program_first'|trans }}</p>
{% elseif taskTree is empty %}
<p class="text-muted">{{ 'mt3s.marketing_program.task.empty'|trans }}</p>
{% else %}
{% if not readOnly %}
{# Filter + click-to-sort on the detail page (mt3s-mp-program.js). The form's read-only copy stays plain. #}
{{ include('@MT3SMarketingProgram/Program/_tab_table_filter.html.twig') }}
{% endif %}
<div class="table-responsive">
<table class="table table-hover program-tab-table program-task-table{% if not readOnly %}" data-program-tab-table data-empty-text="{{ 'mt3s.marketing_program.filter.no_match'|trans }}" data-sort-hint="{{ 'mt3s.marketing_program.filter.sort_hint'|trans }}{% endif %}">
<thead>
<tr>
<th class="program-col-pictogram" aria-label="{{ 'mt3s.marketing_program.task.field.pictogram'|trans }}"></th>
<th class="program-col-type">{{ 'mt3s.marketing_program.task.field.type'|trans }}</th>
<th class="program-col-name">{{ 'mt3s.marketing_program.task.field.name'|trans }}</th>
<th class="program-col-description">{{ 'mt3s.marketing_program.task.field.description'|trans }}</th>
<th class="program-col-date">{{ 'mt3s.marketing_program.task.field.start_date'|trans }}</th>
<th class="program-col-date">{{ 'mt3s.marketing_program.task.field.end_date'|trans }}</th>
<th class="program-col-status">{{ 'mt3s.marketing_program.task.field.status'|trans }}</th>
</tr>
</thead>
<tbody>
{% for row in taskTree %}
{% set task = row.task %}
{% set canEdit = not readOnly and securityHasEntityAccess(taskPermissions['mt3smarketingprogram:tasks:editown']|default(false), taskPermissions['mt3smarketingprogram:tasks:editother']|default(false), task.createdBy) %}
<tr class="program-task" data-task-id="{{ task.id }}">
<td class="program-col-pictogram text-center">
{% set taskTypeIcon = mt3s_marketing_program_item_type_icon('task', task.type) %}
{% if taskTypeIcon %}<i class="{{ taskTypeIcon }} program-item-type-icon" style="font-size: 24px;" aria-hidden="true"></i>{% endif %}
</td>
<td class="program-col-type"{% if mt3s_marketing_program_item_type_description('task', task.type) %} title="{{ mt3s_marketing_program_item_type_description('task', task.type) }}" data-toggle="tooltip"{% endif %}>
{{ mt3s_marketing_program_item_type_name('task', task.type) ?? 'mt3s.marketing_program.description_item.type.unknown'|trans({'%key%': task.type}) }}
</td>
<td class="program-col-name">
{% if canEdit %}
<a href="{{ path('mt3s_marketing_program_task_action', {'objectAction': 'edit', 'objectId': task.id, 'returnTo': 'program'}) }}" data-toggle="ajax">{{ task.name }}</a>
{% else %}
{{ task.name }}
{% endif %}
{% if task.taskKind == constant('MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\TaskKind::Milestone') %}
<span class="label label-success" title="{{ 'mt3s.marketing_program.task.kind.milestone'|trans }}">{{ 'mt3s.marketing_program.task.kind.milestone_short'|trans }}</span>
{% elseif task.taskKind == constant('MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\TaskKind::Phase') %}
<span class="label label-primary" title="{{ 'mt3s.marketing_program.task.kind.phase'|trans }}">{{ 'mt3s.marketing_program.task.kind.phase_short'|trans }}</span>
{% endif %}
</td>
<td class="program-col-description text-muted">
{# Same 10-line clamp and read-more as the Description tab; URLs become links. #}
{{ include('@MT3SMarketingProgram/Program/_description_read_more.html.twig', {
'text': task.description|default('')|striptags,
'id': 'program-task-desc-' ~ task.id,
}) }}
</td>
<td class="program-col-date">{{ task.startDate ? task.startDate|date('Y-m-d') : '' }}</td>
<td class="program-col-date">{{ task.endDate ? task.endDate|date('Y-m-d') : '' }}</td>
<td class="program-col-status">
{# A phase has no status of its own — skip the column value. #}
{% if task.taskKind != constant('MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\TaskKind::Phase') %}
<span class="label {{ task.status.labelClass }}">{{ task.status.labelKey|trans }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}