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.
100 lines
4.9 KiB
Twig
100 lines
4.9 KiB
Twig
{% extends '@MauticCore/Default/content.html.twig' %}
|
|
|
|
{% block mauticContent %}programStakeholder{% endblock %}
|
|
|
|
{% block preHeader %}
|
|
{{- include('@MauticCore/Helper/page_actions.html.twig', {
|
|
'item': item,
|
|
'templateButtons': {
|
|
'close': true,
|
|
},
|
|
'closeUrl': path('initiative_stakeholder_index'),
|
|
'targetLabel': 'mautic.program.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.program.stakeholder.active' : 'mautic.program.stakeholder.inactive')|trans,
|
|
icon: item.isPublished ? 'ri-checkbox-circle-line' : 'ri-time-line',
|
|
attributes: {'class': 'initiative-stakeholder-status-tag'},
|
|
}] } %}
|
|
{% endblock %}
|
|
|
|
{% block actions %}
|
|
{{- include('@MauticCore/Helper/page_actions.html.twig', {
|
|
'item': item,
|
|
'templateButtons': {
|
|
'edit': securityHasEntityAccess(permissions['program:stakeholders:editown'], permissions['program:stakeholders:editother'], item.createdBy),
|
|
'delete': securityHasEntityAccess(permissions['program:stakeholders:deleteown'], permissions['program:stakeholders:deleteother'], item.createdBy),
|
|
},
|
|
'langVar': 'initiative.stakeholder',
|
|
}) -}}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="pa-md">
|
|
<table class="table table-hover mb-md initiative-stakeholder-details">
|
|
<tbody>
|
|
<tr>
|
|
<td class="col-md-3 text-muted">{{ 'mautic.program.stakeholder.field.type'|trans }}</td>
|
|
<td>
|
|
{% set typeIcon = program_item_type_icon('stakeholder', item.type) %}
|
|
{% if typeIcon %}<i class="{{ typeIcon }} initiative-item-type-icon" style="font-size: 24px;" aria-hidden="true"></i> {% endif %}
|
|
{{ program_item_type_name('stakeholder', item.type) ?? 'mautic.program.description_item.type.unknown'|trans({'%key%': item.type}) }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">{{ 'mautic.program.stakeholder.field.role'|trans }}</td>
|
|
<td>{{ item.role|default('mautic.program.value.none'|trans) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">{{ 'mautic.program.stakeholder.field.email'|trans }}</td>
|
|
<td>{% if item.email %}<a href="mailto:{{ item.email }}">{{ item.email }}</a>{% else %}{{ 'mautic.program.value.none'|trans }}{% endif %}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">{{ 'mautic.program.stakeholder.field.phone'|trans }}</td>
|
|
<td>{% if item.phone %}<a href="tel:{{ item.phone|replace({' ': ''}) }}">{{ item.phone }}</a>{% else %}{{ 'mautic.program.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.program.stakeholder.field.plans'|trans }}</h4>
|
|
{% if item.initiativeLinks is empty %}
|
|
<p class="text-muted">{{ 'mautic.program.stakeholder.no_plans'|trans }}</p>
|
|
{% else %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover initiative-stakeholder-initiatives-view">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ 'mautic.program.field.name'|trans }}</th>
|
|
<th>{{ 'mautic.program.stakeholder.field.role_in_initiative'|trans }}</th>
|
|
<th>{{ 'mautic.program.field.status'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for link in item.initiativeLinks %}
|
|
<tr>
|
|
<td><a href="{{ path('initiative_action', {'objectAction': 'view', 'objectId': link.initiative.id}) }}" data-toggle="ajax">{{ link.initiative.name }}</a></td>
|
|
<td class="text-muted">{{ link.roleInInitiative|default('—') }}</td>
|
|
<td><span class="label {{ link.initiative.status.labelClass }}">{{ link.initiative.status.labelKey|trans }}</span></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|