One bundle, two domains (Marketing Programs and Smart Links), one naming scheme.\nNothing in the database changed (no tables, columns, URLs or stored data);\nthe runtime was rebuilt and verified live.\n\n- Route names mautic_smartlinks_* -> mt3s_smartlinks_* (paths unchanged);\n the menu ids follow\n- Model service aliases collapsed to one canonical alias per model:\n mautic.mt3smarketingprogram.model.<entity> (core's mautic.<x>.model.<x>\n pattern), so getModel('mt3smarketingprogram.smart_link'); the dead\n mt3s.* and mautic.mt3smp.*-era aliases are gone\n- Translation keys mautic.smartlinks.* -> mt3s.smart_links.*\n (mautic.config.tab.smartlinksconfig stays: core derives it)\n- Settings parameters smartlinks_utm_config/smartlinks_config ->\n mt3s_smart_links_utm_config/mt3s_smart_links_config, with both legacy\n keys (smartlinks_* of the standalone bundle, utm_manager_* of the\n UtmManagerBundle era) still readable until the settings are saved again\n- JS loader prefixes smartlinksSmartLink/smartlinksUtmTaxonomy ->\n mt3sMpSmartLink/mt3sMpUtmTaxonomy (the mt3sMp* family of the program\n domain)\n- Integration/Support/ConfigSupport -> SmartlinksConfigSupport; integration\n display names aligned ('MT3S Marketing Program' / 'Smart Links'); the\n dead mautic.plugin.smartlinks.name catalog keys removed\n- phpunit suite renamed UtmManagerBundle -> MT3SMarketingProgramBundle;\n version 0.18.1\n\nVerified: full php -l, 90/90 unit tests (phpunit 11.5 phar), cache clear +\nwarm + assets regenerate + plugins reload (as www-data), live: both lists\nand forms (mauticContent mt3sMpSmartLink/mt3sMpUtmTaxonomy), both config\ntabs, the menu labels, the program pages (regression), the public /l/y32b\nredirect through the legacy utm_manager_* settings (302 with the taxonomy's\nUTM values, wrong host and unknown slug 404), all ini catalogs parse, zero\nnew log errors.
128 lines
7.1 KiB
Twig
128 lines
7.1 KiB
Twig
{% set isIndex = 'index' == tmpl|default('index') ? true : false %}
|
|
{% set tmpl = 'list' %}
|
|
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
|
|
|
{% block mauticContent %}mt3sMpUtmTaxonomy{% endblock %}
|
|
|
|
{% block headerTitle %}{{ 'mt3s.smart_links.taxonomies.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">
|
|
{# The toolbar belongs to the full page only: ajax reloads (sort, filter, pagination)
|
|
replace the contents of .page-list, so including it here again would duplicate it. #}
|
|
{% if isIndex %}
|
|
{{- include('@MauticCore/Helper/list_toolbar.html.twig', {
|
|
'searchValue': searchValue,
|
|
'action': currentRoute,
|
|
'page_actions': {
|
|
'templateButtons': {
|
|
'new': permissions[permissionBase ~ ':create'],
|
|
},
|
|
'langVar': 'smartlinks.taxonomies',
|
|
'routeBase': 'utm_taxonomies',
|
|
},
|
|
'bulk_actions': {
|
|
'langVar': 'smartlinks.taxonomies',
|
|
'templateButtons': {
|
|
'delete': permissions[permissionBase ~ ':deleteown'] or permissions[permissionBase ~ ':deleteother'],
|
|
},
|
|
},
|
|
}) -}}
|
|
{% endif %}
|
|
<div class="page-list">
|
|
{% if items is defined and items is not empty %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover" id="utmTaxonomyTable">
|
|
<thead>
|
|
<tr>
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'checkall': 'true',
|
|
'target': '#utmTaxonomyTable',
|
|
}) }}
|
|
{# Columns: Name, Description, Parameters, Date added. #}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': sessionVar,
|
|
'orderBy': tablePrefix ~ '.name',
|
|
'text': 'mt3s.smart_links.taxonomies.name',
|
|
'class': 'col-utm-taxonomy-name',
|
|
'default': true,
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': sessionVar,
|
|
'orderBy': tablePrefix ~ '.description',
|
|
'text': 'mt3s.smart_links.taxonomies.description',
|
|
'class': 'visible-md visible-lg col-utm-taxonomy-description',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': sessionVar,
|
|
'text': 'mt3s.smart_links.taxonomies.parameter_count',
|
|
'class': 'visible-md visible-lg col-utm-taxonomy-parameters',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': sessionVar,
|
|
'orderBy': tablePrefix ~ '.dateAdded',
|
|
'text': 'mautic.core.date.added',
|
|
'class': 'visible-md visible-lg col-utm-taxonomy-date',
|
|
}) }}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in items %}
|
|
{% set canEdit = securityHasEntityAccess(permissions[permissionBase ~ ':editown'], permissions[permissionBase ~ ':editother'], item.createdBy) %}
|
|
<tr>
|
|
<td>
|
|
{{- include('@MauticCore/Helper/list_actions.html.twig', {
|
|
'item': item,
|
|
'templateButtons': {
|
|
'edit': canEdit,
|
|
'delete': securityHasEntityAccess(permissions[permissionBase ~ ':deleteown'], permissions[permissionBase ~ ':deleteother'], item.createdBy),
|
|
},
|
|
'langVar': 'smartlinks.taxonomies',
|
|
'routeBase': 'utm_taxonomies',
|
|
}) -}}
|
|
</td>
|
|
<td>
|
|
{% if canEdit %}
|
|
<a href="{{ path(actionRoute, {'objectAction': 'edit', 'objectId': item.id}) }}" data-toggle="ajax">{{ item.name }}</a>
|
|
{% else %}
|
|
<span>{{ item.name }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td class="visible-md visible-lg text-muted">
|
|
{{ item.description|default('—')|slice(0, 120) }}
|
|
</td>
|
|
<td class="visible-md visible-lg">
|
|
<span class="label label-info" title="{{ 'mt3s.smart_links.taxonomies.parameter_count.tooltip'|trans }}">
|
|
{{ item.parameters|length }}
|
|
</span>
|
|
</td>
|
|
<td class="visible-md visible-lg">{{ dateToFull(item.dateAdded) }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<div class="panel-footer">
|
|
{{- include('@MauticCore/Helper/pagination.html.twig', {
|
|
'totalItems': totalItems,
|
|
'page': page,
|
|
'limit': limit,
|
|
'baseUrl': path(indexRoute),
|
|
'sessionVar': sessionVar,
|
|
}) -}}
|
|
</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.smart_links.taxonomies.onboarding.heading',
|
|
'subheading': 'mt3s.smart_links.taxonomies.onboarding.subheading',
|
|
'copy': 'mt3s.smart_links.taxonomies.onboarding.copy',
|
|
}) }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|