refactor(plugin): rename Plan to Program and add audience/UTM routes
Rename the Plan bundle to Program across config, routes, menus, and controllers (Plan -> Initiative), bump version to 0.16.0, and introduce new audience and UTM taxonomy routes and permissions to support the expanded Programs feature set.
This commit is contained in:
1 parent
8268fad886
commit
71ff11390b
121 files changed
+5011
-2874
No files matched your search
@@ -1,110 +0,0 @@
|
||||
{#
|
||||
# Settings > Configuration > Plan Settings: the general currency, then one section per kind of plan
|
||||
# item (description, allocation, objectives, tasks), each with a pictogram. Adding and removing
|
||||
# types, and the pictogram preview, are handled by Assets/js/plan.js (delegated handlers on
|
||||
# .plan-config-types).
|
||||
#}
|
||||
|
||||
{% macro type_row(type) %}
|
||||
<div class="panel panel-default plan-config-type">
|
||||
<div class="panel-body">
|
||||
{{ form_widget(type.children.key) }}
|
||||
{{ form_errors(type) }}
|
||||
{% if type.children.icon is defined %}
|
||||
{% set icon = type.children.icon.vars.value %}
|
||||
<div class="row mb-sm">
|
||||
<div class="col-xs-1 text-center pt-lg">
|
||||
<i class="plan-type-icon-preview {{ icon }}" style="font-size: 28px;" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div class="col-xs-5">{{ form_row(type.children.icon) }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<table class="table table-condensed mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-2">{{ 'mautic.plan.config.type.language'|trans }}</th>
|
||||
<th class="col-xs-4">{{ 'mautic.plan.config.type.name'|trans }}</th>
|
||||
<th class="col-xs-6">{{ 'mautic.plan.config.type.description'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for locale, name in type.children.names.children %}
|
||||
<tr>
|
||||
<td class="text-muted" title="{{ name.vars.attr['data-locale'] }}">
|
||||
{{ name.vars.attr['data-language'] }}
|
||||
{% if name.vars.required %}<span class="required">*</span>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_widget(name) }}
|
||||
{{ form_errors(name) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_widget(type.children.descriptions.children[locale]) }}
|
||||
{{ form_errors(type.children.descriptions.children[locale]) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-right mt-xs">
|
||||
<button type="button" class="btn btn-ghost btn-sm plan-config-type-remove">
|
||||
<i class="ri-delete-bin-line"></i> {{ 'mautic.plan.config.type.remove'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{# One editable list of types (one per kind of plan item). #}
|
||||
{% macro type_section(types, titleKey, helpKey) %}
|
||||
{% import _self as plan %}
|
||||
<h4 class="fw-sb mt-lg mb-xs">{{ titleKey|trans }}</h4>
|
||||
<p class="text-muted small">{{ helpKey|trans }}</p>
|
||||
{{ form_errors(types) }}
|
||||
<div class="plan-config-types" data-prototype="{{ plan.type_row(types.vars.prototype)|e('html_attr') }}">
|
||||
<p class="text-muted plan-config-types-empty{% if types|length > 0 %} hide{% endif %}">
|
||||
{{ 'mautic.plan.config.types.empty'|trans }}
|
||||
</p>
|
||||
<div class="plan-config-types-list">
|
||||
{% for type in types %}
|
||||
{{ plan.type_row(type) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="button" class="btn btn-ghost plan-config-type-add">
|
||||
<i class="ri-add-line"></i> {{ 'mautic.plan.config.type.add'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
{% do types.setRendered %}
|
||||
{% endmacro %}
|
||||
|
||||
{% block _config_planconfig_widget %}
|
||||
{% import _self as plan %}
|
||||
<div class="text-muted small pb-md">{{ 'mautic.plan.config.description'|trans }}</div>
|
||||
|
||||
<h4 class="fw-sb mb-xs">{{ 'mautic.plan.config.section.general'|trans }}</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">{{ form_row(form.children.plan_currency) }}</div>
|
||||
<div class="col-md-6">{{ form_row(form.children.plan_stakeholder_phone_region) }}</div>
|
||||
</div>
|
||||
<p class="text-muted small">{{ 'mautic.plan.config.currency.help'|trans }}</p>
|
||||
|
||||
{{ plan.type_section(form.children.plan_description_item_types,
|
||||
'mautic.plan.config.section.description_item_types',
|
||||
'mautic.plan.config.section.description_item_types.help') }}
|
||||
|
||||
{{ plan.type_section(form.children.plan_allocation_item_types,
|
||||
'mautic.plan.config.section.allocation_item_types',
|
||||
'mautic.plan.config.section.allocation_item_types.help') }}
|
||||
|
||||
{{ plan.type_section(form.children.plan_objective_types,
|
||||
'mautic.plan.config.section.objective_types',
|
||||
'mautic.plan.config.section.objective_types.help') }}
|
||||
|
||||
{{ plan.type_section(form.children.plan_task_types,
|
||||
'mautic.plan.config.section.task_types',
|
||||
'mautic.plan.config.section.task_types.help') }}
|
||||
|
||||
{{ plan.type_section(form.children.plan_stakeholder_types,
|
||||
'mautic.plan.config.section.stakeholder_types',
|
||||
'mautic.plan.config.section.stakeholder_types.help') }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,128 @@
|
||||
{#
|
||||
# Settings > Configuration > Program Settings: the general currency, then one section per kind of initiative
|
||||
# item (insights, allocation, objectives, tasks), each with a pictogram. Adding and removing
|
||||
# types, and the pictogram preview, are handled by Assets/js/program.js (delegated handlers on
|
||||
# .program-config-types).
|
||||
#}
|
||||
|
||||
{% macro type_row(type) %}
|
||||
<div class="panel panel-default program-config-type">
|
||||
<div class="panel-body">
|
||||
{{ form_widget(type.children.key) }}
|
||||
{{ form_errors(type) }}
|
||||
{% if type.children.icon is defined %}
|
||||
{% set icon = type.children.icon.vars.value %}
|
||||
<div class="row mb-sm">
|
||||
<div class="col-xs-1 text-center pt-lg">
|
||||
<i class="initiative-type-icon-preview {{ icon }}" style="font-size: 28px;" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div class="col-xs-5">{{ form_row(type.children.icon) }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<table class="table table-condensed mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-2">{{ 'mautic.program.config.type.language'|trans }}</th>
|
||||
<th class="col-xs-4">{{ 'mautic.program.config.type.name'|trans }}</th>
|
||||
<th class="col-xs-6">{{ 'mautic.program.config.type.description'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for locale, name in type.children.names.children %}
|
||||
<tr>
|
||||
<td class="text-muted" title="{{ name.vars.attr['data-locale'] }}">
|
||||
{{ name.vars.attr['data-language'] }}
|
||||
{% if name.vars.required %}<span class="required">*</span>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_widget(name) }}
|
||||
{{ form_errors(name) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_widget(type.children.descriptions.children[locale]) }}
|
||||
{{ form_errors(type.children.descriptions.children[locale]) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-right mt-xs">
|
||||
<button type="button" class="btn btn-ghost btn-sm program-config-type-remove">
|
||||
<i class="ri-delete-bin-line"></i> {{ 'mautic.program.config.type.remove'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{# One editable list of types (one per kind of initiative item). #}
|
||||
{% macro type_section(types, titleKey, helpKey) %}
|
||||
{% import _self as cfg %}
|
||||
<h4 class="fw-sb mt-lg mb-xs">{{ titleKey|trans }}</h4>
|
||||
<p class="text-muted small">{{ helpKey|trans }}</p>
|
||||
{{ form_errors(types) }}
|
||||
<div class="program-config-types" data-prototype="{{ cfg.type_row(types.vars.prototype)|e('html_attr') }}">
|
||||
<p class="text-muted program-config-types-empty{% if types|length > 0 %} hide{% endif %}">
|
||||
{{ 'mautic.program.config.types.empty'|trans }}
|
||||
</p>
|
||||
<div class="program-config-types-list">
|
||||
{% for type in types %}
|
||||
{{ cfg.type_row(type) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="button" class="btn btn-ghost program-config-type-add">
|
||||
<i class="ri-add-line"></i> {{ 'mautic.program.config.type.add'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
{% do types.setRendered %}
|
||||
{% endmacro %}
|
||||
|
||||
{% block _config_programconfig_widget %}
|
||||
{% import _self as cfg %}
|
||||
<div class="text-muted small pb-md">{{ 'mautic.program.config.description'|trans }}</div>
|
||||
|
||||
<h4 class="fw-sb mb-xs">{{ 'mautic.program.config.section.general'|trans }}</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6">{{ form_row(form.children.program_currency) }}</div>
|
||||
<div class="col-md-6">{{ form_row(form.children.program_stakeholder_phone_region) }}</div>
|
||||
</div>
|
||||
<p class="text-muted small">{{ 'mautic.program.config.currency.help'|trans }}</p>
|
||||
|
||||
{{ cfg.type_section(form.children.program_description_item_types,
|
||||
'mautic.program.config.section.description_item_types',
|
||||
'mautic.program.config.section.description_item_types.help') }}
|
||||
|
||||
{{ cfg.type_section(form.children.program_allocation_item_types,
|
||||
'mautic.program.config.section.allocation_item_types',
|
||||
'mautic.program.config.section.allocation_item_types.help') }}
|
||||
|
||||
{{ cfg.type_section(form.children.program_objective_types,
|
||||
'mautic.program.config.section.objective_types',
|
||||
'mautic.program.config.section.objective_types.help') }}
|
||||
|
||||
{{ cfg.type_section(form.children.program_task_types,
|
||||
'mautic.program.config.section.task_types',
|
||||
'mautic.program.config.section.task_types.help') }}
|
||||
|
||||
{{ cfg.type_section(form.children.program_stakeholder_types,
|
||||
'mautic.program.config.section.stakeholder_types',
|
||||
'mautic.program.config.section.stakeholder_types.help') }}
|
||||
|
||||
<h4 class="fw-sb mt-lg mb-xs">{{ 'mautic.program.config.section.audience_values'|trans }}</h4>
|
||||
<p class="text-muted small">{{ 'mautic.program.config.section.audience_values.help'|trans }}</p>
|
||||
{{ cfg.type_section(form.children.program_audience_decision_roles,
|
||||
'mautic.program.config.section.audience_decision_roles',
|
||||
'mautic.program.config.section.audience_decision_roles.help') }}
|
||||
|
||||
{{ cfg.type_section(form.children.program_audience_tones,
|
||||
'mautic.program.config.section.audience_tones',
|
||||
'mautic.program.config.section.audience_tones.help') }}
|
||||
|
||||
<h4 class="fw-sb mt-lg mb-xs">{{ 'mautic.program.config.section.audience_attributes'|trans }}</h4>
|
||||
<p class="text-muted small">{{ 'mautic.program.config.section.audience_attributes.help'|trans }}</p>
|
||||
<div class="program-config-audience-attributes">
|
||||
{% for attribute in program_audience_attributes() %}
|
||||
{{ form_row(form.children[program_audience_attribute_toggle(attribute)]) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user