feat: Add TargetType form and migration for plan targets
- Implemented TargetType form for managing target details including name, type, priority, stages, estimated size, profile criteria, pain points, value proposition, and preferred channels. - Created migration scripts for adding type and priority columns to plan objectives and tasks. - Added migration for creating plan targets and plan target stages tables, including foreign key constraints. - Introduced stakeholder management with forms and views for creating, editing, and listing stakeholders. - Enhanced UI with read more functionality for long text descriptions and filtering options in plan tab tables.
This commit is contained in:
1 parent
8c8d7a6f95
commit
8696acd01c
52 files changed
+3178
-125
No files matched your search
@@ -1,12 +1,12 @@
|
||||
{#
|
||||
# The plan's tasks, for the Tasks tab of the plan detail page and form. Same columns as the task list
|
||||
# (Planning > Tasks): ID, Name, Description, Start date, End date, Status. Rows are in tree order:
|
||||
# each task is followed by its sub-tasks, indented under it.
|
||||
# The plan's tasks, for the Tasks tab of the plan 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:
|
||||
# plan: the Plan
|
||||
# taskTree: rows from TaskModel::getTaskTree(): {task, depth}, in display order
|
||||
# readOnly: true on the plan form: no links, so that following one can't drop unsaved changes
|
||||
# readOnly: true on the plan form: no links, no filter, so that following one can't drop unsaved changes
|
||||
# taskPermissions: plan:tasks:* permissions (create, editown, editother), when not read-only
|
||||
#
|
||||
# Links carry returnTo=plan, so that Save and Cancel on the task form come back to this plan
|
||||
@@ -29,16 +29,21 @@
|
||||
{% elseif taskTree is empty %}
|
||||
<p class="text-muted">{{ 'mautic.plan.task.empty'|trans }}</p>
|
||||
{% else %}
|
||||
{% if not readOnly %}
|
||||
{# Filter + click-to-sort on the detail page (plan.js). The form's read-only copy stays plain. #}
|
||||
{{ include('@Plan/Plan/_tab_table_filter.html.twig') }}
|
||||
{% endif %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover plan-task-table">
|
||||
<table class="table table-hover plan-tab-table plan-task-table{% if not readOnly %}" data-plan-tab-table data-empty-text="{{ 'mautic.plan.filter.no_match'|trans }}" data-sort-hint="{{ 'mautic.plan.filter.sort_hint'|trans }}{% endif %}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-plan-task-id">{{ 'mautic.core.id'|trans }}</th>
|
||||
<th class="col-plan-task-name">{{ 'mautic.plan.task.field.name'|trans }}</th>
|
||||
<th class="visible-md visible-lg col-plan-task-description">{{ 'mautic.plan.task.field.description'|trans }}</th>
|
||||
<th class="col-plan-task-start">{{ 'mautic.plan.task.field.start_date'|trans }}</th>
|
||||
<th class="col-plan-task-end">{{ 'mautic.plan.task.field.end_date'|trans }}</th>
|
||||
<th class="col-plan-task-status">{{ 'mautic.plan.task.field.status'|trans }}</th>
|
||||
<th class="plan-col-pictogram" aria-label="{{ 'mautic.plan.task.field.pictogram'|trans }}"></th>
|
||||
<th class="plan-col-type">{{ 'mautic.plan.task.field.type'|trans }}</th>
|
||||
<th class="plan-col-name">{{ 'mautic.plan.task.field.name'|trans }}</th>
|
||||
<th class="plan-col-description">{{ 'mautic.plan.task.field.description'|trans }}</th>
|
||||
<th class="plan-col-date">{{ 'mautic.plan.task.field.start_date'|trans }}</th>
|
||||
<th class="plan-col-date">{{ 'mautic.plan.task.field.end_date'|trans }}</th>
|
||||
<th class="plan-col-status">{{ 'mautic.plan.task.field.status'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -47,8 +52,14 @@
|
||||
{% set canEdit = not readOnly and securityHasEntityAccess(taskPermissions['plan:tasks:editown']|default(false), taskPermissions['plan:tasks:editother']|default(false), task.createdBy) %}
|
||||
{% set childCount = taskTree|filter(r => r.task.parent and r.task.parent.id == task.id)|length %}
|
||||
<tr class="plan-task" data-task-id="{{ task.id }}" data-depth="{{ row.depth }}">
|
||||
<td>{{ task.id }}</td>
|
||||
<td>
|
||||
<td class="plan-col-pictogram text-center">
|
||||
{% set taskTypeIcon = plan_item_type_icon('task', task.type) %}
|
||||
{% if taskTypeIcon %}<i class="{{ taskTypeIcon }} plan-item-type-icon" style="font-size: 24px;" aria-hidden="true"></i>{% endif %}
|
||||
</td>
|
||||
<td class="plan-col-type"{% if plan_item_type_description('task', task.type) %} title="{{ plan_item_type_description('task', task.type) }}" data-toggle="tooltip"{% endif %}>
|
||||
{{ plan_item_type_name('task', task.type) ?? 'mautic.plan.description_item.type.unknown'|trans({'%key%': task.type}) }}
|
||||
</td>
|
||||
<td class="plan-col-name">
|
||||
<span style="display: inline-block; padding-left: {{ row.depth * 24 }}px;">
|
||||
{% if row.depth > 0 %}
|
||||
<i class="ri-corner-down-right-line text-muted" title="{{ 'mautic.plan.task.subtask_of'|trans({'%parent%': task.parent.name}) }}"></i>
|
||||
@@ -63,13 +74,16 @@
|
||||
{% endif %}
|
||||
</span>
|
||||
</td>
|
||||
<td class="visible-md visible-lg text-muted">
|
||||
{% set description = task.description|default('')|striptags|trim %}
|
||||
{{ description|length > 120 ? description|slice(0, 120) ~ '…' : description }}
|
||||
<td class="plan-col-description text-muted">
|
||||
{# Same 10-line clamp and read-more as the Description tab; URLs become links. #}
|
||||
{{ include('@Plan/Plan/_description_read_more.html.twig', {
|
||||
'text': task.description|default('')|striptags,
|
||||
'id': 'plan-task-desc-' ~ task.id,
|
||||
}) }}
|
||||
</td>
|
||||
<td>{{ task.startDate ? dateToFull(task.startDate) : '' }}</td>
|
||||
<td>{{ task.endDate ? dateToFull(task.endDate) : '' }}</td>
|
||||
<td><span class="label {{ task.status.labelClass }}">{{ task.status.labelKey|trans }}</span></td>
|
||||
<td class="plan-col-date">{{ task.startDate ? dateToFull(task.startDate) : '' }}</td>
|
||||
<td class="plan-col-date">{{ task.endDate ? dateToFull(task.endDate) : '' }}</td>
|
||||
<td class="plan-col-status"><span class="label {{ task.status.labelClass }}">{{ task.status.labelKey|trans }}</span></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
Reference in new issue
Block a user