Two domains, one MT3S bundle: Marketing Programs (unchanged) and the
imported Smart Links (smart links + UTM taxonomies), each keeping its
own menu, tables, routes and translations.
- Code moved from MauticPlugin\SmartlinksBundle\ to
MauticPlugin\MT3SMarketingProgramBundle\; template namespace
@Smartlinks/ -> @MT3SMarketingProgram/; smartlinks.js ->
Assets/js/mt3s-mp-smartlinks.js; icon -> Assets/img/smartlinks-icon.svg.
- Incoming migrations renamed Version_0_X_0_SmartLinks.php to avoid
the class-name collision; schema untouched, data intact.
- Permissions folded into MT3SMarketingProgramPermissions:
smart_links + taxonomies under the mt3smarketingprogram: base
(roles that had the old smartlinks: grants must be re-granted).
- config.php: Smart Links routes + menu group, public /l/{slug},
SmartlinksIntegration services, smartlinks_* parameters (legacy
utm_manager_* keys still readable), version 0.18.0. The 0.17.0
placeholder /s/marketing-program-utm-taxonomies is replaced by the
real /s/utm-taxonomies.
- Translations merged (en_US) and added (fr_FR); Tests/ + phpunit moved
in; readme documents both domains and the 0.18.0 merge history.
Verified live: menus, both config tabs, both lists + forms, program
pages, public redirect with taxonomy UTM values, host + unknown-slug
404s, 90/90 unit tests, full php -l, all ini catalogs parse.
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 %}smartlinksUtmTaxonomy{% endblock %}
|
|
|
|
{% block headerTitle %}{{ 'mautic.smartlinks.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': 'mautic.smartlinks.taxonomies.name',
|
|
'class': 'col-utm-taxonomy-name',
|
|
'default': true,
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': sessionVar,
|
|
'orderBy': tablePrefix ~ '.description',
|
|
'text': 'mautic.smartlinks.taxonomies.description',
|
|
'class': 'visible-md visible-lg col-utm-taxonomy-description',
|
|
}) }}
|
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
|
'sessionVar': sessionVar,
|
|
'text': 'mautic.smartlinks.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="{{ 'mautic.smartlinks.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': 'mautic.smartlinks.taxonomies.onboarding.heading',
|
|
'subheading': 'mautic.smartlinks.taxonomies.onboarding.subheading',
|
|
'copy': 'mautic.smartlinks.taxonomies.onboarding.copy',
|
|
}) }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|