Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<div id="compose-tweet">
|
||||
<div id="character-count" class="text-right small">
|
||||
{{ 'mautic.social.twitter.tweet.count'|trans }}
|
||||
<span></span>
|
||||
</div>
|
||||
{{ form_row(form.tweet_text) }}
|
||||
|
||||
<div class="row">
|
||||
<div id="handle" class="col-md-2">
|
||||
<label class="control-label">
|
||||
{{ 'mautic.social.twitter.tweet.handle'|trans }}
|
||||
</label>
|
||||
{{ form_row(form.handle) }}
|
||||
</div>
|
||||
|
||||
<div id="asset" class="col-md-5">
|
||||
{{ form_row(form.asset_link) }}
|
||||
</div>
|
||||
|
||||
<div id="page" class="col-md-5">
|
||||
{{ form_row(form.page_link) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ includeScript('plugins/MauticSocialBundle/Assets/js/social.js', 'composeSocialWatcher', 'composeSocialWatcher') }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{% block _config_social_config_widget %}
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'mautic.config.tab.social_config'|trans }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% for f in form.children %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ form_row(f) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
{{ form_row(form.custom) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
{{ form_row(form.handle) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
{{ form_row(form.checknames) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
{{ form_row(form.hashtag) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
{{ form_row(form.checknames) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<div id="compose-tweet">
|
||||
<div id="character-count" class="text-right small">
|
||||
{{ 'mautic.social.twitter.tweet.count'|trans }}
|
||||
<span></span>
|
||||
</div>
|
||||
{{ form_row(form.tweet_text) }}
|
||||
|
||||
<div class="row">
|
||||
<div id="handle" class="col-md-2">
|
||||
<label class="control-label">
|
||||
{{ 'mautic.social.twitter.tweet.handle'|trans }}
|
||||
</label>
|
||||
{{ form_row(form.handle) }}
|
||||
</div>
|
||||
|
||||
<div id="asset" class="col-md-5">
|
||||
{{ form_row(form.asset_link) }}
|
||||
</div>
|
||||
|
||||
<div id="page" class="col-md-5">
|
||||
{{ form_row(form.page_link) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ includeScript('plugins/MauticSocialBundle/Assets/js/social.js', 'composeSocialWatcher', 'composeSocialWatcher') }}
|
||||
@@ -0,0 +1,8 @@
|
||||
{% import '@MauticSocial//macros.html.twig' as social %}
|
||||
<div class="media">
|
||||
{{ social.profileImage(profile) }}
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{ profile.name }}</h4>
|
||||
<p class="text-secondary"><a href="https://facebook.com/{{ profile.profileHandle }}" target="_blank">{{ profile.profileHandle }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="panel-body">
|
||||
{{ include('@MauticSocial/Integration/Facebook/Profile/profile.html.twig', {
|
||||
'lead': lead,
|
||||
'profile': details.profile,
|
||||
}) }}
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
{% set locale = app.request.locale %}
|
||||
{% set settings = field.properties|default([]) %}
|
||||
{% set layout = settings.layout|default('standard') %}
|
||||
{% set action = settings.action|default('like') %}
|
||||
{% set showFaces = settings.showFaces is not empty ? 'true' : 'false' %}
|
||||
{% set showShare = settings.showShare is not empty ? 'true' : 'false' %}
|
||||
{% set clientId = settings.keys.clientId|default('') %}
|
||||
|
||||
{# add FB's required OG tag #}
|
||||
<meta property="og:type" content="website" />
|
||||
<div class="fb-{% if 'share' == action %}share-button{% else %}like{% endif %} share-button facebook-share-button layout-{{ layout }} action-{{ action }}"
|
||||
data-{% if 'share' == action %}type{% else %}layout{% endif %}="{{ layout }}"
|
||||
{% if 'share' != action %}
|
||||
data-action="{{ action }}"
|
||||
data-show-faces="{{ showFaces }}"
|
||||
data-share="{{ showShare }}"
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = '//connect.facebook.net/{$locale}/sdk.js#xfbml=1&appId={{ clientId }}&version=v2.0';
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
@@ -0,0 +1,17 @@
|
||||
{% import '@MauticSocial//macros.html.twig' as social %}
|
||||
{% set tableFields = ['gender', 'homeCity', 'bio'] %}
|
||||
<div class="media">
|
||||
{{ social.profileImage(profile) }}
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{ profile.firstName }} {{ profile.lastName }}</h4>
|
||||
<p class="text-secondary"><a href="https://foursquare.com/user/{{ profile.profileHandle }}" target="_blank">{{ profile.profileHandle }}</a></p>
|
||||
<table class="table table-condensed">
|
||||
{% for t in tableFields|filter(v => profile[v] is defined and profile[v] is not empty) %}
|
||||
<tr>
|
||||
<td>{{ translatorConditional('mautic.integration.common.' ~ t, 'mautic.integration.Foursquare.' ~ t) }}</td>
|
||||
<td>{{ profile[t] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<ul class="list-group">
|
||||
{% for item in activity %}
|
||||
<li class="bdr-w-0 list-group-item">
|
||||
<h4 class="mt-10 mb-10 pb-10"><i class="ri-check-line-circle-o"></i> {{ item.tipText }}</h4>
|
||||
<p class="alert alert-warning">
|
||||
{{ item.venueName }}<br />
|
||||
{% for l in item.venueLocation %}
|
||||
{{ l }}<br />
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p class="text-secondary"><i class="ri-time-line"></i> {{ dateToFull(item.createdAt, 'UTC', 'U') }}</p>
|
||||
{% if not loop.first %}<hr />{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="panel-toolbar np">
|
||||
<ul class="nav nav-tabs nav-tabs-contained">
|
||||
<li class="active">
|
||||
<a href="#FoursquareProfile" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.profile'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#FoursquareTips" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.foursquare.tips'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="np panel-body tab-content">
|
||||
<div class="pa-20 tab-pane active" id="FoursquareProfile">
|
||||
{{ include('@MauticSocial/Integration/Foursquare/Profile/profile.html.twig', {
|
||||
'lead': lead,
|
||||
'profile': details.profile,
|
||||
}) }}
|
||||
</div>
|
||||
<div class="tab-pane" id="FoursquareTips">
|
||||
{{ include('@MauticSocial/Integration/Foursquare/Profile/tips.html.twig', {
|
||||
'lead': lead,
|
||||
'activity': details.activity.tips|default([]),
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div class="container-fluid">
|
||||
<div class="img-grid row">
|
||||
{% for a in activity %}
|
||||
{% if loop.index0 is divisible by(3) %}</div><div class="row">{% endif %}
|
||||
<div class="col-xs-4 social-image">
|
||||
<a href="javascript: void(0);" onclick="Mautic.showSocialMediaImageModal('{{ a.url }}');">
|
||||
<img class="img-responsive img-thumbnail" src="{{ a.url }}" />
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
{% import '@MauticSocial//macros.html.twig' as social %}
|
||||
<div class="media">
|
||||
{{ social.profileImage(profile) }}
|
||||
<div class="media-body">
|
||||
<h4 class="media-title">{{ profile.full_name }}</h4>
|
||||
<p><a href="https://instagram.com/{{ profile.profileHandle }}" target="_blank">{{ profile.profileHandle }}</a></p>
|
||||
<p class="text-secondary">
|
||||
{{ profile.website }}
|
||||
</p>
|
||||
<p class="text-secondary">
|
||||
{{ profile.bio }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
<div class="panel-toolbar np">
|
||||
<ul class="nav nav-tabs nav-tabs-contained">
|
||||
<li class="active">
|
||||
<a href="#InstagramProfile" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.profile'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#InstagramPhotos" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.photos'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="np panel-body tab-content">
|
||||
<div class="pa-20 tab-pane active" id="InstagramProfile">
|
||||
{{ include('@MauticSocial/Integration/Instagram/Profile/profile.html.twig', {
|
||||
'profile': details.profile,
|
||||
}) }}
|
||||
</div>
|
||||
<div class="pa-20 tab-pane" id="InstagramPhotos">
|
||||
{{ include('@MauticSocial/Integration/Instagram/Profile/photos.html.twig', {
|
||||
'activity': details.activity.photos|default([]),
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
{% import '@MauticSocial//macros.html.twig' as social %}
|
||||
<div class="media">
|
||||
{{ social.profileImage(profile) }}
|
||||
<div class="media-body">
|
||||
<h4 class="media-title">{{ profile.formattedName }}</h4>
|
||||
<p><a href="https://www.linkedin.com/{{ profile.profileHandle }}" target="_blank">{{ profile.profileHandle }}</a></p>
|
||||
<p class="text-secondary">
|
||||
{{ profile.headline }}
|
||||
</p>
|
||||
<p class="text-secondary">
|
||||
{{ profile.summary }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
<div class="panel-toolbar np">
|
||||
<ul class="nav nav-tabs nav-tabs-contained">
|
||||
<li class="active">
|
||||
<a href="#LinkedInProfile" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.profile'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#LinkedInPhotos" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.photos'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="np panel-body tab-content">
|
||||
<div class="pa-20 tab-pane active" id="LinkedInProfile">
|
||||
{{ include('@MauticSocial/Integration/LinkedIn/Profile/profile.html.twig', {
|
||||
'profile': details.profile,
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
{% set locale = app.request.locale %}
|
||||
{% set counter = settings.counter|default('none') %}
|
||||
<div class="share-button linkedin-share-button layout-{{ counter }}">
|
||||
<script type="IN/Share" {% if 'none' != counter %}data-counter="{{ settings.counter }}"{% endif %}></script>
|
||||
</div>
|
||||
<script src="//platform.linkedin.com/in.js" type="text/javascript">
|
||||
lang: {{ locale }}
|
||||
</script>
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="container-fluid">
|
||||
<div class="img-grid row">
|
||||
{% for a in activity %}
|
||||
{% if not loop.first and loop.index0 is divisible by(3) %}</div><div class="row">{% endif %}
|
||||
<div class="col-xs-4 social-image">
|
||||
<a href="javascript: void(0);" onclick="Mautic.showSocialMediaImageModal('{{ a.url }}');"><img class="img-responsive img-thumbnail" src="{{ a.url }}" /></a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
{% import '@MauticSocial//macros.html.twig' as social %}
|
||||
<div class="media">
|
||||
{{ social.profileImage(profile) }}
|
||||
<div class="media-body">
|
||||
<h4 class="media-title">{{ profile.name }}</h4>
|
||||
<p><a href="https://twitter.com/{{ profile.profileHandle }}" target="_blank">{{ profile.profileHandle }}</a></p>
|
||||
<p class="text-secondary">
|
||||
{{ profile.location }}
|
||||
</p>
|
||||
<p class="text-secondary">
|
||||
{{ profile.description|purify }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<ul class="twitter-tags tag-cloud">
|
||||
{% for tag, t in activity %}
|
||||
{% if (t.count / 10) < 1 %}
|
||||
{% set fontSize = (t.count / 10) + 1 %}
|
||||
{% elseif (t.count / 10) > 2 %}
|
||||
{% set fontSize = 2 %}
|
||||
{% else %}
|
||||
{% set fontSize = t.count / 10 %}
|
||||
{% endif %}
|
||||
<li style="font-size: {{ fontSize }}em"><a href="{{ t.url }}" target="_new">{{ tag }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -0,0 +1,10 @@
|
||||
<ul class="list-group">
|
||||
{% for item in activity %}
|
||||
{% set border = 'bdr-b bdr-l-wdh-0 bdr-r-wdh-0' %}
|
||||
{% if loop.first or loop.last %}{% set border = 'bdr-w-0' %}{% endif %}
|
||||
<li class="{{ border }} pa-15 list-group-item">
|
||||
<p>{{ item.tweet }}</p>
|
||||
<span class="text-secondary"><i class="ri-time-line"></i> {{ dateToFull(item.published) }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -0,0 +1,50 @@
|
||||
<div class="panel-toolbar np">
|
||||
<ul class="nav nav-tabs nav-tabs-contained">
|
||||
<li class="active">
|
||||
<a href="#TwitterProfile" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.profile'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#TwitterTweets" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.twitter.tweets'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#TwitterPhotos" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.photos'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#TwitterTags" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.lead.social.tags'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="np panel-body tab-content">
|
||||
<div class="pa-20 tab-pane active" id="TwitterProfile">
|
||||
{{ include('@MauticSocial/Integration/Twitter/Profile/profile.html.twig', {
|
||||
'lead': lead,
|
||||
'profile': details.profile,
|
||||
}) }}
|
||||
</div>
|
||||
<div class="tab-pane" id="TwitterTweets">
|
||||
{{ include('@MauticSocial/Integration/Twitter/Profile/tweets.html.twig', {
|
||||
'lead': lead,
|
||||
'activity': details.activity.tweets|default([]),
|
||||
}) }}
|
||||
</div>
|
||||
<div class="pa-20 tab-pane" id="TwitterPhotos">
|
||||
{{ include('@MauticSocial/Integration/Twitter/Profile/photos.html.twig', {
|
||||
'lead': lead,
|
||||
'activity': details.activity.photos|default([]),
|
||||
}) }}
|
||||
</div>
|
||||
<div class="pa-20 tab-pane" id="TwitterTags">
|
||||
{{ include('@MauticSocial/Integration/Twitter/Profile/tags.html.twig', {
|
||||
'lead': lead,
|
||||
'activity': details.activity.tags|default([]),
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class="share-button twitter-share-button layout-{{ settings.count|default('0') }}">
|
||||
<a href="https://twitter.com/share"
|
||||
{% if settings.text is defined and settings.text is not empty %}data-text="{{ settings.text }}"{% endif %}
|
||||
{% if settings.via is defined and settings.via is not empty %}data-via="{{ settings.via }}"{% endif %}
|
||||
{% if settings.related is defined and settings.related is not empty %}data-related="{{ settings.related }}"{% endif %}
|
||||
{% if settings.hashtags is defined and settings.hashtags is not empty %}data-hashtags="{{ settings.hashtags }}"{% endif %}
|
||||
{% if settings.size is defined and settings.size is not empty %}data-size="{{ settings.size }}"{% endif %}
|
||||
{% if settings.count is defined and settings.count is not empty %}data-count="{{ settings.count }}"{% endif %}
|
||||
class="twitter-share-button share-button">{{ 'mautic.integration.Twitter.share.tweet'|trans }}</a>
|
||||
</div>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
@@ -0,0 +1,169 @@
|
||||
{#
|
||||
Varables
|
||||
- field
|
||||
- formName (optional, string)
|
||||
- fieldPage
|
||||
- contactFields
|
||||
- companyFields
|
||||
- inBuilder
|
||||
- fields
|
||||
- inForm (optional, bool)
|
||||
- required (optional, bool)
|
||||
#}
|
||||
{% set defaultInputClass = 'button' %}
|
||||
{% set containerType = 'div-wrapper' %}
|
||||
|
||||
{# start: field_helper #}
|
||||
{% set defaultInputFormClass = defaultInputFormClass|default('') %}
|
||||
{% set defaultLabelClass = defaultLabelClass|default('label') %}
|
||||
{% set formName = formName|default('') %}
|
||||
{% set defaultInputClass = 'mauticform-' ~ defaultInputClass %}
|
||||
{% set defaultLabelClass = 'mauticform-' ~ defaultLabelClass %}
|
||||
{% set containerClass = containerClass|default(containerType) %}
|
||||
{% set order = field.order|default(0) %}
|
||||
{% set validationMessage = '' %}
|
||||
|
||||
{% set inputAttributes = htmlAttributesStringToArray(field.inputAttributes|default('')) %}
|
||||
{% set labelAttributes = htmlAttributesStringToArray(field.labelAttributes|default('')) %}
|
||||
{% set containerAttributes = htmlAttributesStringToArray(field.containerAttributes|default('')) %}
|
||||
|
||||
{% if ignoreName is not defined or (ignoreName is defined and ignoreName is empty) %}
|
||||
{% set inputName = 'mauticform[' ~ field.alias ~ ']' %}
|
||||
{% if field.properties.multiple is defined %}
|
||||
{% set inputName = inputName ~ '[]' %}
|
||||
{% endif %}
|
||||
{% set inputAttributes = inputAttributes|merge({
|
||||
'name': inputName,
|
||||
}) %}
|
||||
{% endif %}
|
||||
|
||||
{% if field.type not in ['checkboxgrp', 'radiogrp', 'textarea'] %}
|
||||
{% set inputAttributes = inputAttributes|merge({
|
||||
'value': field.defaultValue|default(''),
|
||||
}) %}
|
||||
{% endif %}
|
||||
|
||||
{% if ignoreId is not defined or (ignoreId is defined and ignoreId is empty) %}
|
||||
{% set inputAttributes = inputAttributes|merge({
|
||||
'id': 'mauticform_input' ~ formName ~ '_' ~ field.alias,
|
||||
}) %}
|
||||
{% set labelAttributes = labelAttributes|merge({
|
||||
'id': 'mauticform_label' ~ formName ~ '_' ~ field.alias,
|
||||
'for': 'mauticform_input' ~ formName ~ '_' ~ field.alias,
|
||||
}) %}
|
||||
{% endif %}
|
||||
|
||||
{% if field.properties.placeholder is defined and field.properties.placeholder is not empty %}
|
||||
{% set inputAttributes = inputAttributes|merge({
|
||||
'placeholder': field.properties.placeholder,
|
||||
}) %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{# Label and input #}
|
||||
{% if inForm is defined and (true == inForm or inForm is not empty) %}
|
||||
{% if field.type in ['button', 'pagebreak'] %}
|
||||
{% set defaultInputFormClass = defaultInputFormClass ~ ' btn btn-ghost' %}
|
||||
{% endif %}
|
||||
|
||||
{% set labelAttributes = labelAttributes|merge({
|
||||
'class': labelAttributes.class|default([])|merge([defaultLabelClass]),
|
||||
}) %}
|
||||
{% set inputAttributes = inputAttributes|merge({
|
||||
'disabled': 'disabled',
|
||||
'class': inputAttributes.class|default([])|merge([defaultInputClass, defaultInputFormClass]),
|
||||
}) %}
|
||||
{% else %}
|
||||
{% set labelAttributes = labelAttributes|merge({
|
||||
'class': labelAttributes.class|default([])|merge([defaultLabelClass]),
|
||||
}) %}
|
||||
{% set inputAttributes = inputAttributes|merge({
|
||||
'class': inputAttributes.class|default([])|merge([defaultInputClass]),
|
||||
}) %}
|
||||
{% endif %}
|
||||
|
||||
{# Container #}
|
||||
{% set containerAttributes = containerAttributes|merge({
|
||||
'id': 'mauticform' ~ formName|default('') ~ '_' ~ id,
|
||||
'class': containerAttributes.class|default([])|merge([
|
||||
'mauticform-row',
|
||||
'mauticform-' ~ containerClass,
|
||||
'mauticform-field-' ~ order,
|
||||
]),
|
||||
}) %}
|
||||
{% if field.parent and fields[field.parent] is defined %}
|
||||
{% set values = field.conditions.values|join('|') %}
|
||||
|
||||
{% if field.conditions.any is not empty and 'notIn' != field.conditions.expr %}
|
||||
{% set values = '*' %}
|
||||
{% endif %}
|
||||
|
||||
{% set containerAttributes = containerAttributes|merge({
|
||||
'data-mautic-form-show-on': fields[field.parent].alias ~ ':' ~ values,
|
||||
'data-mautic-form-expr': field.conditions.expr,
|
||||
'class': containerAttributes.class|merge([
|
||||
'mauticform-field-hidden',
|
||||
]),
|
||||
}) %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{# Field is required #}
|
||||
{% if field.isRequired is defined and field.isRequired %}
|
||||
{% set required = true %}
|
||||
{% set validationMessage = field.validationMessage %}
|
||||
{% if validationMessage is empty %}
|
||||
{% set validationMessage = 'mautic.form.field.generic.required'|trans([], 'validators') %}
|
||||
{% endif %}
|
||||
{% set containerAttributes = containerAttributes|merge({
|
||||
'class': containerAttributes.class|default([])|merge([
|
||||
'mauticform-required',
|
||||
]),
|
||||
'data-validate': field.alias,
|
||||
'data-validation-type': field.type,
|
||||
}) %}
|
||||
{% if field.properties.multiple is defined and field.properties.multiple is not empty %}
|
||||
{% set containerAttributes = containerAttributes|merge({
|
||||
'data-validate-multiple': 'true',
|
||||
}) %}
|
||||
{% endif %}
|
||||
{% elseif required is defined and true == required %}
|
||||
{# Forced to be required #}
|
||||
{% set containerAttributes = containerAttributes|merge({
|
||||
'class': containerAttributes.class|default([])|merge([
|
||||
'mauticform-required',
|
||||
]),
|
||||
}) %}
|
||||
{% endif %}
|
||||
{# end: field_helper #}
|
||||
|
||||
{% set action = app.request.get('objectAction') %}
|
||||
{% set settings = field.properties %}
|
||||
|
||||
{% set integrations = [] %}
|
||||
{% if settings.integrations is defined and settings.integrations is not empty %}
|
||||
{% set integrations = settings.integrations[0:-1]|split(',') %}
|
||||
{% endif %}
|
||||
|
||||
{% set formName = formName|replace({'_': ''})|default('mauticform') %}
|
||||
|
||||
<script src="{{ url('mautic_social_js_generate', {'formName': formName}) }}" type="text/javascript" charset="utf-8" async="async"></script>
|
||||
<div {% for attrName, attrValue in containerAttributes %}{{ attrName }}="{% if attrValue is iterable %}{{ attrValue|join(' ') }}{% else %}{{ attrValue }}{% endif %}"{% endfor %}>
|
||||
{% if inForm is defined and (true == inForm or inForm is not empty) %}
|
||||
{{ include('@MauticForm/Builder/_actions.html.twig', {
|
||||
'deleted': false,
|
||||
'id': id,
|
||||
'formId': formId,
|
||||
'formName': formName,
|
||||
'disallowDelete': false,
|
||||
}, with_context=false) }}
|
||||
{% endif %}
|
||||
|
||||
{% if field.showLabel %}<label {% for attrName, attrValue in labelAttributes %}{{ attrName }}="{% if attrValue is iterable %}{{ attrValue|join(' ') }}{% else %}{{ attrValue }}{% endif %}"{% endfor %}>{{ field.label }}</label>{% endif %}
|
||||
|
||||
{% for integration in integrations %}
|
||||
{% if settings.buttonImageUrl is defined and settings.buttonImageUrl is not empty and integration is not empty %}
|
||||
<a href="#" onclick="openOAuthWindow('{{ settings['authUrl_' ~ integration ~ ''] }}')"><img src="{{ settings['buttonImageUrl'] }}btn_{{ integration }}.png"></a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -0,0 +1,81 @@
|
||||
{% if items|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover monitoring-list" id="monitoringTable">
|
||||
<thead>
|
||||
<tr>
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'checkall': 'true',
|
||||
'target': '#monitoringTable',
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'social.monitoring',
|
||||
'orderBy': 'e.title',
|
||||
'text': 'mautic.core.title',
|
||||
'class': 'col-monitoring-title',
|
||||
'default': true,
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'social.monitoring',
|
||||
'orderBy': 'e.id',
|
||||
'text': 'mautic.core.id',
|
||||
'class': 'visible-md visible-lg col-asset-id',
|
||||
}) }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for k, item in items %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ include('@MauticCore/Helper/list_actions.html.twig', {
|
||||
'item': item,
|
||||
'templateButtons': {
|
||||
'edit': securityIsGranted('mauticSocial:monitoring:edit'),
|
||||
'delete': securityIsGranted('mauticSocial:monitoring:delete'),
|
||||
},
|
||||
'routeBase': 'social',
|
||||
'langVar': 'mautic.social.monitoring',
|
||||
'nameGetter': 'getTitle',
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
{{ include('@MauticCore/Helper/publishstatus_icon.html.twig', {
|
||||
'item': item,
|
||||
'model': 'social.monitoring',
|
||||
}) }}
|
||||
<a href="{{ path('mautic_social_action', {'objectAction': 'view', 'objectId': item.id}) }}" data-toggle="ajax">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{ include('@MauticCore/Helper/description--inline.html.twig', {
|
||||
'description': item.description
|
||||
}) }}
|
||||
</td>
|
||||
<td class="visible-md visible-lg">{{ item.id }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
{{ include('@MauticCore/Helper/pagination.html.twig', {
|
||||
'totalItems': items|length,
|
||||
'page': page,
|
||||
'limit': limit,
|
||||
'menuLinkId': 'mautic_campaign_index',
|
||||
'baseUrl': path('mautic_social_index'),
|
||||
'sessionVar': 'social.monitoring',
|
||||
'routeBase': 'social',
|
||||
}) }}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ include('@MauticCore/Helper/noresults.html.twig', {'tip': 'mautic.mautic.social.monitoring.noresults.tip'}) }}
|
||||
{% endif %}
|
||||
|
||||
{{ include('@MauticCore/Helper/modal.html.twig', {
|
||||
'id': 'MonitoringPreviewModal',
|
||||
'header': false,
|
||||
}) }}
|
||||
@@ -0,0 +1,128 @@
|
||||
{#
|
||||
Variables
|
||||
- isEmbeded
|
||||
- activeMonitoring
|
||||
#}
|
||||
{% extends isEmbedded ? '@MauticCore/Default/raw_output.html.twig' : '@MauticCore/Default/content.html.twig' %}
|
||||
|
||||
{% block mauticContent 'monitoring' %}
|
||||
|
||||
{% block headerTitle activeMonitoring.title %}
|
||||
|
||||
{% block preHeader %}
|
||||
{{- include('@MauticCore/Helper/page_actions.html.twig',
|
||||
{
|
||||
'item' : activeMonitoring,
|
||||
'templateButtons' : {
|
||||
'close' : securityIsGranted('mauticSocial:monitoring:view'),
|
||||
},
|
||||
'routeBase' : 'social',
|
||||
'langVar' : 'monitoring',
|
||||
'targetLabel' : 'mautic.social.monitoring'|trans
|
||||
}
|
||||
) -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{{- include('@MauticCore/Helper/page_actions.html.twig', {
|
||||
'item': activeMonitoring,
|
||||
'templateButtons': {
|
||||
'edit': securityIsGranted('mauticSocial:monitoring:edit'),
|
||||
'delete': securityIsGranted('mauticSocial:monitoring:delete'),
|
||||
},
|
||||
'routeBase': 'social',
|
||||
'langVar': 'monitoring',
|
||||
'nameGetter': 'getTitle',
|
||||
}) -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block publishStatus %}
|
||||
{{ include('@MauticCore/Helper/publishstatus_badge.html.twig', {'entity': activeMonitoring}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ includeScript('plugins/MauticSocialBundle/Assets/js/social.js') }}
|
||||
<!-- start: box layout -->
|
||||
<div class="box-layout">
|
||||
<!-- left section -->
|
||||
<div class="col-md-9 height-auto">
|
||||
<div>
|
||||
<!-- monitoring detail header -->
|
||||
{% include '@MauticCore/Helper/description--expanded.html.twig' with {'description': activeMonitoring.description} %}
|
||||
<!--/ monitoring detail header -->
|
||||
<!-- monitoring detail collapseable -->
|
||||
<div class="collapse pr-md pl-md" id="asset-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': activeMonitoring}) }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/ monitoring collapseable -->
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- 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-twitter-x-line"></span>
|
||||
{{ ('mautic.social.monitoring.' ~ activeMonitoring.networkType ~ '.popularity')|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': leadStats, 'chartType': 'line', 'chartHeight': 300}) }}
|
||||
</div>
|
||||
</div>
|
||||
</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="#leads-container" role="tab" data-toggle="tab">
|
||||
{{ 'mautic.lead.leads'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!--/ tabs controls -->
|
||||
</div>
|
||||
|
||||
<!-- start: tab-content -->
|
||||
<div class="tab-content pa-md">
|
||||
<!-- #events-container -->
|
||||
<div class="tab-pane active fade in bdr-w-0 page-list" id="leads-container">
|
||||
{{ monitorLeads|raw }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--/ left section -->
|
||||
|
||||
<!-- right section -->
|
||||
<div class="col-md-3 bdr-l height-auto">
|
||||
<!-- recent activity -->
|
||||
{{ include('@MauticCore/Helper/recentactivity.html.twig', {'logs': logs}) }}
|
||||
</div>
|
||||
<!--/ right section -->
|
||||
|
||||
<input id="itemId" type="hidden" value="{{ activeMonitoring.id }}" />
|
||||
</div>
|
||||
<!--/ end: box layout -->
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,68 @@
|
||||
{#
|
||||
Variables
|
||||
- entity
|
||||
- form
|
||||
#}
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
|
||||
{% block mauticContent 'monitoring' %}
|
||||
|
||||
{% block headerTitle %}
|
||||
{% if entity.id %}
|
||||
{{ 'mautic.social.monitoring.menu.edit'|trans({'%name%': entity.title|trans}) }}
|
||||
{% else %}
|
||||
{{ 'mautic.social.monitoring.menu.new'|trans }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block modal %}
|
||||
{{ include('@MauticCore/Helper/modal.html.twig', {
|
||||
'id': 'formComponentModal',
|
||||
'header': false,
|
||||
'footerButtons': true,
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ includeScript('plugins/MauticSocialBundle/Assets/js/social.js') }}
|
||||
|
||||
{{ form_start(form) }}
|
||||
<!-- start: box layout -->
|
||||
<div class="box-layout">
|
||||
<!-- container -->
|
||||
<div class="col-md-9 height-auto bdr-r">
|
||||
<div class="pa-md">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6">{{ form_row(form.title) }}</div>
|
||||
<div class="col-md-6">{{ form_row(form.networkType) }}</div>
|
||||
</div>
|
||||
<div id="properties-container">
|
||||
<div class="row">
|
||||
{% if form.properties is defined %}
|
||||
{% for child in form.properties %}
|
||||
<div class="col-md-6">
|
||||
{{ form_row(child) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_row(form.description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 height-auto">
|
||||
<div class="pr-lg pl-lg pt-md pb-md">
|
||||
{{ form_row(form.isPublished) }}
|
||||
{{ form_row(form.publishUp) }}
|
||||
{{ form_row(form.publishDown) }}
|
||||
{{ form_row(form.category) }}
|
||||
{{ form_row(form.lists) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,65 @@
|
||||
{% set isIndex = 'index' == tmpl ? true : false %}
|
||||
{% set tmpl = 'list' %}
|
||||
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||
|
||||
{% block mauticContent 'monitoring' %}
|
||||
|
||||
{% block headerTitle %}{{ 'mautic.social.monitoring'|trans }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if isIndex %}
|
||||
<div id="page-list-wrapper" class="panel panel-default">
|
||||
{{ include('@MauticCore/Helper/list_toolbar.html.twig', {
|
||||
'searchValue': searchValue,
|
||||
'action': currentRoute,
|
||||
'page_actions': {
|
||||
'templateButtons': {
|
||||
'new': securityIsGranted('mauticSocial:monitoring:create'),
|
||||
},
|
||||
'routeBase': 'social',
|
||||
'langVar': 'monitoring',
|
||||
},
|
||||
'bulk_actions': {
|
||||
'langVar': 'mautic.social.monitoring',
|
||||
'routeBase': 'social',
|
||||
'templateButtons': {
|
||||
'delete': securityIsGranted('mauticSocial:monitoring:delete'),
|
||||
},
|
||||
},
|
||||
'quickFilters': [
|
||||
{
|
||||
'search': 'mautic.core.searchcommand.ispublished',
|
||||
'label': 'mautic.core.form.active',
|
||||
'tooltip': 'mautic.core.searchcommand.ispublished.description',
|
||||
'icon': 'ri-check-line'
|
||||
},
|
||||
{
|
||||
'search': 'mautic.core.searchcommand.isunpublished',
|
||||
'label': 'mautic.core.form.inactive',
|
||||
'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">
|
||||
{% endif %}
|
||||
|
||||
{{ include('@MauticSocial/Monitoring/_list.html.twig') }}
|
||||
|
||||
{% if isIndex %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1 @@
|
||||
{{ includeScript('plugins/MauticSocialBundle/Assets/js/social.js', 'composeSocialWatcher', 'composeSocialWatcher') }}
|
||||
@@ -0,0 +1,71 @@
|
||||
<!-- Contact Monitoring tokens -->
|
||||
<li class="panel">
|
||||
<a role="button" id="headingContactMonitoring" class="accordion-heading collapsed" data-toggle="collapse"
|
||||
data-parent="#tokensAccordion" href="#collapseContactMonitoring" aria-expanded="false"
|
||||
aria-controls="collapseContactMonitoring">
|
||||
<i class="ri-arrow-down-s-line accordion-arrow"></i>
|
||||
<span class="accordion-title">{{ 'mautic.placeholder_tokens.contact_monitoring'|trans }}</span>
|
||||
</a>
|
||||
<div id="collapseContactMonitoring" class="collapse accordion-wrapper" role="tabpanel"
|
||||
aria-labelledby="headingContactMonitoring">
|
||||
|
||||
<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.monitoring.language'|trans }}</td>
|
||||
<td><code>{language}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.title'|trans }}</td>
|
||||
<td><code>{title}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.landing_page_title'|trans }}</td>
|
||||
<td><code>{page_title}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.url'|trans }}</td>
|
||||
<td><code>{url}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.landing_page_url'|trans }}</td>
|
||||
<td><code>{page_url}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.referrer'|trans }}</td>
|
||||
<td><code>{referrer}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.tracking_pixel'|trans }}</td>
|
||||
<td><code>{tracking_pixel}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.utm_campaign'|trans }}</td>
|
||||
<td><code>{utm_campaign}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.utm_content'|trans }}</td>
|
||||
<td><code>{utm_content}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.utm_medium'|trans }}</td>
|
||||
<td><code>{utm_medium}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.utm_source'|trans }}</td>
|
||||
<td><code>{utm_source}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'mautic.placeholder_tokens.monitoring.utm_term'|trans }}</td>
|
||||
<td><code>{utm_term}</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
@@ -0,0 +1,75 @@
|
||||
{% if items|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover tweet-list" id="tweetTable">
|
||||
<thead>
|
||||
<tr>
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'checkall': 'true',
|
||||
'target': '#tweetTable',
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'social.tweet',
|
||||
'orderBy': 'e.name',
|
||||
'text': 'mautic.core.name',
|
||||
'class': 'col-tweet-name',
|
||||
'default': true,
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'social.tweet',
|
||||
'orderBy': 'e.id',
|
||||
'text': 'mautic.core.id',
|
||||
'class': 'visible-md visible-lg col-asset-id',
|
||||
}) }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ include('@MauticCore/Helper/list_actions.html.twig', {
|
||||
'item': item,
|
||||
'templateButtons': {
|
||||
'edit': securityIsGranted('mauticSocial:tweets:edit'),
|
||||
'delete': securityIsGranted('mauticSocial:tweets:delete'),
|
||||
},
|
||||
'routeBase': 'mautic_tweet',
|
||||
'langVar': 'mautic.integration.Twitter',
|
||||
'nameGetter': 'getName',
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
{{ include('@MauticCore/Helper/publishstatus_icon.html.twig', {
|
||||
'item': item,
|
||||
'model': 'social.tweet',
|
||||
}) }}
|
||||
<a href="{{ path('mautic_tweet_action', {'objectAction': 'edit', 'objectId': item.id}) }}" data-toggle="ajax">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
{{ include('@MauticCore/Helper/description--inline.html.twig', {
|
||||
'description': item.description
|
||||
}) }}
|
||||
</td>
|
||||
<td class="visible-md visible-lg">{{ item.id }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
{{ include('@MauticCore/Helper/pagination.html.twig', {
|
||||
'totalItems': items|length,
|
||||
'page': page,
|
||||
'limit': limit,
|
||||
'menuLinkId': 'mautic_tweet_index',
|
||||
'baseUrl': path('mautic_tweet_index'),
|
||||
'sessionVar': 'social.tweet',
|
||||
'routeBase': 'tweet',
|
||||
}) }}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ include('@MauticCore/Helper/noresults.html.twig', {'tip': 'mautic.mautic.social.tweet.noresults.tip'}) }}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,62 @@
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
|
||||
{% block mauticContent 'tweet' %}
|
||||
|
||||
{% block headerTitle %}
|
||||
{% if entity.id %}
|
||||
{{ 'mautic.social.tweet.menu.edit'|trans({'%name%': entity.name|trans}) }}
|
||||
{% else %}
|
||||
{{ 'mautic.social.tweet.menu.new'|trans }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ includeScript('plugins/MauticSocialBundle/Assets/js/social.js', 'composeSocialWatcher', 'composeSocialWatcher') }}
|
||||
|
||||
{{ form_start(form) }}
|
||||
<!-- start: box layout -->
|
||||
<div class="box-layout">
|
||||
<!-- container -->
|
||||
<div class="col-md-9 height-auto bdr-r">
|
||||
<div class="pa-md">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.description) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
{{ form_row(form.text) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label class="control-label">
|
||||
{{ 'mautic.social.twitter.tweet.handle'|trans }}
|
||||
</label>
|
||||
{{ form_row(form.handle) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{{ form_row(form.asset) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{{ form_row(form.page) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div id="character-count" class="text-right small">
|
||||
{{ 'mautic.social.twitter.tweet.count'|trans }}
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 height-auto">
|
||||
<div class="pr-lg pl-lg pt-md pb-md">
|
||||
{{ form_row(form.category) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,30 @@
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
|
||||
{% block mauticContent 'tweet' %}
|
||||
|
||||
{% block content %}
|
||||
{{ includeScript('plugins/MauticSocialBundle/Assets/js/social.js', 'composeSocialWatcher', 'composeSocialWatcher') }}
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.text) }}
|
||||
<div id="character-count" class="text-right small">
|
||||
{{ 'mautic.social.twitter.tweet.count'|trans }}
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label class="control-label">
|
||||
{{ 'mautic.social.twitter.tweet.handle'|trans }}
|
||||
</label>
|
||||
{{ form_row(form.handle) }}
|
||||
</div>
|
||||
<div class="col-md-4">{{ form_row(form.asset) }}</div>
|
||||
<div class="col-md-4">{{ form_row(form.page) }}</div>
|
||||
</div>
|
||||
|
||||
{{ form_row(form.description) }}
|
||||
{{ form_row(form.category) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,37 @@
|
||||
{%- set isIndex = 'index' == tmpl -%}
|
||||
{%- set tmpl = 'list' -%}
|
||||
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||
|
||||
{% block mauticContent 'tweet' %}
|
||||
|
||||
{% block headerTitle 'mautic.social.tweets'|trans %}
|
||||
|
||||
{% block content %}
|
||||
{% if isIndex %}
|
||||
<div id="page-list-wrapper" class="panel panel-default">
|
||||
{{ include('@MauticCore/Helper/list_toolbar.html.twig', {
|
||||
'searchValue': searchValue,
|
||||
'action': currentRoute,
|
||||
'page_actions': {
|
||||
'templateButtons': {
|
||||
'new': securityIsGranted('mauticSocial:tweets:create'),
|
||||
},
|
||||
'routeBase': 'mautic_tweet',
|
||||
'langVar': 'tweet',
|
||||
},
|
||||
'bulk_actions': {
|
||||
'langVar': 'mautic.social.tweets',
|
||||
'routeBase': 'mautic_tweet',
|
||||
'templateButtons': {
|
||||
'delete': securityIsGranted('mauticSocial:tweets:delete'),
|
||||
},
|
||||
},
|
||||
}) }}
|
||||
<div class="page-list">
|
||||
{{- include('@MauticSocial/Tweet/_list.html.twig') -}}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{- include('@MauticSocial/Tweet/_list.html.twig') -}}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% macro profileImage(profile) %}
|
||||
{% if profile.profileImage is defined and profile.profileImage is not empty %}
|
||||
<div class="pull-left thumbnail">
|
||||
<img src="{{ profile.profileImage }}" width="100px" class="media-object img-rounded" />
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user