Merge the Smartlinks plugin (SmartlinksBundle 0.6.0) into the bundle as the Smart Links domain (0.18.0)
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.
This commit is contained in:
1 parent
debce4ba4a
commit
dce849610c
69 files changed
+8225
-43
No files matched your search
@@ -0,0 +1,169 @@
|
||||
{# Settings > Configuration > Smart Links Settings: the single tab of the plugin. Section "UTM
|
||||
Settings": the general rules and the short link domain. Section "Parameters": the catalog and
|
||||
custom parameters. Behaviour (rows, import, suggestions) lives in Assets/js/smartlinks.js. #}
|
||||
|
||||
{% block _config_smartlinksconfig_widget %}
|
||||
{% set utm = form.children.smartlinks_utm_config %}
|
||||
{% set links = form.children.smartlinks_config %}
|
||||
<div class="text-muted small pb-md">{{ 'mautic.smartlinks.settings.description'|trans }}</div>
|
||||
{{ form_errors(utm) }}
|
||||
{{ form_errors(links) }}
|
||||
|
||||
<div class="smartlinks-utm-config">
|
||||
<h4 class="fw-sb mb-xs">{{ 'mautic.smartlinks.config.section.utm_settings'|trans }}</h4>
|
||||
<div class="panel panel-default mb-md">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">{{ form_row(utm.children.enforce_lowercase) }}</div>
|
||||
<div class="col-md-4">{{ form_row(utm.children.separator_replacement) }}</div>
|
||||
<div class="col-md-4">{{ form_row(links.children.short_link_domain) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="fw-sb mt-lg mb-xs">{{ 'mautic.smartlinks.config.section.parameters'|trans }}</h4>
|
||||
<p class="text-muted small">{{ 'mautic.smartlinks.config.description'|trans }}</p>
|
||||
|
||||
{% for group in ['standard', 'platform'] %}
|
||||
<h5 class="fw-sb mt-md mb-sm">{{ ('mautic.smartlinks.config.group.' ~ group)|trans }}</h5>
|
||||
<div class="panel-group mb-md">
|
||||
{% for parameter in utm.children.parameters|filter(p => p.vars.utm_group == group) %}
|
||||
{{ form_widget(parameter) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% set custom = utm.children.custom_parameters %}
|
||||
<h5 class="fw-sb mt-md mb-sm">{{ 'mautic.smartlinks.config.group.custom'|trans }}</h5>
|
||||
{{ form_errors(custom) }}
|
||||
<div class="panel-group mb-sm utm-custom-parameters"
|
||||
data-prototype="{{ form_widget(custom.vars.prototype)|e('html_attr') }}"
|
||||
data-index="{{ custom|length > 0 ? max(custom|keys) + 1 : 0 }}">
|
||||
{% for parameter in custom %}
|
||||
{{ form_widget(parameter) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p class="text-muted small utm-custom-empty{{ custom|length > 0 ? ' hide' : '' }}">{{ 'mautic.smartlinks.config.custom.empty'|trans }}</p>
|
||||
<button type="button" class="btn btn-default" data-utm-add-parameter>
|
||||
<i class="ri-add-line"></i> {{ 'mautic.smartlinks.config.custom.add'|trans }}
|
||||
</button>
|
||||
{% do custom.setRendered() %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{# One parameter: accordion panel. #}
|
||||
{% block utm_parameter_widget %}
|
||||
{% set fields = form.children %}
|
||||
{% set isCustom = form.vars.utm_custom %}
|
||||
{% set bodyId = form.vars.id ~ '_body' %}
|
||||
{% set hasErrors = formContainsErrors(form) %}
|
||||
{% set keyText = isCustom ? fields.key.vars.value : form.vars.utm_key %}
|
||||
<div class="panel panel-default mb-xs utm-parameter" data-utm-parameter>
|
||||
<div class="panel-heading">
|
||||
<a class="panel-title d-flex" role="button" data-toggle="collapse" href="#{{ bodyId }}" aria-controls="{{ bodyId }}">
|
||||
<code class="utm-parameter-key mr-sm">{{ keyText is not empty ? keyText : 'mautic.smartlinks.config.custom.new'|trans }}</code>
|
||||
<span class="text-muted">{{ fields.label.vars.value }}</span>
|
||||
{% if form.vars.utm_auto_generated %}
|
||||
<span class="label label-default ml-sm" data-toggle="tooltip" title="{{ 'mautic.smartlinks.config.auto_generated.tooltip'|trans }}">{{ 'mautic.smartlinks.config.auto_generated.badge'|trans }}</span>
|
||||
{% endif %}
|
||||
{% if hasErrors %}<i class="ri-alert-line text-danger ml-sm"></i>{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
<div id="{{ bodyId }}" class="panel-collapse collapse{{ hasErrors or (isCustom and keyText is empty) ? ' in' : '' }}">
|
||||
<div class="panel-body">
|
||||
{% if form.vars.utm_description_key %}
|
||||
<p class="text-muted small">{{ form.vars.utm_description_key|trans }}</p>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
{% if isCustom %}
|
||||
<div class="col-md-3">{{ form_row(fields.key) }}</div>
|
||||
{% endif %}
|
||||
<div class="col-md-{{ isCustom ? 3 : 4 }}">{{ form_row(fields.label) }}</div>
|
||||
<div class="col-md-{{ isCustom ? 3 : 4 }}">{{ form_row(fields.mode) }}</div>
|
||||
<div class="col-md-{{ isCustom ? 3 : 4 }}">{{ form_row(fields.enabled) }}</div>
|
||||
</div>
|
||||
|
||||
{% if fields.values is defined %}
|
||||
{% set values = fields.values %}
|
||||
<div class="row">
|
||||
{# Hidden unless mode = dropdown, by Mautic's form field state switcher (data-show-on). #}
|
||||
<div class="col-xs-12 utm-values-editor" id="{{ form.vars.id }}_values_editor"
|
||||
data-show-on="{{ {(fields.mode.vars.id): 'dropdown'}|json_encode|e('html_attr') }}">
|
||||
<label class="control-label">{{ 'mautic.smartlinks.config.values'|trans }}</label>
|
||||
{{ form_errors(values) }}
|
||||
<div class="row small text-muted mb-xs">
|
||||
<div class="col-xs-1"></div>
|
||||
<div class="col-xs-4">{{ 'mautic.smartlinks.config.values.value'|trans }}</div>
|
||||
<div class="col-xs-4">{{ 'mautic.smartlinks.config.values.label'|trans }}</div>
|
||||
<div class="col-xs-2">{{ 'mautic.smartlinks.config.values.default'|trans }}</div>
|
||||
</div>
|
||||
<div class="utm-values-list" data-prototype="{{ form_widget(values.vars.prototype)|e('html_attr') }}">
|
||||
{% for row in values %}
|
||||
{{ form_widget(row) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p class="text-muted small utm-values-empty{{ values|length > 0 ? ' hide' : '' }}">{{ 'mautic.smartlinks.config.values.empty'|trans }}</p>
|
||||
|
||||
<div class="mb-sm">
|
||||
<button type="button" class="btn btn-default btn-sm" data-utm-add-value>
|
||||
<i class="ri-add-line"></i> {{ 'mautic.smartlinks.config.values.add'|trans }}
|
||||
</button>
|
||||
{% if form.vars.utm_suggestions is not empty %}
|
||||
<button type="button" class="btn btn-default btn-sm{{ values|length > 0 ? ' hide' : '' }}" data-utm-load-suggestions
|
||||
data-utm-suggestions="{{ form.vars.utm_suggestions|json_encode|e('html_attr') }}">
|
||||
<i class="ri-magic-line"></i> {{ 'mautic.smartlinks.config.values.suggestions'|trans }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<label class="control-label small" for="{{ form.vars.id }}_import">{{ 'mautic.smartlinks.config.values.import'|trans }}</label>
|
||||
<div class="input-group mb-sm">
|
||||
{# Not a form field: the text is never submitted, the script turns it into value rows. #}
|
||||
<textarea id="{{ form.vars.id }}_import" class="form-control utm-import-text" rows="3"
|
||||
placeholder="{{ 'mautic.smartlinks.config.values.import.placeholder'|trans }}"></textarea>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" data-utm-import>{{ 'mautic.smartlinks.config.values.import.button'|trans }}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% do values.setRendered() %}
|
||||
{% endif %}
|
||||
|
||||
{% if isCustom %}
|
||||
<button type="button" class="btn btn-danger btn-sm" data-utm-remove-parameter>
|
||||
<i class="ri-delete-bin-line"></i> {{ 'mautic.smartlinks.config.custom.remove'|trans }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{# One allowed value of a dropdown parameter. #}
|
||||
{% block utm_value_widget %}
|
||||
{% set fields = form.children %}
|
||||
<div class="row mb-xs utm-value-row">
|
||||
<div class="col-xs-1">
|
||||
<span class="btn btn-default btn-sm utm-value-handle" title="{{ 'mautic.smartlinks.config.values.drag'|trans }}"><i class="ri-draggable"></i></span>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
{{ form_widget(fields.value) }}
|
||||
{{ form_errors(fields.value) }}
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
{{ form_widget(fields.label) }}
|
||||
{{ form_errors(fields.label) }}
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<label class="checkbox-inline" title="{{ 'mautic.smartlinks.config.values.default'|trans }}">
|
||||
{{ form_widget(fields.is_default) }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<button type="button" class="btn btn-default btn-sm" data-utm-remove-value title="{{ 'mautic.smartlinks.config.values.remove'|trans }}">
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user