1 Commits
v2.x ... 2.0.x

Author SHA1 Message Date
jbcr
d631e6555e enclosure js code into anonymous function (#28)
* encosure js code into annonymous function
2019-12-05 15:25:50 +01:00
5 changed files with 320 additions and 272 deletions

View File

@@ -24,7 +24,8 @@
<h3 class="modal-title">{{ 'coderhapsodie.ezdataflow.workflow.history.title'|trans }}</h3>
<button type="button" class="close" aria-label="Close">
<svg class="ez-icon ez-icon--medium" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#discard"></use>
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#discard"></use>
</svg>
</button>
</div>
@@ -34,35 +35,40 @@
</div>
<script>
$('#ez-modal--history-details').modal({keyboard: false, show: false});
$('.history-details-aware').delegate('.modal-history-details', 'click', function(e) {
e.preventDefault();
$('#modal_content-details').html('');
$('#ez-modal--history-details').modal('show');
$.ajax(this.href, {
success: function(result) {
$('#modal_content-details').html(result);
}
(function ($) {
$(document).ready(function ($) {
$('#ez-modal--history-details').modal({keyboard: false, show: false});
$('.history-details-aware').delegate('.modal-history-details', 'click', function (e) {
e.preventDefault();
$('#modal_content-details').html('');
$('#ez-modal--history-details').modal('show');
$.ajax(this.href, {
success: function (result) {
$('#modal_content-details').html(result);
}
});
});
$('#ez-modal--history-details .close').click(function () {
$('#ez-modal--history-details').modal('hide');
});
$(document).ready(function () {
if (window.location.hash && window.location.hash === '#oneshot') {
$('#ez-tab-list-coderhapsodie-ezdataflow li a').removeClass('active');
$('#ez-tab-list-content-coderhapsodie-ezdataflow .tab-pane').removeClass('active');
$('#ez-tab-list-coderhapsodie-ezdataflow li a:eq(1)').addClass('active');
$('#ez-tab-list-content-coderhapsodie-ezdataflow .tab-pane:eq(1)').addClass('active');
}
if (window.location.hash && window.location.hash === '#history') {
$('#ez-tab-list-coderhapsodie-ezdataflow li a').removeClass('active');
$('#ez-tab-list-content-coderhapsodie-ezdataflow .tab-pane').removeClass('active');
$('#ez-tab-list-coderhapsodie-ezdataflow li a:eq(2)').addClass('active');
$('#ez-tab-list-content-coderhapsodie-ezdataflow .tab-pane:eq(2)').addClass('active');
}
});
});
});
$('#ez-modal--history-details .close').click(function () {
$('#ez-modal--history-details').modal('hide');
});
$(document).ready(function () {
if (window.location.hash && window.location.hash === '#oneshot') {
$('#ez-tab-list-coderhapsodie-ezdataflow li a').removeClass('active');
$('#ez-tab-list-content-coderhapsodie-ezdataflow .tab-pane').removeClass('active');
$('#ez-tab-list-coderhapsodie-ezdataflow li a:eq(1)').addClass('active');
$('#ez-tab-list-content-coderhapsodie-ezdataflow .tab-pane:eq(1)').addClass('active');
}
if (window.location.hash && window.location.hash === '#history') {
$('#ez-tab-list-coderhapsodie-ezdataflow li a').removeClass('active');
$('#ez-tab-list-content-coderhapsodie-ezdataflow .tab-pane').removeClass('active');
$('#ez-tab-list-coderhapsodie-ezdataflow li a:eq(2)').addClass('active');
$('#ez-tab-list-content-coderhapsodie-ezdataflow .tab-pane:eq(2)').addClass('active');
}
});
})(jQuery);
</script>
{% endblock %}

View File

@@ -3,9 +3,11 @@
<div class="ez-table-header">
<div class="ez-table-header__headline">{{ 'coderhapsodie.ezdataflow.oneshot.list.title'|trans }}</div>
<div>
<button type="button" class="btn btn-primary btn-modal-launcher" data-toggle="modal" data-target="#ez-modal--new-oneshot">
<button type="button" class="btn btn-primary btn-modal-launcher" data-toggle="modal"
data-target="#ez-modal--new-oneshot">
<svg class="ez-icon ez-icon--medium ez-icon--light ez-icon-create">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#create"></use>
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#create"></use>
</svg>
</button>
</div>
@@ -22,30 +24,35 @@
</div>
<script>
$('#ez-modal--new-oneshot').on('submit', 'form', function (e) {
e.preventDefault();
url = $(this).attr('action');
data = new FormData(this);
$.ajax({
'type': 'POST',
'url': url,
'data': data,
processData: false,
contentType: false,
success: function (result) {
if (result.redirect) {
if (window.location.href === result.redirect) {
document.location.reload();
}
window.location = result.redirect;
return;
}
let obj = $(result.form).find('.modal-body');
$('#ez-modal--new-oneshot .modal-body').html($(obj).html());
}
(function ($) {
$(document).ready(function ($) {
$('#ez-modal--new-oneshot').on('submit', 'form', function (e) {
e.preventDefault();
url = $(this).attr('action');
data = new FormData(this);
$.ajax({
'type': 'POST',
'url': url,
'data': data,
processData: false,
contentType: false,
success: function (result) {
if (result.redirect) {
if (window.location.href === result.redirect) {
document.location.reload();
}
window.location = result.redirect;
return;
}
let obj = $(result.form).find('.modal-body');
$('#ez-modal--new-oneshot .modal-body').html($(obj).html());
}
});
});
});
});
})(jQuery);
</script>

View File

@@ -17,164 +17,168 @@
{% if form is defined %}
{% form_theme form 'bootstrap_3_layout.html.twig' %}
<div class="modal fade ez-modal show" id="ez-modal--new-scheduled" tabindex="-1" role="dialog" aria-modal="true">
<div class="modal-dialog" role="document">
{{ include('@ezdesign/ezdataflow/parts/schedule_form.html.twig') }}
<div class="modal fade ez-modal show" id="ez-modal--new-scheduled" tabindex="-1" role="dialog" aria-modal="true">
<div class="modal-dialog" role="document">
{{ include('@ezdesign/ezdataflow/parts/schedule_form.html.twig') }}
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade ez-modal ez-modal--delete-workflow show" id="ez-modal--delete-workflow" tabindex="-1"
role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<svg class="ez-icon ez-icon--medium" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="../../ez-icons.svg#discard"></use>
</svg>
</button>
</div>
<div class="modal-body">
<p class="font-weight-bold" id="delete-modal--workflow-name"></p>
<p class="ez-modal-body__main">{{ 'coderhapsodie.ezdataflow.workflow.delete'|trans }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-dark"
data-dismiss="modal">{{ 'coderhapsodie.ezdataflow.workflow.new.cancel'|trans }}</button>
<button type="button" class="btn btn-danger font-weight-bold"
id="ez-modal--delete-workflow-confirm">{{ 'coderhapsodie.ezdataflow.workflow.list.delete'|trans }}</button>
<!-- Modal -->
<div class="modal fade ez-modal ez-modal--delete-workflow show" id="ez-modal--delete-workflow" tabindex="-1"
role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<svg class="ez-icon ez-icon--medium" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="../../ez-icons.svg#discard"></use>
</svg>
</button>
</div>
<div class="modal-body">
<p class="font-weight-bold" id="delete-modal--workflow-name"></p>
<p class="ez-modal-body__main">{{ 'coderhapsodie.ezdataflow.workflow.delete'|trans }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-dark"
data-dismiss="modal">{{ 'coderhapsodie.ezdataflow.workflow.new.cancel'|trans }}</button>
<button type="button" class="btn btn-danger font-weight-bold"
id="ez-modal--delete-workflow-confirm">{{ 'coderhapsodie.ezdataflow.workflow.list.delete'|trans }}</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade ez-modal show" id="ez-modal--history" tabindex="-1" role="dialog" aria-modal="true">
<div class="modal-dialog" role="document" style="max-width: 80%">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">{{ 'coderhapsodie.ezdataflow.workflow.history.title'|trans }}</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<svg class="ez-icon ez-icon--medium" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#discard"></use>
</svg>
</button>
<div class="modal fade ez-modal show" id="ez-modal--history" tabindex="-1" role="dialog" aria-modal="true">
<div class="modal-dialog" role="document" style="max-width: 80%">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">{{ 'coderhapsodie.ezdataflow.workflow.history.title'|trans }}</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<svg class="ez-icon ez-icon--medium" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#discard"></use>
</svg>
</button>
</div>
<div class="modal-body history-details-aware" id="modal_content"></div>
</div>
<div class="modal-body history-details-aware" id="modal_content"></div>
</div>
</div>
</div>
<div class="modal fade ez-modal show" id="ez-modal--edit-scheduled" tabindex="-1" role="dialog" aria-modal="true">
<div class="modal-dialog" role="document">
<div id="schedule_edit"></div>
<div class="modal fade ez-modal show" id="ez-modal--edit-scheduled" tabindex="-1" role="dialog" aria-modal="true">
<div class="modal-dialog" role="document">
<div id="schedule_edit"></div>
</div>
</div>
</div>
<script>
$('#ez-modal--history').modal({keyboard: false, show: false});
$('.modal-history').each(function (index, elem) {
$(elem).click(function (e) {
e.preventDefault();
$('#modal_content').html('');
$('#ez-modal--history').modal('show');
$.ajax(elem.href, {
success: function (result) {
$('#modal_content').html(result);
}
});
});
});
$('#ez-modal--history .close').click(function () {
$('#ez-modal--history').modal('hide');
});
<script>
(function ($) {
$(document).ready(function ($) {
$('#ez-modal--history').modal({keyboard: false, show: false});
$('.modal-history').each(function (index, elem) {
$(elem).click(function (e) {
e.preventDefault();
$('#modal_content').html('');
$('#ez-modal--history').modal('show');
$.ajax(elem.href, {
success: function (result) {
$('#modal_content').html(result);
}
});
});
});
$('#ez-modal--history .close').click(function () {
$('#ez-modal--history').modal('hide');
});
$('#ez-modal--delete-workflow').modal({keyboard: true, show: false});
$('.modal-delete').each(function (index, elem) {
$(elem).click(function (e) {
e.preventDefault();
$('#delete-modal--workflow-name').html($(elem).data('name'));
$('#ez-modal--delete-workflow').modal('show');
$('#ez-modal--delete-workflow-confirm').data('target', $(elem).data('path'));
});
});
$('#ez-modal--delete-workflow-confirm').click(function () {
let target = $(this).data('target');
if (target && target !== '') {
$.ajax(target, {
method: 'POST',
complete: function () {
$('#ez-modal--delete-workflow').modal('hide');
window.location.reload();
}
});
}
});
$('#ez-modal--edit-scheduled').modal({keyboard: true, show: false});
$('.modal-edit').each(function (index, elem) {
$(elem).click(function (e) {
e.preventDefault();
$('#schedule_edit').html('');
$('#ez-modal--edit-scheduled').modal('show');
$.ajax(elem.href, {
success: function (result) {
if (result.redirect) {
if (window.location.href === result.redirect) {
document.location.reload();
}
window.location = result.redirect;
return;
$('#ez-modal--delete-workflow').modal({keyboard: true, show: false});
$('.modal-delete').each(function (index, elem) {
$(elem).click(function (e) {
e.preventDefault();
$('#delete-modal--workflow-name').html($(elem).data('name'));
$('#ez-modal--delete-workflow').modal('show');
$('#ez-modal--delete-workflow-confirm').data('target', $(elem).data('path'));
});
});
$('#ez-modal--delete-workflow-confirm').click(function () {
let target = $(this).data('target');
if (target && target !== '') {
$.ajax(target, {
method: 'POST',
complete: function () {
$('#ez-modal--delete-workflow').modal('hide');
window.location.reload();
}
});
}
});
$('#schedule_edit').html(result.form);
}
$('#ez-modal--edit-scheduled').modal({keyboard: true, show: false});
$('.modal-edit').each(function (index, elem) {
$(elem).click(function (e) {
e.preventDefault();
$('#schedule_edit').html('');
$('#ez-modal--edit-scheduled').modal('show');
$.ajax(elem.href, {
success: function (result) {
if (result.redirect) {
if (window.location.href === result.redirect) {
document.location.reload();
}
window.location = result.redirect;
return;
}
$('#schedule_edit').html(result.form);
}
});
});
});
$('#ez-modal--edit-scheduled').on('submit', 'form', function (e) {
e.preventDefault();
url = $(this).attr('action');
data = new FormData(this);
$.ajax({
'type': 'POST',
'url': url,
'data': data,
processData: false,
contentType: false,
success: function (result) {
if (result.redirect) {
window.location = result.redirect;
return;
}
$('#schedule_edit').html(result.form);
}
});
});
$('#ez-modal--new-scheduled form').on('submit', function (e) {
e.preventDefault();
url = $(this).attr('action');
data = new FormData(this);
$.ajax({
'type': 'POST',
'url': url,
'data': data,
processData: false,
contentType: false,
success: function (result) {
if (result.redirect) {
window.location = result.redirect;
return;
}
let obj = $(result.form).find('.modal-body');
$('#ez-modal--new-scheduled .modal-body').html($(obj).html());
}
});
});
});
});
});
$('#ez-modal--edit-scheduled').on('submit', 'form', function (e) {
e.preventDefault();
url = $(this).attr('action');
data = new FormData(this);
$.ajax({
'type': 'POST',
'url': url,
'data': data,
processData: false,
contentType: false,
success: function (result) {
if (result.redirect) {
window.location = result.redirect;
return;
}
$('#schedule_edit').html(result.form);
}
});
});
$('#ez-modal--new-scheduled form').on('submit', function (e) {
e.preventDefault();
url = $(this).attr('action');
data = new FormData(this);
$.ajax({
'type': 'POST',
'url': url,
'data': data,
processData: false,
contentType: false,
success: function (result) {
if (result.redirect) {
window.location = result.redirect;
return;
}
let obj = $(result.form).find('.modal-body');
$('#ez-modal--new-scheduled .modal-body').html($(obj).html());
}
});
});
</script>
})(jQuery);
</script>
{% endif %}

View File

@@ -4,7 +4,8 @@
<div id="loading_{{ id }}" class="text-center d-none">
<svg class="ez-icon ez-icon--extra-large">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#spinner"></use>
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#spinner"></use>
</svg>
</div>
@@ -32,9 +33,12 @@
<td>{{ job.end_time ? job.end_time|date('d/m/Y H:i:s') : '-' }}</td>
<td>{{ macros.translateStatus(job.status) }}</td>
<td class="ez-table__cell ez-table__cell--has-action-btns text-right">
<a href="{{ path('coderhapsodie.ezdataflow.job.details', {id: job.id}) }}" class="btn btn-icon mx-2 modal-history-details" title="{{ 'coderhapsodie.ezdataflow.history.list.view'|trans }}">
<a href="{{ path('coderhapsodie.ezdataflow.job.details', {id: job.id}) }}"
class="btn btn-icon mx-2 modal-history-details"
title="{{ 'coderhapsodie.ezdataflow.history.list.view'|trans }}">
<svg class="ez-icon ez-icon--small-medium">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#about-info"></use>
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#about-info"></use>
</svg>
</a>
</td>
@@ -54,14 +58,19 @@
</div>
<script>
// Manage ajax pagination
$('#{{ id }}').delegate('.ez-pagination a', 'click', function (e) {
e.preventDefault();
$('#loading_{{ id }}').removeClass('d-none');
$('#{{ id }}')
.html('')
.load(this.href + ' #{{ id }}>*', null, function () {
$('#loading_{{ id }}').addClass('d-none');
(function ($) {
$(document).ready(function ($) {
// Manage ajax pagination
$('#{{ id }}').delegate('.ez-pagination a', 'click', function (e) {
e.preventDefault();
$('#loading_{{ id }}').removeClass('d-none');
$('#{{ id }}')
.html('')
.load(this.href + ' #{{ id }}>*', null, function () {
$('#loading_{{ id }}').addClass('d-none');
});
});
});
});
})(jQuery);
</script>

View File

@@ -2,66 +2,83 @@
<div id="loading_{{ id }}" class="text-center d-none">
<svg class="ez-icon ez-icon--extra-large">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#spinner"></use>
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#spinner"></use>
</svg>
</div>
<div id="{{ id }}" class="history-details-aware">
{% if pager.currentPageResults|length %}
<table class="table">
<thead>
<tr>
<th>{{ 'coderhapsodie.ezdataflow.workflow.list.name'|trans }}</th>
<th>{{ 'coderhapsodie.ezdataflow.workflow.list.frequency'|trans }}</th>
<th>{{ 'coderhapsodie.ezdataflow.workflow.list.next_execution'|trans }}</th>
<th>{{ 'coderhapsodie.ezdataflow.workflow.list.enabled'|trans }}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for item in pager.currentPageResults %}
<table class="table">
<thead>
<tr>
<td>{{ item.label }}</td>
<td>{{ item.frequency }}</td>
<td>{{ item.next|date('d/m/Y H:i:s') }}</td>
<td>{{ ('coderhapsodie.ezdataflow.' ~ (item.enabled ? 'yes' : 'no'))|trans }}</td>
<td class="ez-table__cell ez-table__cell--has-action-btns text-right">
<a href="{{ path('coderhapsodie.ezdataflow.history.workflow', {id: item.id}) }}" class="btn btn-icon mx-2 modal-history" title="{{ 'coderhapsodie.ezdataflow.workflow.list.history'|trans }}">
<svg class="ez-icon ez-icon--small-medium">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#history"></use>
</svg>
</a>
<a href="{{ path('coderhapsodie.ezdataflow.workflow.edit', {id: item.id}) }}" type="button" class="btn btn-icon mx-2 modal-edit" title="{{ 'coderhapsodie.ezdataflow.workflow.list.edit'|trans }}">
<svg class="ez-icon ez-icon--small-medium ez-icon-edit">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#edit"></use>
</svg>
</a>
{% if item.enabled %}
<a href="{{ path('coderhapsodie.ezdataflow.workflow.disable', {id: item.id}) }}" class="btn btn-icon mx-2" title="{{ 'coderhapsodie.ezdataflow.workflow.list.disable'|trans }}">
<svg class="ez-icon ez-icon--small-medium" style="fill: #f7d000;">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#logout"></use>
</svg>
</a>
{% else %}
<a href="{{ path('coderhapsodie.ezdataflow.workflow.enable', {id: item.id}) }}" class="btn btn-icon mx-2" title="{{ 'coderhapsodie.ezdataflow.workflow.list.enable'|trans }}">
<svg class="ez-icon ez-icon--small-medium" style="fill: #00825c;">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#approved"></use>
</svg>
</a>
{% endif %}
<button type="button" class="btn btn-icon mx-2 ez-btn--content-trash modal-delete" data-name="{{ item.label }}" data-path="{{ path('coderhapsodie.ezdataflow.workflow.delete', {id: item.id}) }}" title="{{ 'coderhapsodie.ezdataflow.workflow.list.delete'|trans }}">
<svg class="ez-icon ez-icon--small-medium ez-icon-trash">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#trash"></use>
</svg>
</button>
</td>
<th>{{ 'coderhapsodie.ezdataflow.workflow.list.name'|trans }}</th>
<th>{{ 'coderhapsodie.ezdataflow.workflow.list.frequency'|trans }}</th>
<th>{{ 'coderhapsodie.ezdataflow.workflow.list.next_execution'|trans }}</th>
<th>{{ 'coderhapsodie.ezdataflow.workflow.list.enabled'|trans }}</th>
<th></th>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="ez-table-no-content">{{ 'coderhapsodie.ezdataflow.workflow.list.empty'|trans }}</p>
{% endif %}
</thead>
<tbody>
{% for item in pager.currentPageResults %}
<tr>
<td>{{ item.label }}</td>
<td>{{ item.frequency }}</td>
<td>{{ item.next|date('d/m/Y H:i:s') }}</td>
<td>{{ ('coderhapsodie.ezdataflow.' ~ (item.enabled ? 'yes' : 'no'))|trans }}</td>
<td class="ez-table__cell ez-table__cell--has-action-btns text-right">
<a href="{{ path('coderhapsodie.ezdataflow.history.workflow', {id: item.id}) }}"
class="btn btn-icon mx-2 modal-history"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.history'|trans }}">
<svg class="ez-icon ez-icon--small-medium">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#history"></use>
</svg>
</a>
<a href="{{ path('coderhapsodie.ezdataflow.workflow.edit', {id: item.id}) }}" type="button"
class="btn btn-icon mx-2 modal-edit"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.edit'|trans }}">
<svg class="ez-icon ez-icon--small-medium ez-icon-edit">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#edit"></use>
</svg>
</a>
{% if item.enabled %}
<a href="{{ path('coderhapsodie.ezdataflow.workflow.disable', {id: item.id}) }}"
class="btn btn-icon mx-2"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.disable'|trans }}">
<svg class="ez-icon ez-icon--small-medium" style="fill: #f7d000;">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#logout"></use>
</svg>
</a>
{% else %}
<a href="{{ path('coderhapsodie.ezdataflow.workflow.enable', {id: item.id}) }}"
class="btn btn-icon mx-2"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.enable'|trans }}">
<svg class="ez-icon ez-icon--small-medium" style="fill: #00825c;">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#approved"></use>
</svg>
</a>
{% endif %}
<button type="button" class="btn btn-icon mx-2 ez-btn--content-trash modal-delete"
data-name="{{ item.label }}"
data-path="{{ path('coderhapsodie.ezdataflow.workflow.delete', {id: item.id}) }}"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.delete'|trans }}">
<svg class="ez-icon ez-icon--small-medium ez-icon-trash">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#trash"></use>
</svg>
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="ez-table-no-content">{{ 'coderhapsodie.ezdataflow.workflow.list.empty'|trans }}</p>
{% endif %}
{% if pager.haveToPaginate %}
<div class="ez-pagination justify-content-center align-items-center ez-pagination__spacing">
@@ -71,14 +88,19 @@
</div>
<script>
// Manage ajax pagination
$('#{{ id }}').delegate('.ez-pagination a', 'click', function (e) {
e.preventDefault();
$('#loading_{{ id }}').removeClass('d-none');
$('#{{ id }}')
.html('')
.load(this.href + ' #{{ id }}>*', null, function () {
$('#loading_{{ id }}').addClass('d-none');
(function ($) {
$(document).ready(function ($) {
// Manage ajax pagination
$('#{{ id }}').delegate('.ez-pagination a', 'click', function (e) {
e.preventDefault();
$('#loading_{{ id }}').removeClass('d-none');
$('#{{ id }}')
.html('')
.load(this.href + ' #{{ id }}>*', null, function () {
$('#loading_{{ id }}').addClass('d-none');
});
});
});
});
})(jQuery);
</script>