- 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.
100 lines
4.8 KiB
Twig
100 lines
4.8 KiB
Twig
{% extends '@MauticCore/Default/content.html.twig' %}
|
|
|
|
{% block mauticContent %}planStakeholder{% endblock %}
|
|
|
|
{% block preHeader %}
|
|
{{- include('@MauticCore/Helper/page_actions.html.twig', {
|
|
'item': item,
|
|
'templateButtons': {
|
|
'close': true,
|
|
},
|
|
'closeUrl': path('plan_stakeholder_index'),
|
|
'targetLabel': 'mautic.plan.stakeholder.header.index'|trans,
|
|
}) -}}
|
|
{% endblock %}
|
|
|
|
{% block headerTitle %}{{ item.name }}{% endblock %}
|
|
|
|
{% block publishStatus %}
|
|
{% include '@MauticCore/Helper/_tag.html.twig' with { tags: [{
|
|
color: item.isPublished ? 'green' : 'cool-gray',
|
|
label: (item.isPublished ? 'mautic.plan.stakeholder.active' : 'mautic.plan.stakeholder.inactive')|trans,
|
|
icon: item.isPublished ? 'ri-checkbox-circle-line' : 'ri-time-line',
|
|
attributes: {'class': 'plan-stakeholder-status-tag'},
|
|
}] } %}
|
|
{% endblock %}
|
|
|
|
{% block actions %}
|
|
{{- include('@MauticCore/Helper/page_actions.html.twig', {
|
|
'item': item,
|
|
'templateButtons': {
|
|
'edit': securityHasEntityAccess(permissions['plan:stakeholders:editown'], permissions['plan:stakeholders:editother'], item.createdBy),
|
|
'delete': securityHasEntityAccess(permissions['plan:stakeholders:deleteown'], permissions['plan:stakeholders:deleteother'], item.createdBy),
|
|
},
|
|
'langVar': 'plan.stakeholder',
|
|
}) -}}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="pa-md">
|
|
<table class="table table-hover mb-md plan-stakeholder-details">
|
|
<tbody>
|
|
<tr>
|
|
<td class="col-md-3 text-muted">{{ 'mautic.plan.stakeholder.field.type'|trans }}</td>
|
|
<td>
|
|
{% set typeIcon = plan_item_type_icon('stakeholder', item.type) %}
|
|
{% if typeIcon %}<i class="{{ typeIcon }} plan-item-type-icon" style="font-size: 24px;" aria-hidden="true"></i> {% endif %}
|
|
{{ plan_item_type_name('stakeholder', item.type) ?? 'mautic.plan.description_item.type.unknown'|trans({'%key%': item.type}) }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">{{ 'mautic.plan.stakeholder.field.role'|trans }}</td>
|
|
<td>{{ item.role|default('mautic.plan.value.none'|trans) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">{{ 'mautic.plan.stakeholder.field.email'|trans }}</td>
|
|
<td>{% if item.email %}<a href="mailto:{{ item.email }}">{{ item.email }}</a>{% else %}{{ 'mautic.plan.value.none'|trans }}{% endif %}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">{{ 'mautic.plan.stakeholder.field.phone'|trans }}</td>
|
|
<td>{% if item.phone %}<a href="tel:{{ item.phone|replace({' ': ''}) }}">{{ item.phone }}</a>{% else %}{{ 'mautic.plan.value.none'|trans }}{% endif %}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">{{ 'mautic.core.created'|trans }}</td>
|
|
<td>{{ item.dateAdded ? dateToFull(item.dateAdded) : '' }}{% if item.createdByUser %} ({{ item.createdByUser }}){% endif %}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">{{ 'mautic.core.id'|trans }}</td>
|
|
<td>{{ item.id }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h4 class="mb-sm">{{ 'mautic.plan.stakeholder.field.plans'|trans }}</h4>
|
|
{% if item.planLinks is empty %}
|
|
<p class="text-muted">{{ 'mautic.plan.stakeholder.no_plans'|trans }}</p>
|
|
{% else %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover plan-stakeholder-plans-view">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ 'mautic.plan.field.name'|trans }}</th>
|
|
<th>{{ 'mautic.plan.stakeholder.field.role_in_plan'|trans }}</th>
|
|
<th>{{ 'mautic.plan.field.status'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for link in item.planLinks %}
|
|
<tr>
|
|
<td><a href="{{ path('plan_action', {'objectAction': 'view', 'objectId': link.plan.id}) }}" data-toggle="ajax">{{ link.plan.name }}</a></td>
|
|
<td class="text-muted">{{ link.roleInPlan|default('—') }}</td>
|
|
<td><span class="label {{ link.plan.status.labelClass }}">{{ link.plan.status.labelKey|trans }}</span></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|