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_*
164 lines
8.7 KiB
Twig
164 lines
8.7 KiB
Twig
{% extends '@MauticCore/Default/content.html.twig' %}
|
|
|
|
{% block mauticContent %}mt3sMpProgramAudience{% endblock %}
|
|
|
|
{% block preHeader %}
|
|
<div class="pull-right">
|
|
{{ include('@MauticCore/Helper/page_actions.html.twig', {
|
|
'item': item,
|
|
'templateButtons': {
|
|
'edit': securityHasEntityAccess(permissions['mt3smarketingprogram:audiences:editown'], permissions['mt3smarketingprogram:audiences:editother'], item.createdBy),
|
|
'delete': securityHasEntityAccess(permissions['mt3smarketingprogram:audiences:deleteown'], permissions['mt3smarketingprogram:audiences:deleteother'], item.createdBy),
|
|
},
|
|
'actionRoute': 'mt3s_marketing_program_audience_action',
|
|
'indexRoute': 'mt3s_marketing_program_audience_index',
|
|
'langVar': 'program.audience',
|
|
}) }}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block headerTitle %}{{ item.name }}{% endblock %}
|
|
|
|
{% block publishStatus %}
|
|
<div class="col-xs-0 col-sm-3 text-right pr-0">
|
|
<span class="label {{ item.isPublished ? 'label-success' : 'label-gray' }}">
|
|
{{ (item.isPublished ? 'mt3s.marketing_program.audience.active' : 'mt3s.marketing_program.audience.inactive')|trans }}
|
|
</span>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="pa-md">
|
|
<table class="table table-hover mb-md program-audience-details">
|
|
<tbody>
|
|
<tr>
|
|
<td class="col-md-3 text-muted" style="width: 30%;">{{ 'mt3s.marketing_program.audience.field.type'|trans }}</td>
|
|
<td>
|
|
<i class="{{ item.audienceType.icon }} program-item-type-icon" style="font-size: 24px;" aria-hidden="true"></i>
|
|
{{ item.audienceType.labelKey|trans }}
|
|
</td>
|
|
</tr>
|
|
{% if item.segments is not empty %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.segments'|trans }}</td>
|
|
<td>
|
|
{% for segment in item.segments %}
|
|
<span class="label label-info">{{ segment.name }} ({{ mt3s_marketing_program_audience_segment_count(segment.id) }})</span>{% if not loop.last %} {% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.tagline %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.tagline'|trans }}</td>
|
|
<td>{{ item.tagline|mt3s_marketing_program_linkify }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.profileCriteria %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.profile_criteria'|trans }}</td>
|
|
<td style="white-space: pre-wrap;">{{ item.profileCriteria|mt3s_marketing_program_linkify }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.motivations %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.motivations'|trans }}</td>
|
|
<td style="white-space: pre-wrap;">{{ item.motivations|mt3s_marketing_program_linkify }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.barriers %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.barriers'|trans }}</td>
|
|
<td style="white-space: pre-wrap;">{{ item.barriers|mt3s_marketing_program_linkify }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.frustrations %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.frustrations'|trans }}</td>
|
|
<td style="white-space: pre-wrap;">{{ item.frustrations|mt3s_marketing_program_linkify }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.triggers %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.triggers'|trans }}</td>
|
|
<td style="white-space: pre-wrap;">{{ item.triggers|mt3s_marketing_program_linkify }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.decisionRole %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.decision_role'|trans }}</td>
|
|
<td>{{ mt3s_marketing_program_audience_decision_role_label(item.decisionRole) ?? item.decisionRole }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.preferredTones is not empty %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.preferred_tones'|trans }}</td>
|
|
<td>
|
|
{% for tone in item.preferredTones %}
|
|
<span class="label label-default">{{ mt3s_marketing_program_audience_tone_label(tone) ?? tone }}</span>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.preferredChannels is not empty %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.preferred_channels'|trans }}</td>
|
|
<td>
|
|
{% for channel in item.preferredChannels %}
|
|
<span class="label label-default">{{ mt3s_marketing_program_audience_channel_label(channel)|trans }}</span>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.stages is not empty %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.stages'|trans }}</td>
|
|
<td>{{ item.stages|map(stage => stage.name)|join(', ') }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if item.estimatedSize %}
|
|
<tr>
|
|
<td class="text-muted">{{ 'mt3s.marketing_program.audience.field.estimated_size'|trans }}</td>
|
|
<td>{{ item.estimatedSize }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
<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">{{ 'mt3s.marketing_program.audience.field.plans'|trans }}</h4>
|
|
{% if item.programLinks is empty %}
|
|
<p class="text-muted">{{ 'mt3s.marketing_program.audience.no_plans'|trans }}</p>
|
|
{% else %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover program-audience-programs-view">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ 'mt3s.marketing_program.field.name'|trans }}</th>
|
|
<th>{{ 'mt3s.marketing_program.audience.field.priority'|trans }}</th>
|
|
<th>{{ 'mt3s.marketing_program.audience.field.value_proposition'|trans }}</th>
|
|
<th>{{ 'mt3s.marketing_program.field.status'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for link in item.programLinks %}
|
|
<tr>
|
|
<td><a href="{{ path('mt3s_marketing_program_action', {'objectAction': 'view', 'objectId': link.program.id}) }}" data-toggle="ajax">{{ link.program.name }}</a></td>
|
|
<td><span class="label {{ link.priority.labelClass }}">{{ link.priority.labelKey|trans }}</span></td>
|
|
<td class="text-muted">{{ link.valueProposition|default('—') }}</td>
|
|
<td><span class="label {{ link.program.status.labelClass }}">{{ link.program.status.labelKey|trans }}</span></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %} |