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_*
152 lines
8.6 KiB
Twig
152 lines
8.6 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 %}program{% endblock %}
|
|
|
|
{% block headerTitle %}{{ 'mt3s.marketing_program.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['mt3smarketingprogram:programs:create'],
|
|
},
|
|
'routeBase': 'program',
|
|
'langVar': 'program',
|
|
},
|
|
'bulk_actions': {
|
|
'langVar': 'program',
|
|
'routeBase': 'program',
|
|
'templateButtons': {
|
|
'delete': permissions['mt3smarketingprogram:programs:deleteown'] or permissions['mt3smarketingprogram:programs:deleteother'],
|
|
},
|
|
},
|
|
}) -}}
|
|
<div class="page-list">
|
|
{% if items is defined and items is not empty %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover" id="programTable">
|
|
<thead>
|
|
<tr>
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'checkall': 'true',
|
|
'target': '#programTable',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': 'program',
|
|
'orderBy': 'p.name',
|
|
'text': 'mt3s.marketing_program.field.name',
|
|
'class': 'col-program-name',
|
|
'default': true,
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': 'program',
|
|
'orderBy': 'p.status',
|
|
'text': 'mt3s.marketing_program.field.status',
|
|
'class': 'col-program-status',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': 'program',
|
|
'text': 'mt3s.marketing_program.field.owner',
|
|
'class': 'visible-md visible-lg col-program-owner',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': 'program',
|
|
'orderBy': 'p.startDate',
|
|
'text': 'mt3s.marketing_program.field.start_date',
|
|
'class': 'visible-md visible-lg col-program-start',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': 'program',
|
|
'orderBy': 'p.endDate',
|
|
'text': 'mt3s.marketing_program.field.end_date',
|
|
'class': 'visible-md visible-lg col-program-end',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': 'program',
|
|
'orderBy': 'p.budgetPlanned',
|
|
'text': 'mt3s.marketing_program.field.budget_planned',
|
|
'class': 'visible-md visible-lg col-program-budget text-right',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': 'program',
|
|
'orderBy': 'p.id',
|
|
'text': 'mautic.core.id',
|
|
'class': 'visible-md visible-lg col-program-id',
|
|
}) }}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in items %}
|
|
{% set canEdit = securityHasEntityAccess(permissions['mt3smarketingprogram:programs:editown'], permissions['mt3smarketingprogram:programs:editother'], item.createdBy) %}
|
|
<tr>
|
|
<td>
|
|
{{- include('@MauticCore/Helper/list_actions.html.twig', {
|
|
'item': item,
|
|
'templateButtons': {
|
|
'edit': canEdit,
|
|
'delete': securityHasEntityAccess(permissions['mt3smarketingprogram:programs:deleteown'], permissions['mt3smarketingprogram:programs:deleteother'], item.createdBy),
|
|
},
|
|
'routeBase': 'program',
|
|
'langVar': 'program',
|
|
}) -}}
|
|
</td>
|
|
<td>
|
|
<div>
|
|
{{- include('@MauticCore/Helper/publishstatus_icon.html.twig', {
|
|
'item': item,
|
|
'model': 'program',
|
|
}) -}}
|
|
<a href="{{ path('mt3s_marketing_program_action', {'objectAction': 'view', 'objectId': item.id}) }}" data-toggle="ajax">
|
|
{{ item.name }}
|
|
</a>
|
|
{% if item.category %}
|
|
<span class="label label-default">{{ item.category.title }}</span>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
<td>{{ item.status.labelKey|trans }}</td>
|
|
<td class="visible-md visible-lg">
|
|
{{ item.owner ? item.owner.name : 'mt3s.marketing_program.owner.none'|trans }}
|
|
</td>
|
|
<td class="visible-md visible-lg">{{ item.startDate ? dateToDate(item.startDate) : '' }}</td>
|
|
<td class="visible-md visible-lg">{{ item.endDate ? dateToDate(item.endDate) : '' }}</td>
|
|
<td class="visible-md visible-lg text-right">
|
|
{% if item.budgetPlanned is not null %}
|
|
{{ mt3s_marketing_program_money(item.budgetPlanned) }} {{ mt3s_marketing_program_currency() }}
|
|
{% endif %}
|
|
</td>
|
|
<td class="visible-md visible-lg">{{ item.id }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<div class="panel-footer">
|
|
{{- include('@MauticCore/Helper/pagination.html.twig', {
|
|
'totalItems': totalItems,
|
|
'page': page,
|
|
'limit': limit,
|
|
'baseUrl': path('mt3s_marketing_program_index'),
|
|
'sessionVar': 'program',
|
|
}) -}}
|
|
</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': 'mt3s.marketing_program.onboarding.heading',
|
|
'subheading': 'mt3s.marketing_program.onboarding.subheading',
|
|
'copy': 'mt3s.marketing_program.onboarding.copy',
|
|
}) }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|