Files
mautic-marketing-program-bu…/Resources/views/Initiative/_tabs.html.twig
T
Alexandre Gain 71ff11390b 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.
2026-11-13 22:01:32 +01:00

33 lines
1.5 KiB
Twig

{#
# Tab bar shared by the initiative form and the initiative detail page.
#
# Parameters:
# initiativeId: the initiative's id (null for a new initiative)
# counts (optional): tab id => number shown next to the tab name
#
# The tab panes use the ids initiative-tab-<id>. Assets/js/program.js reopens the tab last used for this plan
# (so Edit, Save and Cancel keep the same tab), and on the form marks the tabs whose pane contains a
# validation error and opens the first of them.
#}
{% set initiativeTabs = {
'details': 'mautic.program.tab.details',
'description': 'mautic.program.tab.description',
'objectives': 'mautic.program.tab.objectives',
'allocation': 'mautic.program.tab.allocations',
'audiences': 'mautic.program.tab.audiences',
'stakeholders': 'mautic.program.tab.stakeholders',
'tasks': 'mautic.program.tab.tasks',
} %}
<ul class="nav nav-tabs nav-tabs-contained tabs-horizontal initiative-tabs" role="tablist" data-initiative-id="{{ initiativeId|default('') }}">
{% for id, label in initiativeTabs %}
<li class="{{ loop.first ? 'active' : '' }}" data-tab-id="initiative-tab-{{ id }}">
<a href="#initiative-tab-{{ id }}" role="tab" data-toggle="tab">
<span>{{ label|trans }}</span>
{% if counts is defined and counts[id] is defined %}
<span class="badge">{{ counts[id] }}</span>
{% endif %}
</a>
</li>
{% endfor %}
</ul>