Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{% set troubleshootingContent %}
|
||||
<div class='dwc--generator-troubleshooting'>
|
||||
<i class='ri-close-circle-line ri-xl mb-sm mt-lg d-inline-flex'></i>
|
||||
<h5 class='fw-sb mb-xs'>{{ 'mautic.dynamiccontent.generator.troubleshooting.content_not_displaying'|trans }}</h5>
|
||||
<p>{{ 'mautic.dynamiccontent.generator.troubleshooting.content_not_displaying_text'|trans }}</p>
|
||||
|
||||
<i class='ri-javascript-line ri-xl mb-sm mt-lg d-inline-flex'></i>
|
||||
<h5 class='fw-sb mb-xs'>{{ 'mautic.dynamiccontent.generator.troubleshooting.javascript'|trans }}</h5>
|
||||
<p>{{ 'mautic.dynamiccontent.generator.troubleshooting.javascript_text'|trans }}</p>
|
||||
|
||||
<i class='ri-input-field ri-xl mb-sm mt-lg d-inline-flex'></i>
|
||||
<h5 class='fw-sb mb-xs'>{{ 'mautic.dynamiccontent.generator.troubleshooting.default_content'|trans }}</h5>
|
||||
<p>{{ 'mautic.dynamiccontent.generator.troubleshooting.default_content_text'|trans }}</p>
|
||||
|
||||
<i class='ri-server-line ri-xl mb-sm mt-lg d-inline-flex'></i>
|
||||
<h5 class='fw-sb mb-xs'>{{ 'mautic.dynamiccontent.generator.troubleshooting.cache'|trans }}</h5>
|
||||
<p>{{ 'mautic.dynamiccontent.generator.troubleshooting.cache_text'|trans }}</p>
|
||||
</div>
|
||||
{% endset %}
|
||||
<div>
|
||||
{% include '@MauticCore/Components/toggletip.html.twig' with {
|
||||
label: 'mautic.core.troubleshooting',
|
||||
size: 'xs',
|
||||
icon: 'ri-question-answer-line',
|
||||
content: troubleshootingContent,
|
||||
html: true,
|
||||
trigger: 'click'
|
||||
} %}
|
||||
</div>
|
||||
@@ -0,0 +1,150 @@
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('app/bundles/DynamicContentBundle/Assets/css/dwc-generator.css') }}">
|
||||
|
||||
{% set htmlcode %}
|
||||
<pre class="dwc--generator-content-code d-flex fd-column fg-1 gap-md pa-0 fs-16 text-helper">{{ '<div
|
||||
data-slot="dwc"
|
||||
data-param-slot-name="' ~ entity.slotName ~ '">'|raw }}<div class="dwc--generator-content-editable layer-two d-inline-flex gap-4 ai-center ml-lg text-primary"><i class="ri-pencil-line ri-sm" title="{{ 'mautic.dynamiccontent.generator.default_content_tooltip'|trans }}" data-toggle="tooltip"></i><input class="form-control dwc--generator-content-input" type="text" placeholder="{{ 'mautic.dynamiccontent.generator.input_placeholder'|trans }}"></div>{{ '</div>'|escape }}</pre>
|
||||
{% endset %}
|
||||
|
||||
<div class="row mt-lg">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="mt-lg mb-md">{{ 'mautic.dynamiccontent.generator.deployment_options'|trans }}</h2>
|
||||
<p class="text-muted mb-lg">{{ 'mautic.dynamiccontent.generator.deployment_instructions'|trans }}</p>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<ul class="list-group" role="tablist">
|
||||
<li role="presentation" class="list-group-item active">
|
||||
<a href="#dwc--generator-html" aria-controls="dwc--generator-html" role="tab" data-toggle="tab">
|
||||
<div class="d-flex jc-space-between mb-sm">
|
||||
<h4 class="list-group-item-heading fw-sb">{{ 'mautic.dynamiccontent.generator.html'|trans }}</h4>
|
||||
<i class="ri-html5-fill ri-lg"></i>
|
||||
</div>
|
||||
<p class="list-group-item-text">{{ 'mautic.dynamiccontent.generator.html_description'|trans }}</p>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation" class="list-group-item">
|
||||
<a href="#dwc--generator-plugins" aria-controls="dwc--generator-plugins" role="tab" data-toggle="tab">
|
||||
<div class="d-flex jc-space-between mb-sm">
|
||||
<h4 class="list-group-item-heading fw-sb">{{ 'mautic.dynamiccontent.generator.plugins'|trans }}</h4>
|
||||
<i class="ri-apps-2-add-fill ri-lg"></i>
|
||||
</div>
|
||||
<p class="list-group-item-text">{{ 'mautic.dynamiccontent.generator.plugins_description'|trans }}</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{{ include('@MauticDynamicContent/DynamicContent/StandaloneSlotGenerator/dwc-generator--help.html.twig') }}
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-8 tab-content">
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade in active" id="dwc--generator-html">
|
||||
<div class="tile dwc--generator-wrapper">
|
||||
<div class="d-flex fg-1">
|
||||
<div class="dwc--generator-toolbar pa-xs layer-two d-flex fd-column jc-space-between ai-start mr-md">
|
||||
{% include '@MauticCore/Helper/button.html.twig' with {
|
||||
buttons: [
|
||||
{
|
||||
icon: 'ri-code-s-slash-line ri-lg',
|
||||
label: 'mautic.dynamiccontent.generator.switch_html_tag',
|
||||
icon_only: true,
|
||||
variant: 'ghost',
|
||||
size: 'sm',
|
||||
attributes: {
|
||||
'class': 'ma-0',
|
||||
'type': 'button'
|
||||
}
|
||||
},
|
||||
{
|
||||
icon: 'ri-question-line ri-lg',
|
||||
label: 'mautic.dynamiccontent.generator.more_information.html',
|
||||
icon_only: true,
|
||||
variant: 'ghost',
|
||||
size: 'sm',
|
||||
attributes: {
|
||||
'class': 'ma-0',
|
||||
'type': 'button',
|
||||
'data-toggle': 'popover',
|
||||
'title': 'mautic.dynamiccontent.generator.html_tag_title'|trans,
|
||||
'data-content': 'mautic.dynamiccontent.generator.html_tag_info'|trans,
|
||||
'data-container': 'body',
|
||||
}
|
||||
}
|
||||
]
|
||||
} %}
|
||||
|
||||
</div>
|
||||
<div class="dwc--generator-content mt-md mb-sm d-flex fd-column fg-1">
|
||||
{{ htmlcode }}
|
||||
<div class="dwc--generator-content-help text-helper small">
|
||||
<i class="ri-information-2-line"></i>
|
||||
{{ 'mautic.dynamiccontent.generator.preview_content_discard_notice'|trans }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="dwc--generator-plugins">
|
||||
<div class="tile dwc--generator-wrapper">
|
||||
<div class="d-flex fg-1">
|
||||
<div class="dwc--generator-toolbar pa-xs layer-two d-flex fd-column jc-space-between ai-start mr-md">
|
||||
{% include '@MauticCore/Helper/button.html.twig' with {
|
||||
buttons: [
|
||||
{
|
||||
icon: 'ri-brackets-line ri-lg',
|
||||
label: 'mautic.dynamiccontent.generator.switch_code_wrapper',
|
||||
icon_only: true,
|
||||
variant: 'ghost',
|
||||
size: 'sm',
|
||||
attributes: {
|
||||
'class': 'ma-0',
|
||||
'type': 'button'
|
||||
}
|
||||
},
|
||||
{
|
||||
icon: 'ri-question-line ri-lg',
|
||||
label: 'mautic.dynamiccontent.generator.more_information.plugins',
|
||||
icon_only: true,
|
||||
variant: 'ghost',
|
||||
size: 'sm',
|
||||
attributes: {
|
||||
'class': 'ma-0',
|
||||
'data-toggle': 'popover',
|
||||
'title': 'mautic.dynamiccontent.generator.when_to_change_brackets'|trans,
|
||||
'data-content': 'mautic.dynamiccontent.generator.joomla_syntax_info'|trans,
|
||||
'data-container': 'body',
|
||||
'type': 'button'
|
||||
}
|
||||
}
|
||||
]
|
||||
} %}
|
||||
|
||||
</div>
|
||||
<div class="dwc--generator-content mt-md mb-sm d-flex fd-column fg-1">
|
||||
<pre class="dwc--generator-content-code d-flex fd-column fg-1 gap-md pa-0 fs-16 text-helper">{mautic type="content" slot="{{ entity.slotName }}"} <div class="dwc--generator-content-editable layer-two d-inline-flex gap-4 ai-center ml-lg text-primary"> <i class="ri-pencil-line ri-sm" title="{{ 'mautic.dynamiccontent.generator.default_content_tooltip'|trans }}" data-toggle="tooltip"></i><input class="form-control dwc--generator-content-input" type="text" placeholder="{{ 'mautic.dynamiccontent.generator.input_placeholder'|trans }}"></div>{/mautic}
|
||||
</pre>
|
||||
<div class="dwc--generator-content-help text-helper small">
|
||||
<i class="ri-information-2-line"></i>
|
||||
{{ 'mautic.dynamiccontent.generator.preview_content_discard_notice'|trans }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include '@MauticCore/Helper/button.html.twig' with {
|
||||
buttons: [
|
||||
{
|
||||
label: 'mautic.dynamiccontent.generator.copy_dynamic_content_slot',
|
||||
icon: 'ri-clipboard-line',
|
||||
variant: 'secondary',
|
||||
size: 'xl',
|
||||
wide: 'true',
|
||||
attributes: {
|
||||
'class': 'dwc--generator-copy'
|
||||
}
|
||||
}
|
||||
]
|
||||
} %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,109 @@
|
||||
{#
|
||||
Variables
|
||||
- searchValue
|
||||
- items (\Mautic\DynamicContentBundle\Entity\DynamicContent[])
|
||||
- categories
|
||||
- page
|
||||
- limit
|
||||
- permissions
|
||||
- model
|
||||
- tmpl
|
||||
#}
|
||||
{% if items|length > 0 %}
|
||||
<div class="table-responsive page-list">
|
||||
<table class="table table-hover dwctable-list" id="dwcTable">
|
||||
<thead>
|
||||
<tr>
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'checkall': 'true',
|
||||
'target': '#dwcTable',
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'dynamicContent',
|
||||
'orderBy': 'e.name',
|
||||
'text': 'mautic.core.name',
|
||||
'class': 'col-dwc-name',
|
||||
'default': true,
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'dynamicContent',
|
||||
'orderBy': 'e.slotName',
|
||||
'text': 'mautic.dynamicContent.label.slot_name',
|
||||
'class': 'col-dwc-slotname visible-md visible-lg',
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'dynamicContent',
|
||||
'orderBy': 'c.title',
|
||||
'text': 'mautic.core.category',
|
||||
'class': 'col-dwc-category visible-md visible-lg',
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'dynamicContent',
|
||||
'orderBy': 'e.id',
|
||||
'text': 'mautic.core.id',
|
||||
'class': 'col-dwc-id visible-md visible-lg',
|
||||
}) }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ include('@MauticCore/Helper/list_actions.html.twig', {
|
||||
'item': item,
|
||||
'templateButtons': {
|
||||
'edit': securityHasEntityAccess(permissions['dynamiccontent:dynamiccontents:editown'], permissions['dynamiccontent:dynamiccontents:editother'], item.createdBy),
|
||||
'clone': permissions['dynamiccontent:dynamiccontents:create'],
|
||||
'delete': securityHasEntityAccess(permissions['dynamiccontent:dynamiccontents:deleteown'], permissions['dynamiccontent:dynamiccontents:deleteother'], item.createdBy),
|
||||
},
|
||||
'routeBase': 'dynamicContent',
|
||||
'nameGetter': 'getName',
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ include('@MauticCore/Helper/publishstatus_icon.html.twig', {'item': item, 'model': 'dynamicContent'}) }}
|
||||
<a href="{{ url('mautic_dynamicContent_action', {'objectAction': 'view', 'objectId': item.id}) }}" data-toggle="ajax">
|
||||
{{ item.name }}
|
||||
{% if item.isVariant or item.isTranslation or item.isCampaignBased %}
|
||||
<span>
|
||||
{% if item.isVariant %}
|
||||
<span data-toggle="tooltip" title="{{ 'mautic.core.icon_tooltip.ab_test'|trans }}"><i class="ri-fw ri-organization-chart"></i></span>
|
||||
{% endif %}
|
||||
{% if item.isTranslation %}
|
||||
<span data-toggle="tooltip" title="{{ 'mautic.core.icon_tooltip.translation'|trans }}"><i class="ri-fw ri-translate"></i></span>
|
||||
{% endif %}
|
||||
{% if item.isCampaignBased %}
|
||||
<span data-toggle="tooltip" title="{{ 'mautic.dwc.form.is.campaign.tooltip'|trans }}"><i class="ri-fw ri-megaphone-line"></i></span>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{{ customContent('dynamiccontent.name', _context) }}
|
||||
</td>
|
||||
<td class="visible-md visible-lg">{{ item.slotName }}</td>
|
||||
<td class="visible-md visible-lg">
|
||||
{{ include('@MauticCore/Modules/category--expanded.html.twig', {'category': item.category}) }}
|
||||
</td>
|
||||
<td class="visible-md visible-lg">{{ item.id }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-footer">
|
||||
{{ include('@MauticCore/Helper/pagination.html.twig', {
|
||||
'totalItems': items|length,
|
||||
'page': page,
|
||||
'limit': limit,
|
||||
'menuLinkId': 'mautic_dynamicContent_index',
|
||||
'baseUrl': url('mautic_dynamicContent_index'),
|
||||
'sessionVar': 'dynamicContent',
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ include('@MauticCore/Helper/noresults.html.twig') }}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,214 @@
|
||||
{#
|
||||
#}
|
||||
{% extends (not isEmbedded) ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||
|
||||
{% block mauticContent 'dynamicContent' %}
|
||||
|
||||
{% block headerTitle entity.name %}
|
||||
|
||||
{% block publishStatus %}
|
||||
{{- include('@MauticCore/Helper/publishstatus_badge.html.twig', {
|
||||
'entity': entity,
|
||||
'status': 'available'
|
||||
}) -}}
|
||||
|
||||
{% set tags = [
|
||||
{
|
||||
color: 'warm-gray',
|
||||
label: entity.isCampaignBased
|
||||
? 'mautic.dwc.form.is.campaign'
|
||||
: 'mautic.dwc.form.is.standalone'
|
||||
}
|
||||
] %}
|
||||
|
||||
{% set tags = tags
|
||||
|merge(entity.isTranslation and not entity.isTranslation(true)
|
||||
? [{ color: 'warm-gray', label: 'mautic.core.icon_tooltip.translation' }]
|
||||
: [])
|
||||
|merge(entity.isTranslation(true)
|
||||
? [{ color: 'warm-gray', label: 'mautic.core.translation_of'|trans({'%parent%' : translations.parent.getName()}), icon: 'ri-translate' }]
|
||||
: [])
|
||||
%}
|
||||
|
||||
{% include '@MauticCore/Helper/_tag.html.twig' with { tags: tags } %}
|
||||
{% endblock %}
|
||||
|
||||
{% block preHeader %}
|
||||
{{- include('@MauticCore/Helper/page_actions.html.twig',
|
||||
{
|
||||
'item' : entity,
|
||||
'templateButtons' : {
|
||||
'close' : securityHasEntityAccess(permissions['dynamiccontent:dynamiccontents:viewown'], permissions['dynamiccontent:dynamiccontents:viewother'], entity.createdBy),
|
||||
},
|
||||
'routeBase' : 'dynamicContent',
|
||||
'targetLabel' : 'mautic.dynamicContent.dynamicContents'|trans
|
||||
}
|
||||
) -}}
|
||||
{{ include('@MauticCore/Modules/category--inline.html.twig', {'category': entity.category}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{{- include('@MauticCore/Helper/page_actions.html.twig', {
|
||||
'item': entity,
|
||||
'customButtons': customButtons|default([]),
|
||||
'templateButtons': {
|
||||
'edit': securityHasEntityAccess(permissions['dynamiccontent:dynamiccontents:editown'], permissions['dynamiccontent:dynamiccontents:editother'], entity.createdBy),
|
||||
'clone': permissions['dynamiccontent:dynamiccontents:create'],
|
||||
'delete': securityHasEntityAccess(permissions['dynamiccontent:dynamiccontents:deleteown'], permissions['dynamiccontent:dynamiccontents:deleteother'], entity.createdBy),
|
||||
},
|
||||
'routeBase': 'dynamicContent',
|
||||
}) -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{%- set translationContent = include('@MauticCore/Translation/index.html.twig', {
|
||||
'activeEntity': entity,
|
||||
'translations': translations,
|
||||
'model': 'dynamicContent',
|
||||
'actionRoute': 'mautic_dynamicContent_action',
|
||||
})|trim -%}
|
||||
{%- set showTranslations = translationContent is not empty -%}
|
||||
|
||||
<!-- start: box layout -->
|
||||
<div class="box-layout">
|
||||
<!-- left section -->
|
||||
<div class="col-md-9 height-auto">
|
||||
<div>
|
||||
<!-- page detail header -->
|
||||
{% set description %}
|
||||
{% if entity.isVariant(true) %}
|
||||
<div class="small">
|
||||
<a href="{{ path('mautic_dynamicContent_action', {'objectAction': 'view', 'objectId': variants.parent.id}) }}" data-toggle="ajax">
|
||||
{{ 'mautic.core.variant_of'|trans({'%parent%': variants.parent.name}) }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if entity.isTranslation(true) %}
|
||||
<div class="small">
|
||||
<a href="{{ path('mautic_dynamicContent_action', {'objectAction': 'view', 'objectId': translations.parent.id}) }}" data-toggle="ajax">
|
||||
{{ 'mautic.core.translation_of'|trans({'%parent%': translations.parent.name}) }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not entity.isCampaignBased %}
|
||||
<div class="small">
|
||||
{{ 'mautic.dynamicContent.header.is_filter_based'|trans({'%slot%': entity.slotName}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
{% include '@MauticCore/Helper/description--expanded.html.twig' with { 'description': description } %}
|
||||
<!--/ page detail header -->
|
||||
<!-- page detail collapseable -->
|
||||
<div class="collapse pr-md pl-md" id="page-details">
|
||||
<div class="pr-md pl-md pb-md">
|
||||
<div class="panel shd-none mb-0">
|
||||
<table class="table table-hover mb-0">
|
||||
<tbody>
|
||||
{{ include('@MauticCore/Helper/details.html.twig', {'entity': entity}) }}
|
||||
<tr>
|
||||
<td width="20%"><span class="fw-b textTitle">{{ 'mautic.dynamicContent.slot.campaign'|trans }}</span></td>
|
||||
<td>{{ entity.isCampaignBased ? 'Yes' : 'No' }}</td>
|
||||
</tr>
|
||||
{% if not entity.isCampaignBased %}
|
||||
<tr>
|
||||
<td width="20%"><span class="fw-b textTitle">{{ 'mautic.dynamicContent.label.slot_name'|trans }}</span></td>
|
||||
<td>{{ entity.slotName }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/ page detail collapseable -->
|
||||
</div>
|
||||
<div>
|
||||
<!-- page detail collapseable toggler -->
|
||||
<div class="hr-expand nm">
|
||||
<span data-toggle="tooltip" title="Detail">
|
||||
<a href="javascript:void(0)" class="arrow text-secondary collapsed" data-toggle="collapse" data-target="#page-details">
|
||||
<span class="caret"></span>
|
||||
{{ 'mautic.core.details'|trans }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<!--/ page detail collapseable toggler -->
|
||||
|
||||
<!-- some stats -->
|
||||
<div class="pa-md">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel">
|
||||
<div class="panel-body box-layout">
|
||||
<div class="col-md-3 va-m">
|
||||
<h5 class="text-white dark-md fw-sb mb-xs">
|
||||
<span class="ri-line-chart-fill"></span>
|
||||
{{ 'mautic.dynamicContent.views'|trans }}
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-md-9 va-m">
|
||||
{{ include('@MauticCore/Helper/graph_dateselect.html.twig', {'dateRangeForm': dateRangeForm, 'class': 'pull-right'}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex fd-column pt-0 pl-15 pb-15 pr-15 min-h-256">
|
||||
{{ include('@MauticCore/Helper/chart.html.twig', {'chartData': entityViews, 'chartType': 'line', 'chartHeight': 300}) }}
|
||||
</div>
|
||||
</div>
|
||||
{% if not entity.isCampaignBased %}
|
||||
{{ include('@MauticDynamicContent/DynamicContent/StandaloneSlotGenerator/dwc-generator.html.twig') }}
|
||||
<hr>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/ stats -->
|
||||
|
||||
{{ customContent('details.stats.graph.below', _context) }}
|
||||
|
||||
<!-- tabs controls -->
|
||||
<ul class="nav nav-tabs nav-tabs-contained">
|
||||
<li class="active">
|
||||
<a href="#clicks-container" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.trackable.click_counts'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% if showTranslations %}
|
||||
<li class>
|
||||
<a href="#translation-container" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.core.translations'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<!--/ tabs controls -->
|
||||
</div>
|
||||
<!-- start: tab-content -->
|
||||
<div class="tab-content pa-md">
|
||||
<div class="tab-pane active active bdr-w-0" id="clicks-container">
|
||||
{{ include('@MauticPage/Trackable/click_counts.html.twig', {'trackables': trackables, 'entity': entity, 'channel': 'dynamicContent'}) }}
|
||||
|
||||
</div>
|
||||
<!-- #translation-container -->
|
||||
{% if showTranslations %}
|
||||
<div class="tab-pane bdr-w-0" id="translation-container">
|
||||
{{ translationContent|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<!--/ #translation-container -->
|
||||
</div>
|
||||
<!-- end: tab-content -->
|
||||
</div>
|
||||
<!--/ left section -->
|
||||
|
||||
<!-- right section -->
|
||||
<div class="col-md-3 bdr-l height-auto">
|
||||
<hr class="hr-w-2" style="width:50%">
|
||||
<!-- recent activity -->
|
||||
{{ include('@MauticCore/Helper/recentactivity.html.twig', {'logs': logs}) }}
|
||||
</div>
|
||||
<!--/ right section -->
|
||||
</div>
|
||||
|
||||
<!--/ end: box layout -->
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,196 @@
|
||||
{#
|
||||
Used to create and edit dynamic content
|
||||
#}
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
{% form_theme form '@MauticDynamicContent/FormTheme/Filter/layout.html.twig' %}
|
||||
|
||||
{% block mauticContent 'dynamicContent' %}
|
||||
{% block translationBase 'mautic.dynamicContent' %}
|
||||
|
||||
{% block headerTitle %}
|
||||
{% if form.vars.data.id is empty %}
|
||||
{{ 'mautic.dynamicContent.header.new'|trans }}
|
||||
{% else %}
|
||||
{{ 'mautic.dynamicContent.header.edit'|trans({'%name%': form.vars.data.name}) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{%- set fields = form.vars.fields -%}
|
||||
{%- set index = form.filters.vars.value|keys|length -%}
|
||||
{%- set hasMainErrors = formContainsErrors(form, ['filters']) -%}
|
||||
{%- set hasFilterErrors = formContainsErrors(form.filters) -%}
|
||||
|
||||
{{ form_start(form) }}
|
||||
<div class="box-layout">
|
||||
<div class="col-md-9 height-auto">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<ul class="nav nav-tabs nav-tabs-contained">
|
||||
<li class="active">
|
||||
<a href="#details" role="tab" data-toggle="tab" class="{% if hasMainErrors %}text-danger{% endif %}">
|
||||
{{ 'mautic.core.details'|trans }}
|
||||
{% if hasMainErrors %}
|
||||
<i class="ri-alert-line"></i>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{% if form.vars.value.isCampaignBased or form.updateSelect is defined %}hide{% endif %}" id="dwcFiltersTab">
|
||||
<a href="#filters" role="tab" data-toggle="tab" class="{% if hasFilterErrors %}text-danger{% endif %}">
|
||||
{{ 'mautic.core.filters'|trans }}
|
||||
{% if hasFilterErrors %}
|
||||
<i class="ri-alert-line"></i>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- start: tab-content -->
|
||||
<div class="tab-content pa-md">
|
||||
<div class="tab-pane fade in active bdr-w-0" id="details">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.name) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ form_row(form.content) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade bdr-w-0" id="filters">
|
||||
{% if hasFilterErrors and '' is not same as form_errors(form.filters) %}
|
||||
<div class="has-error alert alert-danger" role="alert" style="padding:5px 10px 0 10px;">
|
||||
{{ form_errors(form.filters) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="dwc-filter bdr-w-0" id="{{ form.vars.id }}">
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
<label>{{ 'Filters'|trans }}</label>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="form-group">
|
||||
<div class="available-filters mb-md pl-0"
|
||||
data-prototype="{{ form_widget(form.filters.vars.prototype)|e }}"
|
||||
data-index="{{ index + 1 }}">
|
||||
<select class="chosen form-control" id="available_filters">
|
||||
<option value=""></option>
|
||||
{% for object, field in fields %}
|
||||
{% set icon = 'company' == object ? 'building' : 'user' %}
|
||||
<optgroup label="{{ ('mautic.lead.' ~ object)|trans }}">
|
||||
{% for value, params in field %}
|
||||
{% set list = params.properties.list|default([]) %}
|
||||
{% if 'boolean' is same as params.properties.type %}
|
||||
{% set choices = formFieldParseBooleanList(list)|reverse %}
|
||||
{% else %}
|
||||
{% set choices = leadFormFieldParseListForChoices(list) %}
|
||||
{% endif %}
|
||||
{% set callback = params.properties.callback|default('') %}
|
||||
{% set operators = params.operators %}
|
||||
<option value="{{ value|e }}"
|
||||
id="available_{{ object }}_{{ value }}"
|
||||
data-field-object="{{ object }}"
|
||||
data-field-type="{{ params.properties.type }}"
|
||||
data-field-list="{{ list|json_encode }}"
|
||||
data-field-callback="{{ callback }}"
|
||||
data-field-operators="{{ operators|json_encode }}"
|
||||
class="segment-filter {{ icon }}">{{ params.label|trans }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="selected-filters" id="dwc_filters" data-filter-container>
|
||||
{{ form_widget(form.filters) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 height-auto bdr-l">
|
||||
<div class="pr-lg pl-lg pt-md pb-md">
|
||||
{{ form_row(form.type) }}
|
||||
{{ form_row(form.category) }}
|
||||
{{ form_row(form.projects) }}
|
||||
{{ form_row(form.language) }}
|
||||
{{ form_row(form.translationParent) }}
|
||||
<div id="publishStatus">
|
||||
{{ form_row(form.isPublished) }}
|
||||
</div>
|
||||
{% if form.updateSelect is not defined %}
|
||||
{{ form_row(form.isCampaignBased) }}
|
||||
{% endif %}
|
||||
<div id="slotNameDiv" class="{% if form.vars.value.isCampaignBased %}hide{% endif %}">
|
||||
{{ form_row(form.slotName) }}
|
||||
</div>
|
||||
<hr/>
|
||||
{% include '@MauticCore/FormTheme/Fields/_utm_tags_fields.html.twig' %}
|
||||
<div class="hide">
|
||||
{{ form_row(form.publishUp) }}
|
||||
{{ form_row(form.publishDown) }}
|
||||
{{ form_rest(form) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{%- set templates = {
|
||||
'countries': 'country-template',
|
||||
'regions': 'region-template',
|
||||
'timezones': 'timezone-template',
|
||||
'select': 'select-template',
|
||||
'lists': 'leadlist-template',
|
||||
'campaign': 'campaign-template',
|
||||
'deviceTypes': 'device_type-template',
|
||||
'deviceBrands': 'device_brand-template',
|
||||
'deviceOs': 'device_os-template',
|
||||
'emails': 'lead_email_received-template',
|
||||
'tags': 'tags-template',
|
||||
'stage': 'stage-template',
|
||||
'locales': 'locale-template',
|
||||
'globalcategory': 'globalcategory-template',
|
||||
} -%}
|
||||
<div class="hide" id="templates">
|
||||
{% for dataKey, template in templates %}
|
||||
<select class="form-control not-chosen {{ template }}"
|
||||
{% if 'tags' == dataKey %}data-placeholder="{{ 'mautic.lead.tags.select_or_create'|trans }}"{% endif %}
|
||||
{% if 'tags' == dataKey %}data-no-results-text="{{ 'mautic.lead.tags.enter_to_create'|trans }}"{% endif %}
|
||||
{% if 'tags' == dataKey %}data-allow-add="true"{% endif %}
|
||||
{% if 'tags' == dataKey %}onchange="Mautic.createLeadTag(this)"{% endif %}
|
||||
name="dwc[filters][__name__][filter]"
|
||||
id="dwc_filters___name___filter">
|
||||
{% if form.vars[dataKey] is defined %}
|
||||
{% set index = 0 %}
|
||||
{% for label, value in form.vars[dataKey] %}
|
||||
{% if value is iterable %}
|
||||
<optgroup label="{{ label }}">
|
||||
{% for optionLabel, optionValue in value %}
|
||||
{% if (dataKey == 'regions') %}
|
||||
{% set optionValue = index %}
|
||||
{% set index = index + 1 %}
|
||||
{% endif %}
|
||||
<option value="{{ optionValue }}">{{ optionLabel }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% elseif 'lists' != dataKey or (currentListId is defined and value != currentListId) %}
|
||||
<option value="{{ value }}">{{ label }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</select>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,73 @@
|
||||
{#
|
||||
Variables
|
||||
- searchValue
|
||||
- items (\Mautic\DynamicContentBundle\Entity\DynamicContent[])
|
||||
- categories
|
||||
- page
|
||||
- limit
|
||||
- permissions
|
||||
- model
|
||||
- tmpl
|
||||
#}
|
||||
{%- set isIndex = 'index' == tmpl -%}
|
||||
{%- set tmpl = 'list' -%}
|
||||
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||
|
||||
{% block mauticContent 'dynamicContent' %}
|
||||
|
||||
{% block headerTitle 'mautic.dynamicContent.dynamicContents'|trans %}
|
||||
|
||||
{% block content %}
|
||||
{% if isIndex %}
|
||||
<div id="page-list-wrapper" class="panel panel-default">
|
||||
{{ include('@MauticCore/Helper/list_toolbar.html.twig', {
|
||||
'searchValue': searchValue,
|
||||
'searchHelp': 'mautic.page.help.searchcommands',
|
||||
'action': currentRoute,
|
||||
'page_actions': {
|
||||
'templateButtons': {
|
||||
'new': permissions['dynamiccontent:dynamiccontents:create'],
|
||||
},
|
||||
'routeBase': 'dynamicContent',
|
||||
},
|
||||
'bulk_actions': {
|
||||
'routeBase': 'dynamicContent',
|
||||
'templateButtons': {
|
||||
'delete': permissions['dynamiccontent:dynamiccontents:deleteown'] or permissions['dynamiccontent:dynamiccontents:deleteother'],
|
||||
},
|
||||
},
|
||||
'quickFilters': [
|
||||
{
|
||||
'search': 'mautic.core.searchcommand.ispublished',
|
||||
'label': 'mautic.core.form.available',
|
||||
'tooltip': 'mautic.core.searchcommand.ispublished.description',
|
||||
'icon': 'ri-check-line'
|
||||
},
|
||||
{
|
||||
'search': 'mautic.core.searchcommand.isunpublished',
|
||||
'label': 'mautic.core.form.unavailable',
|
||||
'tooltip': 'mautic.core.searchcommand.isunpublished.description',
|
||||
'icon': 'ri-close-line'
|
||||
},
|
||||
{
|
||||
'search': 'mautic.core.searchcommand.isuncategorized',
|
||||
'label': 'mautic.core.form.uncategorized',
|
||||
'tooltip': 'mautic.core.searchcommand.isuncategorized.description',
|
||||
'icon': 'ri-folder-unknow-line'
|
||||
},
|
||||
{
|
||||
'search': 'mautic.core.searchcommand.ismine',
|
||||
'label': 'mautic.core.searchcommand.ismine.label',
|
||||
'tooltip': 'mautic.core.searchcommand.ismine.description',
|
||||
'icon': 'ri-user-line'
|
||||
}
|
||||
]
|
||||
}) }}
|
||||
<div class="page-list">
|
||||
{{ include('@MauticDynamicContent/DynamicContent/_list.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ include('@MauticDynamicContent/DynamicContent/_list.html.twig') }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% block _dynamiccontentdecision_list_row %}
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
{{ form_row(form.dynamicContent) }}
|
||||
</div>
|
||||
<div class="col-xs-4 mt-lg">
|
||||
<div class="mt-3">
|
||||
{{ form_row(form.newDynamicContentButton) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% block _dynamiccontentpush_list_row %}
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
{{ form_row(form.dynamicContent) }}
|
||||
</div>
|
||||
<div class="col-xs-4 mt-lg">
|
||||
<div class="mt-3">
|
||||
{{ form_row(form.newDynamicContentButton) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,68 @@
|
||||
{% block _dwc_filters_entry_widget %}
|
||||
{%- set isPrototype = '__name__' == form.vars.name -%}
|
||||
{%- set filterType = form.field.vars.value -%}
|
||||
{%- set inGroup = form.vars.data.glue is defined and 'and' is same as form.vars.data.glue -%}
|
||||
{%- set isBehavior = fields.behaviors[filterType].label is defined -%}
|
||||
{%- set icon = form.vars.data.object is defined and 'company' == form.vars.data.object ? 'ri-building-2-line' : 'ri-user-6-fill' -%}
|
||||
|
||||
{%- if isBehavior -%}
|
||||
{%- set object = 'behaviors' -%}
|
||||
{%- else -%}
|
||||
{%- set object = form.vars.data.object is defined ? form.vars.data.object : 'lead' -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if isPrototype or fields[object][filterType].label is defined -%}
|
||||
<div class="panel {% if inGroup and false is same as first %}in-group{% endif %}">
|
||||
<div class="panel-heading {% if not isPrototype and '0' is same as form.vars.name %}hide{% endif %}">
|
||||
<div class="panel-glue col-sm-2 pl-0 ">
|
||||
{{ form_widget(form.glue) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-xs-6 col-sm-3 field-name">
|
||||
<i class="object-icon fa {{ icon }}" aria-hidden="true"></i>
|
||||
<span>{{ isPrototype ? '__label__' : fields[object][filterType].label }}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-3 padding-none">
|
||||
{{ form_widget(form.operator) }}
|
||||
</div>
|
||||
|
||||
{%- set hasErrors = form.filter.vars.errors|length or form.display.vars.errors|length -%}
|
||||
<div class="col-xs-10 col-sm-5 padding-none {% if hasErrors %}has-error{% endif %}">
|
||||
{{ form_widget(form.filter) }}
|
||||
{{ form_widget(form.display) }}
|
||||
{{ form_errors(form.filter) }}
|
||||
{{ form_errors(form.display) }}
|
||||
</div>
|
||||
|
||||
<div class="col-xs-2 col-sm-1">
|
||||
{% include '@MauticCore/Helper/button.html.twig' with {
|
||||
buttons: [
|
||||
{
|
||||
label: 'mautic.report.report.label.removefilter',
|
||||
variant: 'ghost',
|
||||
icon_only: true,
|
||||
size: 'xs',
|
||||
danger: 'true',
|
||||
icon: 'ri-delete-bin-line',
|
||||
href: 'javascript: void(0);',
|
||||
attributes: {
|
||||
'class': 'remove-selected text-danger pull-right'
|
||||
}
|
||||
}
|
||||
]
|
||||
} %}
|
||||
</div>
|
||||
{{ form_widget(form.field) }}
|
||||
{{ form_widget(form.type) }}
|
||||
{{ form_widget(form.object) }}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{% endblock %}
|
||||
|
||||
{% block _dwc_filters_widget %}
|
||||
{% use '@MauticLead/FormTheme/Filter/_leadlist_filters_widget.html.twig' %}
|
||||
{{ block('_leadlist_filters_widget') }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% if showMore is defined %}
|
||||
<a href="{{ url('mautic_dynamicContent_index', {'search': searchString}) }}" data-toggle="ajax">
|
||||
<span>{{ 'mautic.core.search.more'|trans({'%count%': remaining}) }}</span>
|
||||
</a>
|
||||
{% else %}
|
||||
<div class="d-flex ai-center">
|
||||
<a class="fg-1" href="{{ url('mautic_dynamicContent_action', {'objectAction': 'view', 'objectId': item.id}) }}" data-toggle="ajax">
|
||||
<span class="fw-sb">{{ item.name }}</span>
|
||||
{{- include('@MauticCore/Helper/publishstatus_badge.html.twig', {
|
||||
'entity': item,
|
||||
'status': item.getPublishUp() is not null ? 'active' : 'available',
|
||||
'simplified': 'true'
|
||||
}) -}}
|
||||
</a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,8 @@
|
||||
{% set data = event.extra.stat.sentDetails %}
|
||||
|
||||
{% if data.failed is not defined and data.timeline is defined %}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{ 'mautic.dynamicContent.timeline.content'|trans }}</dt>
|
||||
<dd>{{ data.timeline|trans }}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,27 @@
|
||||
<!-- Dynamic Content tokens -->
|
||||
<li class="panel">
|
||||
<a role="button" id="headingDynamicContentTokens" class="accordion-heading collapsed" data-toggle="collapse"
|
||||
data-parent="#tokensAccordion" href="#collapseDynamicContentTokens" aria-expanded="false"
|
||||
aria-controls="collapseDynamicContentTokens">
|
||||
<i class="ri-arrow-down-s-line accordion-arrow"></i>
|
||||
<span class="accordion-title">{{ 'mautic.placeholder_tokens.dynamic_content_tokens'|trans }}</span>
|
||||
</a>
|
||||
<div id="collapseDynamicContentTokens" class="collapse accordion-wrapper" role="tabpanel"
|
||||
aria-labelledby="headingDynamicContentTokens">
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'mautic.placeholder_tokens.variable_name'|trans }}</th>
|
||||
<th>{{ 'mautic.placeholder_tokens.variable_syntax'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.dynamic_content.example'|trans }}</td>
|
||||
<td><code>{dynamiccontent="Dynamic Content 1"}</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
Reference in New Issue
Block a user