Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
{% extends '@MauticForm/Action/base_form_action.html.twig' %}
|
||||
|
||||
{% block action_label %}
|
||||
{% include '@MauticCore/Helper/_tag.html.twig' with {
|
||||
tags: [
|
||||
{
|
||||
label: action.properties.integration,
|
||||
icon: 'ri-plug-line',
|
||||
color: 'warm-gray',
|
||||
attributes: securityIsGranted('plugin:plugins:manage') ? {
|
||||
href: path('mautic_plugin_index'),
|
||||
'target': '_blank'
|
||||
} : {}
|
||||
}
|
||||
]
|
||||
} %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,8 @@
|
||||
{% set contentOnly = true %}
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
|
||||
{% block headerTitle '' %}
|
||||
|
||||
{% block content %}
|
||||
{{- assetAddScriptDeclaration('Mautic.handleIntegrationCallback("'~integration~'", "'~csrfToken~'", "'~code~'", "'~callbackUrl~'", "'~clientIdKey~'", "'~clientSecretKey~'");', 'bodyClose') -}}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,36 @@
|
||||
{% set contentOnly = true %}
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
|
||||
{% block mauticContent 'social' %}
|
||||
{% block headerTitle '' %}
|
||||
|
||||
{% block content %}
|
||||
{% set data = data|json_encode %}
|
||||
<script>
|
||||
function postFormHandler() {
|
||||
var opener = window.opener;
|
||||
if (opener && typeof opener.postAuthCallback == 'function') {
|
||||
opener.postAuthCallback({$data});
|
||||
} else {
|
||||
Mautic.refreshIntegrationForm();
|
||||
}
|
||||
window.close()
|
||||
}
|
||||
{% if message is not empty and 'success' is same as alert %}
|
||||
(function() { postFormHandler(); })();
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
{% if message is not empty %}
|
||||
<div class="alert alert-{{ alert }}">
|
||||
{{ message|purify }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
<a class="btn btn-lg btn-primary" href="javascript:void(0);" onclick="postFormHandler();">
|
||||
{{ 'mautic.integration.closewindow'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,226 @@
|
||||
{% block integration_company_fields_row %}
|
||||
{%- set containerId = 'companyFieldsContainer' -%}
|
||||
{%- set numberOfFields = (form.offsetExists('update_mautic_company1')) ? 5 : 4 -%}
|
||||
{%- set object = 'company' -%}
|
||||
{{- block('fields_row') -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block integration_fields_row %}
|
||||
{%- set containerId = 'leadFieldsContainer' -%}
|
||||
{%- set numberOfFields = (form.offsetExists('update_mautic1')) ? 5 : 4 -%}
|
||||
{%- set object = 'lead' -%}
|
||||
{{- block('fields_row') -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block _integration_details_supportedFeatures_row %}
|
||||
{% set attr = form.vars.attr %}
|
||||
{% set builtin = formSettings.builtin_features|default([]) %}
|
||||
{% set showLabel = builtin|length != form.children|length %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{% if showLabel %}
|
||||
<h4 class="mb-sm">{{ form.vars['label']|trans }}</h4>
|
||||
{% endif %}
|
||||
{% if formNotes.supported_features is defined and formNotes.supported_features is not empty %}
|
||||
<div class="alert alert-{{ formNotes['supported_features']['type'] }}">
|
||||
{{ formNotes['supported_features']['note']|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for child in form.children %}
|
||||
{% if child.vars.value not in builtin %}
|
||||
<div class="checkbox" >
|
||||
<label>
|
||||
{{ form_widget(child, {'attr': attr}) }}
|
||||
{{ child.vars.label|trans }}
|
||||
</label>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ child.isRendered() }}
|
||||
<input type="hidden" id="{{ child.vars['id'] }}" name="{{ child.vars['full_name'] }}" value="{{ child.vars['value']|e }}" />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block _integration_details_featureSettings_row %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h4 class="mb-sm mt-lg">
|
||||
{{ form.vars['label']|trans }}
|
||||
</h4>
|
||||
{% if formNotes.features is defined and formNotes.features is not empty %}
|
||||
<div class="alert alert-{{ formNotes['features']['type'] }}">
|
||||
{{ formNotes['features']['note']|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block fields_row %}
|
||||
{#
|
||||
Variables
|
||||
- containerId (required, string)
|
||||
- numberOfFields (required, int)
|
||||
- object (required, string)
|
||||
- form
|
||||
- specialInstructions (optional)
|
||||
If set, `alertType` is required
|
||||
- alertType (conditional)
|
||||
#}
|
||||
{# @var int $numberOfFields #}
|
||||
{%- set rowCount = 0 -%}
|
||||
{%- set indexCount = 1 -%}
|
||||
<div class="row fields-container" id="{{ containerId }}">
|
||||
|
||||
{% if specialInstructions is defined and specialInstructions is not empty %}
|
||||
<div class="alert alert-{{ alertType }}">
|
||||
{{- specialInstructions|trans -}}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form.vars.errors|length > 0 %}
|
||||
<div class="alert alert-danger">
|
||||
{% for error in form.vars.errors %}
|
||||
<p>{{ error.message }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="{{ object }}-field form-group col-xs-12">
|
||||
<div class="row">
|
||||
<div class="mb-xs col-sm-{{ (5 == numberOfFields) ? 5 : 6 }} text-center"><h4>{{ 'mautic.plugins.integration.fields'|trans }}</h4></div>
|
||||
{% if 5 == numberOfFields -%}
|
||||
<div class="col-sm-2"></div>
|
||||
{%- endif %}
|
||||
<div class="mb-xs col-sm-{{ (5 == numberOfFields) ? 5 : 6 }} text-center"><h4>{{ 'mautic.plugins.mautic.fields'|trans }}</h4></div>
|
||||
</div>
|
||||
{% for child in form.children %}
|
||||
{% set selected = false %}
|
||||
{% set isRequired = child.vars.attr['data-required'] is defined and child.vars.attr['data-required'] is not same as 0 %}
|
||||
{% if rowCount is divisible by(numberOfFields) %}
|
||||
<div id="{{ object }}-{{ rowCount }}" class="field-container row {% if 5 != numberOfFields %}pb-md{% endif %}">
|
||||
{% endif %}
|
||||
{% set rowCount = rowCount + 1 %}
|
||||
{% if 'hidden' == child.vars.block_prefixes[1] %}
|
||||
{{ form_row(child) }}
|
||||
{% else %}
|
||||
{% set class = '' %}
|
||||
{% set remainder = rowCount % numberOfFields %}
|
||||
{% if 1 == remainder or 3 == remainder %}
|
||||
{% set class = (5 == numberOfFields) ? 'col-sm-5' : 'col-sm-6' %}
|
||||
{% elseif 2 == remainder %}
|
||||
{% set class = (5 == numberOfFields) ? 'col-sm-2' : 'col-sm-6' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if ('label_' ~ indexCount) == child.vars.name %}
|
||||
{% if isRequired %}
|
||||
{% set name = child.vars.full_name %}
|
||||
<input type="hidden" value="{{ child.vars['attr']['data-label'] }}" name="{{ name }}" />
|
||||
{% endif %}
|
||||
<div class="pl-xs pr-xs {{ class }} {% if isRequired %}has-error{% endif %}">
|
||||
<div class="placeholder" data-placeholder="{{ child.vars.attr.placeholder }}">
|
||||
<input type="text"
|
||||
id="{{ child.vars.id }}"
|
||||
name="{{ child.vars.full_name }}"
|
||||
class="{{ child.vars.attr.class }}"
|
||||
value="{{ child.vars.attr['data-label']|default('')|e }}" readonly />
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{%- if 'update_mautic' in child.vars.name -%}
|
||||
<div class="pr-xs {{ class }}" style="padding-left: 8px;" data-toggle="tooltip" title="{{ 'mautic.plugin.direction.data.update'|trans }}">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12 ">
|
||||
<div class="choice-wrapper">
|
||||
<div class="btn-group btn-block" data-toggle="buttons" {% if child.vars['attr']['forceDirection'] %}data-force-direction="1"{% endif %}>
|
||||
{% set checked = '0' == child.vars.value %}
|
||||
<label class="btn-arrow{{ indexCount }} btn btn-ghost {% if checked %}active{% endif %} {% if child.vars['attr']['disabled'] %}disabled{% endif %}">
|
||||
<input type="radio"
|
||||
id="{{ child.vars['id'] }}_0"
|
||||
name="{{ child.vars['full_name'] }}"
|
||||
title=""
|
||||
autocomplete="false"
|
||||
value="0"
|
||||
onchange="Mautic.matchedFields({{ indexCount }}, '{{ object }}', '{{ integration }}')"
|
||||
{% if checked %}checked="checked"{% endif %}
|
||||
{% if child.vars['attr']['disabled'] %}disabled{% endif %}>
|
||||
<btn class="btn-nospin ri-arrow-left-circle-line"></btn>
|
||||
</label>
|
||||
{% set checked = '1' == child.vars.value %}
|
||||
<label class="btn-arrow{{ indexCount }} btn btn-ghost {% if checked %}active{% endif %} {% if child.vars['attr']['disabled'] %}disabled{% endif %}">
|
||||
<input type="radio" id="{{ child.vars['id'] }}_1"
|
||||
name="{{ child.vars['full_name'] }}"
|
||||
title=""
|
||||
autocomplete="false"
|
||||
value="1"
|
||||
onchange="Mautic.matchedFields({{ indexCount }}, '{{ object }}', '{{ integration }}')"
|
||||
{% if '1' == child.vars['value'] %}checked="checked"{% endif %}
|
||||
{% if child.vars['attr']['disabled'] %}disabled{% endif %}>
|
||||
<btn class="btn-nospin ri-arrow-right-circle-line"></btn>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{% if ('m_' ~ indexCount) == child.vars.name %}
|
||||
<div class="pl-xs pr-xs {{ class }}">
|
||||
{% if isRequired %}<div class="has-errors">{% endif %}
|
||||
<select id="{{ child.vars.id }}"
|
||||
name="{{ child.vars.full_name }}"
|
||||
class="{{ child.vars.attr.class }}"
|
||||
data-placeholder=""
|
||||
autocomplete="false" onchange="Mautic.matchedFields({{ indexCount }}, '{{ object }}', '{{ integration }}')">
|
||||
<option value=""></option>
|
||||
{%- set mauticChoices = child.vars.attr['data-choices'] -%}
|
||||
{% for keyLabel, options in mauticChoices %}
|
||||
{% if options is iterable %}
|
||||
<optgroup label="{{ keyLabel }}">
|
||||
{% for optionLabel, keyValue in options %}
|
||||
<option value="{{ keyValue|e }}" {% if keyValue == child.vars.data %}selected{% set selected = true %}{% elseif selected is defined and selected is empty and '-1' == keyValue %}selected{% endif %}>
|
||||
{{- optionLabel|trans -}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% else %}
|
||||
<option value="{{ options|e }}"{% if options == child.vars.data %}selected{% set selected = true %}{% elseif selected is defined and selected is empty and '-1' == options %}selected{% endif %}>
|
||||
{{- keyLabel|trans -}}
|
||||
</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if isRequired %}</div>{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if rowCount is divisible by(numberOfFields) %}
|
||||
</div>
|
||||
{% set indexCount = indexCount + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if (indexCount - 1) < totalFields %}
|
||||
<div class="panel-footer">
|
||||
{{ include('@MauticCore/Helper/pagination.html.twig', {
|
||||
'page': page,
|
||||
'fixedPages': fixedPageNum,
|
||||
'fixedLimit': true,
|
||||
'target': '#IntegrationEditModal',
|
||||
'totalItems': totalFields,
|
||||
'jsCallback': 'Mautic.getIntegrationFields',
|
||||
'jsArguments': [
|
||||
{
|
||||
'object': object,
|
||||
'integration': integration,
|
||||
},
|
||||
],
|
||||
}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,166 @@
|
||||
{#
|
||||
Variables
|
||||
- form
|
||||
- description
|
||||
- formSettings
|
||||
- formNotes
|
||||
- callbackUrl
|
||||
- activeTab
|
||||
- formThemes (array)
|
||||
May include one or more form themes that need to be applied
|
||||
#}
|
||||
{%- form_theme form with formThemes -%}
|
||||
<!-- form themes: {{ formThemes|join(', ') }} -->
|
||||
{%- set nSupportedFeatures = form.supportedFeatures is defined ? form.supportedFeatures|length : 0 -%}
|
||||
{%- set hasSupportedFeatures = nSupportedFeatures > 0 -%}
|
||||
{%- set nFeatureSettings = form.featureSettings is defined ? form.featureSettings|length : 0 -%}
|
||||
{%- set hasFields = ((formSettings.dynamic_contact_fields is defined and formSettings.dynamic_contact_fields is not empty) or form.featureSettings is defined) and form.featureSettings.leadFields|length > 0
|
||||
-%}
|
||||
{# Unset if set to prevent features tab from showing when there's no feature to show #}
|
||||
{%- if not hasFields %}{% do form.featureSettings.leadFields.setRendered() %}{% set nFeatureSettings = nFeatureSettings - 1 %}{% endif -%}
|
||||
{%- set hideContactFieldTab = (hasFields and formSettings.dynamic_contact_fields is defined and formSettings.dynamic_contact_fields is not empty and form.featureSettings.leadFields|length == 0) -%}
|
||||
{%- set hasFeatureSettings = (
|
||||
form.featureSettings is defined
|
||||
and (
|
||||
(hasFields and nFeatureSettings > 1)
|
||||
or
|
||||
(not hasFields and nFeatureSettings > 0)
|
||||
)
|
||||
) -%}
|
||||
{%- if not hasFeatureSettings and form.featureSettings is defined %}{% do form.featureSettings.setRendered() %}{% endif -%}
|
||||
{%- set hasCompanyFields = form.featureSettings.companyFields is defined and form.featureSettings.companyFields|length > 0 -%}
|
||||
{%- set companyFieldHtml = hasCompanyFields ? form_row(form.featureSettings.companyFields) : '' -%}
|
||||
{%- set fieldHtml = hasFields ? form_row(form.featureSettings.leadFields) -%}
|
||||
{%- set fieldLabel = hasFields ? form.featureSettings.leadFields.vars.label -%}
|
||||
{%- set fieldTabClass = (hasFields and hideContactFieldTab == false) ?: 'hide' -%}
|
||||
{%- set hasLeadFieldErrors = hasFields and formContainsErrors(form.featureSettings.leadFields) -%}
|
||||
{%- set hasCompanyFieldErrors = hasCompanyFields and formContainsErrors(form.featureSettings.companyFields) -%}
|
||||
{%- if form.featureSettings.leadFields is defined %}{% do form.featureSettings.leadFields.setRendered() %}{% endif -%}
|
||||
{%- if form.featureSettings.companyFields is defined %}{% do form.featureSettings.companyFields.setRendered() %}{% endif -%}
|
||||
|
||||
{%- if description is not empty -%}
|
||||
<div class="alert alert-info">
|
||||
{{- description|purify -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
<!-- tabs controls -->
|
||||
<ul class="nav nav-tabs nav-tabs-line">
|
||||
<li class="{% if 'details-container' == activeTab %}active{% endif %}" id="details-tab">
|
||||
<a href="#details-container" role="tab" data-toggle="tab">{{ 'mautic.plugin.integration.tab.details'|trans }}</a>
|
||||
</li>
|
||||
|
||||
{%- if hasSupportedFeatures or hasFeatureSettings -%}
|
||||
<li class="" id="features-tab">
|
||||
<a href="#features-container" role="tab" data-toggle="tab">
|
||||
{{- 'mautic.plugin.integration.tab.features'|trans -}}
|
||||
{%- if (hasSupportedFeatures and formContainsErrors(form.supportedFeatures)) or (hasFeatureSettings and formContainsErrors(form.featureSettings, ['leadFields'])) -%}
|
||||
<i class="ri-fw ri-alert-fill text-danger"></i>
|
||||
{%- endif -%}
|
||||
</a>
|
||||
</li>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if hasFields -%}
|
||||
<li class="{{ fieldTabClass }} {% if 'leadFieldsContainer' == activeTab %}active{% endif %}" id="fields-tab">
|
||||
<a href="#fields-container" role="tab" data-toggle="tab">
|
||||
{{- 'mautic.plugin.integration.tab.fieldmapping'|trans -}}
|
||||
{%- if hasLeadFieldErrors -%}
|
||||
<i class="ri-fw ri-alert-fill text-danger"></i>
|
||||
{%- endif -%}
|
||||
</a>
|
||||
</li>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if companyFieldHtml is not empty -%}
|
||||
<li class="{{ fieldTabClass }} {% if 'companyFieldsContainer' == activeTab %}active{% endif %}" id="company-fields-tab">
|
||||
<a href="#company-fields-container" role="tab" data-toggle="tab">
|
||||
{{- 'mautic.plugin.integration.tab.companyfieldmapping'|trans -}}
|
||||
{%- if hasCompanyFieldErrors -%}
|
||||
<i class="ri-fw ri-alert-fill text-danger"></i>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{%- endif -%}
|
||||
</ul>
|
||||
<!--/ tabs controls -->
|
||||
|
||||
{{- form_start(form) -}}
|
||||
<div class="tab-content pa-md">
|
||||
<div class="tab-pane fade {% if 'details-container' == activeTab %}in active{% endif %} bdr-w-0" id="details-container">
|
||||
{{- form_row(form.isPublished) -}}
|
||||
{%- if form.virtual is defined %}{{ form_row(form.virtual) }}{% endif %}
|
||||
{%- if form.apiKeys is defined -%}
|
||||
{{- form_row(form.apiKeys) -}}
|
||||
{%- if formNotes.authorization is defined -%}
|
||||
<div class="alert alert-{{ formNotes.authorization.type }}">
|
||||
{{- formNotes.authorization.note|purify -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
<div class="row">
|
||||
{%- if form.apiKeys|length > 0 and callbackUrl is not empty -%}
|
||||
<div class="well well-sm">
|
||||
{{- 'mautic.integration.callbackuri'|trans }}<br/>
|
||||
{{ include('@MauticCore/Components/code-snippet.html.twig', {
|
||||
variant: 'single',
|
||||
innerText: callbackUrl,
|
||||
className: 'layer-two mt-sm'
|
||||
}) }}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
|
||||
{%- if form.authButton is defined -%}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
{{- form_widget(form.authButton, {'attr': {'class': 'btn btn-success btn-lg'}}) -}}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if formNotes.custom is defined -%}
|
||||
{%- if formNotes.custom is string -%}
|
||||
{{ formNotes.custom|purify }}
|
||||
{%- elseif formNotes.custom.custom is defined and formNotes.custom.template is string -%}
|
||||
<!-- start: "{{ formNotes.custom.template }}" -->
|
||||
{{ include(formNotes.custom.template, formNotes.custom.parameters|default([]), ignore_missing=true) }}
|
||||
<!-- end: "{{ formNotes.custom.template }}" -->
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
|
||||
{%- if hasSupportedFeatures or hasFeatureSettings -%}
|
||||
<div class="tab-pane fade bdr-w-0" id="features-container">
|
||||
{%- if hasSupportedFeatures -%}
|
||||
{{- form_row(form.supportedFeatures, {
|
||||
'formSettings': formSettings,
|
||||
'formNotes': formNotes,
|
||||
}) -}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if hasFeatureSettings -%}
|
||||
{{ form_row(form.featureSettings, {
|
||||
'formSettings': formSettings,
|
||||
'formNotes': formNotes,
|
||||
}) -}}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if hasFields -%}
|
||||
<div class="tab-pane fade {% if 'leadFieldsContainer' == activeTab %}in active{% endif %} bdr-w-0" id="fields-container">
|
||||
<h4 class="mb-sm">{{ fieldLabel|trans }}</h4>
|
||||
{{- fieldHtml|raw -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if hasCompanyFields -%}
|
||||
<div class="tab-pane fade {% if 'companyFieldsContainer' == activeTab %}in active{% endif %} bdr-w-0" id="company-fields-container">
|
||||
<h4 class="mb-sm">{{ 'mautic.integration.companyfield_matches'|trans }}</h4>
|
||||
{{- companyFieldHtml|raw -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
@@ -0,0 +1,102 @@
|
||||
{#
|
||||
Variables
|
||||
- items
|
||||
- tmpl
|
||||
- pluginFilter
|
||||
- plugins
|
||||
#}
|
||||
{% set isIndex = ('index' == tmpl) %}
|
||||
{% set tmpl = 'list' %}
|
||||
{% set filterValue = pluginFilter.id|default(null) %}
|
||||
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||
|
||||
{% block mauticContent 'integration' %}
|
||||
|
||||
{% block headerTitle %}
|
||||
{{ 'mautic.plugin.manage.plugins'|trans }} {% if pluginFilter %}- {{ pluginFilter.name }}{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{{ include('@MauticCore/Helper/page_actions.html.twig', {
|
||||
'customButtons': [
|
||||
{
|
||||
'attr': {
|
||||
'data-toggle': 'ajax',
|
||||
'href': path('mautic_plugin_reload'),
|
||||
'class': 'btn btn-primary'
|
||||
},
|
||||
'btnText': 'mautic.plugin.reload.plugins'|trans,
|
||||
'iconClass': 'ri-instance-fill',
|
||||
'tooltip': 'mautic.plugin.reload.plugins.tooltip',
|
||||
},
|
||||
],
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if isIndex %}
|
||||
<div id="page-list-wrapper" class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="box-layout">
|
||||
<div class="row">
|
||||
<div class="col-xs-3 va-m">
|
||||
<select id="integrationFilter" onchange="Mautic.filterIntegrations(true);"
|
||||
class="form-control"
|
||||
data-placeholder="{{ 'mautic.integration.filter.all'|trans }}">
|
||||
<option value=""></option>
|
||||
{% for plugin in plugins %}
|
||||
<option {% if filterValue is same as(plugin.id) %}selected{% endif %} value="{{ plugin.id|e }}">
|
||||
{{- plugin.name -}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-list">
|
||||
{% endif %}
|
||||
|
||||
{% if items|length > 0 %}
|
||||
<div class="pa-md">
|
||||
<div class="row shuffle-integrations native-integrations">
|
||||
{% for item in items %}
|
||||
{% if item.plugin in plugins|keys %}
|
||||
{% set pluginTitle = plugins[item.plugin].name ~ ' - ' ~ item.display %}
|
||||
{% else %}
|
||||
{% set pluginTitle = item.name ~ ' - ' ~ item.display %}
|
||||
{% endif %}
|
||||
<div class="shuffle shuffle-item grid ma-10 pull-left text-center integration plugin{{ item.plugin }} integration-{{ item.name }} {% if not item.enabled %}integration-disabled{% endif %}">
|
||||
<div class="panel ovf-h pa-10">
|
||||
<a href="{{ path((item.isBundle ? 'mautic_plugin_info' : 'mautic_plugin_config'), {'name': item.name}) }}"
|
||||
{% if item.isBundle %}data-footer="false"{% endif %}
|
||||
data-prevent-dismiss="true"
|
||||
data-toggle="ajaxmodal"
|
||||
data-target="#IntegrationEditModal"
|
||||
data-header="{{ item.display }}">
|
||||
<p><img style="height: 78px;" class="img img-responsive" src="{{ getAssetUrl(item.icon) }}" /></p>
|
||||
<h5 class="mt-20">
|
||||
<span class="ellipsis" data-toggle="tooltip" title="{{ pluginTitle }}">{{ item.display }}</span>
|
||||
</h5>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{{ include('@MauticCore/Helper/modal.html.twig', {
|
||||
'id': 'IntegrationEditModal',
|
||||
'footerButtons': true,
|
||||
}) }}
|
||||
{% else %}
|
||||
{{ include('@MauticCore/Helper/noresults.html.twig', {
|
||||
'message': 'mautic.integrations.noresults',
|
||||
'tip': 'mautic.integration.noresults.tip',
|
||||
}) }}
|
||||
{% endif %}
|
||||
|
||||
{% if isIndex %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,22 @@
|
||||
{#
|
||||
Variables
|
||||
- bundle
|
||||
- icon
|
||||
#}
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<img class="img img-responsive" style="margin: auto;" src="{{ getAssetUrl(icon) }}" />
|
||||
</div>
|
||||
|
||||
<div class="col-xs-8">
|
||||
<h3>{{ bundle.primaryDescription|purify }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if bundle.hasSecondaryDescription %}
|
||||
<div class="row mt-lg">
|
||||
<div class="col-xs-12">
|
||||
{{ bundle.secondaryDescription|purify }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user