Files
mautic-marketing-program-bu…/Resources/views/Task/list.html.twig
T
Alexandre Gain 8696acd01c 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.
2026-11-08 11:54:25 +01:00

151 lines
8.5 KiB
Twig

{% set isIndex = 'index' == tmpl ? true : false %}
{% set tmpl = 'list' %}
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
{% block mauticContent %}planTask{% endblock %}
{% block headerTitle %}{{ 'mautic.plan.task.header.index'|trans }}{% endblock %}
{% block content %}
<div id="page-list-wrapper" class="{% if items|length > 0 or searchValue is not empty %}panel {% endif %}panel-default">
{{- include('@MauticCore/Helper/list_toolbar.html.twig', {
'searchValue': searchValue,
'action': currentRoute,
'page_actions': {
'templateButtons': {
'new': permissions['plan:tasks:create'],
},
'langVar': 'plan.task',
},
'bulk_actions': {
'langVar': 'plan.task',
'templateButtons': {
'delete': permissions['plan:tasks:deleteown'] or permissions['plan:tasks:deleteother'],
},
},
}) -}}
<div class="page-list">
{% if items is defined and items is not empty %}
<div class="table-responsive">
<table class="table table-hover" id="planTaskTable">
<thead>
<tr>
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'checkall': 'true',
'target': '#planTaskTable',
}) }}
{# Columns: ID, Pictogram, Type, Name, Description, Start date, End date, Status. #}
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'sessionVar': 'plan.task',
'orderBy': 't.id',
'text': 'mautic.core.id',
'class': 'col-plan-task-id',
}) }}
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'sessionVar': 'plan.task',
'text': 'mautic.plan.task.field.pictogram',
'class': 'col-plan-task-pictogram',
}) }}
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'sessionVar': 'plan.task',
'orderBy': 't.type',
'text': 'mautic.plan.task.field.type',
'class': 'col-plan-task-type',
}) }}
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'sessionVar': 'plan.task',
'orderBy': 't.name',
'text': 'mautic.plan.task.field.name',
'class': 'col-plan-task-name',
'default': true,
}) }}
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'sessionVar': 'plan.task',
'text': 'mautic.plan.task.field.description',
'class': 'visible-md visible-lg col-plan-task-description',
}) }}
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'sessionVar': 'plan.task',
'orderBy': 't.startDate',
'text': 'mautic.plan.task.field.start_date',
'class': 'col-plan-task-start',
}) }}
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'sessionVar': 'plan.task',
'orderBy': 't.endDate',
'text': 'mautic.plan.task.field.end_date',
'class': 'col-plan-task-end',
}) }}
{{ include('@MauticCore/Helper/tableheader.html.twig', {
'sessionVar': 'plan.task',
'orderBy': 't.status',
'text': 'mautic.plan.task.field.status',
'class': 'col-plan-task-status',
}) }}
</tr>
</thead>
<tbody>
{% for item in items %}
{% set canEdit = securityHasEntityAccess(permissions['plan:tasks:editown'], permissions['plan:tasks:editother'], item.createdBy) %}
<tr>
<td>
{{- include('@MauticCore/Helper/list_actions.html.twig', {
'item': item,
'templateButtons': {
'edit': canEdit,
'delete': securityHasEntityAccess(permissions['plan:tasks:deleteown'], permissions['plan:tasks:deleteother'], item.createdBy),
},
'langVar': 'plan.task',
}) -}}
</td>
<td>{{ item.id }}</td>
<td class="text-center">
{% set typeIcon = plan_item_type_icon('task', item.type) %}
{% if typeIcon %}<i class="{{ typeIcon }} plan-item-type-icon" style="font-size: 24px;" aria-hidden="true"></i>{% endif %}
</td>
<td{% if plan_item_type_description('task', item.type) %} title="{{ plan_item_type_description('task', item.type) }}"{% endif %}>
{{ plan_item_type_name('task', item.type) ?? 'mautic.plan.description_item.type.unknown'|trans({'%key%': item.type}) }}
</td>
<td>
{% if canEdit %}
<a href="{{ path('plan_task_action', {'objectAction': 'edit', 'objectId': item.id}) }}" data-toggle="ajax">{{ item.name }}</a>
{% else %}
{{ item.name }}
{% endif %}
</td>
<td class="visible-md visible-lg text-muted">
{% set description = item.description|default('')|striptags|trim %}
{{ (description|length > 120 ? description|slice(0, 120) ~ '…' : description)|plan_linkify }}
</td>
<td>{{ item.startDate ? dateToFull(item.startDate) : '' }}</td>
<td>{{ item.endDate ? dateToFull(item.endDate) : '' }}</td>
<td><span class="label {{ item.status.labelClass }}">{{ item.status.labelKey|trans }}</span></td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="panel-footer">
{{- include('@MauticCore/Helper/pagination.html.twig', {
'totalItems': totalItems,
'page': page,
'limit': limit,
'baseUrl': path('plan_task_index'),
'sessionVar': 'plan.task',
}) -}}
</div>
</div>
{% elseif searchValue is not empty %}
{{ include('@MauticCore/Helper/noresults.html.twig') }}
{% else %}
<div class="mt-80 col-md-offset-2 col-lg-offset-3 col-md-8 col-lg-5 height-auto">
{{ include('@MauticCore/Components/content-block.html.twig', {
'heading': 'mautic.plan.task.onboarding.heading',
'subheading': 'mautic.plan.task.onboarding.subheading',
'copy': 'mautic.plan.task.onboarding.copy',
}) }}
</div>
{% endif %}
</div>
</div>
{% endblock %}