{#/********************************************************************************* * This file is part of Myddleware. * @package Myddleware * @copyright Copyright (C) 2013 - 2015 Stéphane Faure - CRMconsult EURL * @copyright Copyright (C) 2015 - 2016 Stéphane Faure - Myddleware ltd - contact@myddleware.com * @link http://www.myddleware.com This file is part of Myddleware. Myddleware is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Myddleware is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Myddleware. If not, see . *********************************************************************************/ #} {% extends 'base.html.twig' %} {% block title %} {{parent()}} | {{'title.flux.view'|trans}} {{ doc.getId }} {% endblock %} {% block titlesm %} {{'breadcrumb.transfert_list'|trans}} {{'title.flux.view'|trans}} {{ doc.getId }} {% endblock titlesm %} {% block body %}
{# ------------- FLUX ------------- #}
{% for message in app.flashes('success_unlock') %}
{{ message }}
{% endfor %}
{% if ctm_btn %} {% for btn in ctm_btn %} {% endfor %} {% endif %} {% if doc %} {# If the record has a different status than Cancel or Close #} {% if (doc.getGlobalStatus|lower != 'cancel' and doc.getGlobalStatus|lower != 'close' ) %} {% endif %} {% if (doc.getGlobalStatus|lower != 'cancel' and doc.getGlobalStatus|lower != 'close' ) or is_granted('ROLE_SUPER_ADMIN') %} {% endif %} {% if read_record_btn %} {% endif %} {% if doc.jobLock %} {% endif %}
{% if doc.getParentId %} {% endif %} {# {{ firstParentDocumentId }}
{{ doc.getStatus }} {% if doc.getGlobalStatus|lower == 'close' %} {% elseif doc.getGlobalStatus|lower == 'error' or doc.getGlobalStatus|lower == 'open' %} {% elseif doc.getGlobalStatus|lower == 'cancel' %} {% endif %}
{% if doc.getParentId %} {% endif %}
{{'view_flux.header.rule'|trans}} {{'view_flux.header.statut'|trans}} {{'view_flux.header.type'|trans}} {{'view_flux.header.attempt'|trans}} {{'view_flux.header.gblstatut'|trans}} {{'view_flux.header.dateref'|trans}} {{'view_flux.header.date_created'|trans}} {{'view_flux.header.date_modified'|trans}}{{'view_flux.header.parent'|trans}}
{{ rule.getName }} {{ doc.getType }} {{ doc.getAttempt }}
{{ doc.getGlobalStatus }} {% if doc.getGlobalStatus|lower == 'close' %} {% elseif doc.getGlobalStatus|lower == 'error' or doc.getGlobalStatus|lower == 'open' %} {% elseif doc.getGlobalStatus|lower == 'cancel' %} {% endif %}
{{ doc.getSourceDateModified|date("d/m/Y H:i:s") }} {{ doc.getDateCreated|date("d/m/Y H:i:s", timezone) }} {{ doc.getDateModified|date("d/m/Y H:i:s", timezone) }} {{ doc.getParentId }}
{% endif %}
{# ------------- FLUX ------------- #}
{# ------------- SOURCE ------------- #}

{{'view_rule.relate.solution_source'|trans}}

{{'view_flux.source'|trans}}

    {% if source.direct_link is defined %}

    {% endif %}

  • {{'view_flux.id'|trans}} : {{ doc.getSource }}
  • {% if source %} {% for key, value in source %} {% if value != doc.getId and key != 'direct_link' %}
  • {{ key }} {% if value|default('')|replace({''': "'"}) != value %} {{ value|raw|replace({''': "'"}) }} {% else %} {{ value }} {% endif %}
  • {% endif %} {% endfor %}
    {% else %} {{'view_flux.empty'|trans}} {% endif %}
{# ------------- SOURCE ------------- #} {# ------------- TARGET ------------- #}

{{'view_rule.relate.solution_source'|trans}}

{{'view_flux.target'|trans}}

{% if target.direct_link is defined %}

{% endif %}

  • {{'view_flux.id'|trans}} : {{ doc.getTarget }}
  • {% if target %} {% for key, value in target %} {% if value != doc.getId and key != 'direct_link' %}
  • {{ key }} {% if value|default('')|replace({''': "'"}) != value %} {{ value|raw|replace({''': "'"}) }} {% else %} {{ value }} {% endif %}
  • {% endif %} {% endfor %} {% else %} {{'view_flux.empty'|trans}} {% endif %}
{# ------------- TARGET ------------- #} {# ------------- HISTORY ------------- #}

{{'view_rule.relate.solution_source'|trans}}

{{'view_flux.history'|trans}}

{% if history %}
    {% for key, value in history %} {% if value != doc.getId %}
  • {{ key }} {% if value|default('')|replace({''': "'"}) != value %} {{ value|raw|replace({''': "'"}) }} {% else %} {{ value }} {% endif %}
  • {% endif %} {% endfor %}
{% else %} {{'view_flux.empty'|trans}} {% endif %}
{# ------------- HISTORY ------------- #}
{# ------------- POST DOCUMENTS ------------- #} {% if nb_post_documents > 0 %}

{{'view_flux.nbPostDocuments'|trans}}

{{ nb_post_documents }}

{% endif %} {# ------------- POST DOCUMENTS ------------- #}
{% if nb_post_documents > 0 %} {% if entities is not empty %} {% for flux in post_documents %} {% endfor %} {% endif %}
{{'list_flux.tab.id'|trans}} {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.target_id'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.type'|trans}} {{'list_flux.tab.statut'|trans}}
{{ flux.id }} {{ attribute(post_Documents_Rule,flux.id) }} {{ flux.source }} {{ flux.target }} {{ flux.dateModified|date("d/m/Y H:i:s") }} {{ flux.type }}
{{ flux.status }} {% if flux.globalStatus|lower == 'close' %} {% elseif flux.globalStatus|lower == 'error' or flux.globalStatus|lower == 'open' %} {% elseif flux.globalStatus|lower == 'open' %} {% elseif flux.globalStatus|lower == 'cancel' %} {% endif %}
{{'list_flux.tab.id'|trans}} {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.target_id'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.type'|trans}} {{'list_flux.tab.statut'|trans}}
{% if pager.haveToPaginate %}
{% if pager.haveToPaginate %} {{ pagerfanta(pager, 'twitter_bootstrap4', { 'routeParams' : { 'id': doc.getId, 'page' : 1, 'logPage' : 1 }, 'routeName': 'flux_info_page' } ) }} {% endif %}
{% endif %}
{% endif %}
{# ------------- HISTORY DOCUMENTS ------------- #} {% if nb_history_documents > 0 %}

{{'view_flux.nbHistoryDocuments'|trans}}

{{ nb_history_documents }}

{% endif %} {# ------------- HISTORY DOCUMENTS ------------- #}
{% if nb_history_documents > 0 %} {% if entities is not empty %} {% for flux in history_documents %} {% endfor %} {% endif %}
{{'list_flux.tab.id'|trans}} {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.target_id'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.type'|trans}} {{'list_flux.tab.statut'|trans}}
{% if current_document == flux.id %} {% else %} {% endif %} {{ flux.id }} {{ rule.getName }} {{ flux.source }} {{ flux.target }} {{ flux.sourceDateModified|date("d/m/Y H:i:s", timezone) }} {{ flux.type }}
{{ flux.status }} {% if flux.globalStatus|lower == 'close' %} {% elseif flux.globalStatus|lower == 'error' or flux.globalStatus|lower == 'open' %} {% elseif flux.globalStatus|lower == 'open' %} {% elseif flux.globalStatus|lower == 'cancel' %} {% endif %}
{{'list_flux.tab.id'|trans}} {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.target_id'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.type'|trans}} {{'list_flux.tab.statut'|trans}}
{# ------------- HISTORY DOCUMENTS ------------- #}
{% if pager.haveToPaginate %} {{ pagerfanta(documentPagination.pager, 'default', { (documentPagination.pageParameterName): documentPagination.pager.currentPage }) }} {% endif %}
{% endif %}
{# ------------- PARENT RELATE DOCUMENTS ------------- #} {% if nb_parent_documents > 0 %}

{{'view_flux.nbParentDocuments'|trans}}

{{ nb_parent_documents }}

{% endif %} {# ------------- PARENT RELATE DOCUMENTS ------------- #}
{% if nb_parent_documents > 0 %} {% if entities is not empty %} {% for flux in parent_documents %} {% endfor %} {% endif %}
{{'list_flux.tab.id'|trans}} {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_field'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.type'|trans}} {{'list_flux.tab.statut'|trans}}
{{ flux.id }} {{ attribute(parent_Documents_Rule,flux.id) }} {{ flux.sourceField }} {{ flux.source }} {{ flux.dateModified|date("d/m/Y H:i:s") }} {{ flux.type }}
{{ flux.status }} {% if flux.globalStatus|lower == 'close' %} {% elseif flux.globalStatus|lower == 'error' or flux.globalStatus|lower == 'open' %} {% elseif flux.globalStatus|lower == 'open' %} {% elseif flux.globalStatus|lower == 'cancel' %} {% endif %}
{{'list_flux.tab.id'|trans}} {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_field'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.type'|trans}} {{'list_flux.tab.statut'|trans}}
{% if pager.haveToPaginate %}
{% if pager.haveToPaginate %} {{ pagerfanta(pager, 'twitter_bootstrap4', { 'routeParams' : { 'id': doc.getId, 'page' : 1, 'logPage' : 1 }, 'routeName': 'flux_info_page' } ) }} {% endif %}
{% endif %}
{% endif %}
{# ------------- CHILD RELATE DOCUMENTS ------------- #} {% if nb_child_documents > 0 %}

{{'view_flux.nbChildDocuments'|trans}}

{{ nb_child_documents }}

{% endif %} {# ------------- CHILD RELATE DOCUMENTS ------------- #}
{% if nb_child_documents > 0 %} {% if entities is not empty %} {% for flux in child_documents %} {% endfor %} {% endif %}
{{'list_flux.tab.id'|trans}} {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_field'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.type'|trans}} {{'list_flux.tab.statut'|trans}}
{{ flux.id }} {{ attribute(child_Documents_Rule,flux.id) }} id {{ flux.source }} {{ flux.dateModified|date("d/m/Y H:i:s") }} {{ flux.type }}
{{ flux.status }} {% if flux.globalStatus|lower == 'close' %} {% elseif flux.globalStatus|lower == 'error' or flux.globalStatus|lower == 'open' %} {% elseif flux.globalStatus|lower == 'open' %} {% elseif flux.globalStatus|lower == 'cancel' %} {% endif %}
{{'list_flux.tab.id'|trans}} {{'list_flux.tab.name'|trans}} {{'list_flux.tab.source_field'|trans}} {{'list_flux.tab.source_id'|trans}} {{'list_flux.tab.date_modified'|trans}} {{'list_flux.tab.type'|trans}} {{'list_flux.tab.statut'|trans}}
{% if pager.haveToPaginate %}
{% if pager.haveToPaginate %} {{ pagerfanta(pager, 'twitter_bootstrap4', { 'routeParams' : { 'id': doc.getId, 'page' : 1, 'logPage' : 1 }, 'routeName': 'flux_info_page' } ) }} {% endif %}
{% endif %}
{% endif %}
{# ------------- MESSAGE ------------- #} {% for message in app.flashes('success') %}
{{ message }}
{% endfor %}
{% if nb > 0 %}

{{'view_flux.nblogs'|trans}}

{{ nb_logs }}

{% endif %}
{# {{ form_start(formComment) }} {{ form_widget(formComment) }} {{ form_end(formComment) }} #}
{% if nb > 0 %} {% if logPagination.pager.currentPageResults is not empty %} {% for log in logPagination.pager.currentPageResults %} {% endfor %} {% endif %}
{{'view_flux.log.id'|trans}} {{'view_flux.log.ref'|trans}} {{'view_flux.log.job'|trans}} {{'view_flux.log.date_created'|trans}} {{'view_flux.log.type'|trans}} {{'view_flux.log.msg'|trans}}
{{ log.getId }} {% if log.getRef is not empty %} {{ log.getRef }} {% else %} {{ log.getRef }} {% endif %} {% if log.getJob is not empty %} {{ log.getJob.id }} {% endif %} {{ log.getCreated|date("d/m/Y H:i:s", timezone) }}
{{ log.getType }} {% if log.getType|lower == 's' %} {% elseif log.getType|lower == 'e' %} {% elseif log.getType|lower == 'w' %} {% endif %}
{{ log.getMessage }}
{{'view_flux.log.id'|trans}} {{'view_flux.log.ref'|trans}} {{'view_flux.log.job'|trans}} {{'view_flux.log.date_created'|trans}} {{'view_flux.log.type'|trans}} {{'view_flux.log.msg'|trans}}
{# ------------- LOGS ------------- #}
{# Import the macros file #} {% import 'Flux/view/macros.html.twig' as custom_macros %} {# Use the custom_route_generator macro with the required arguments (logPage, and documentPage) #} {% set custom_route_first = custom_macros.custom_route_generator_first(logPage, documentPage) %} {% set custom_route_previous = custom_macros.custom_route_generator_previous(logPage, documentPage) %} {% set custom_route_last = custom_macros.custom_route_generator_last(logPagination.pager.nbResults // logPagination.pager.maxPerPage + 1, documentPage) %} {% set custom_route_next = custom_macros.custom_route_generator_next(logPage, documentPage) %} {% set more_than_one_page = logPagination.pager.nbResults > logPagination.pager.maxPerPage %} {# Use the generated custom_route in your links or wherever needed #} {% if more_than_one_page %}

{{logPagination.pager.currentPage}} out of {{ (logPagination.pager.nbResults / logPagination.pager.maxPerPage)|round(0, 'ceil') }}

First {% if logPagination.pager.currentPage > 1 %} Previous {% endif %} {% endif %} {# in betweeen #} {% set between_pages = (logPagination.pager.nbResults // logPagination.pager.maxPerPage) - 1 %} {% set more_than_two_pages = between_pages > 0 %} {% if more_than_two_pages %} {% for i in 2..(between_pages + 1) %} {% set custom_route_between = custom_macros.custom_route_generator_between(i, documentPage) %} {{ i }} {% endfor %} {% endif %} {# in between end #} {#
															{{ dump(logPagination.pager.nbResults) }}
															{{ dump(logPagination.pager.maxPerPage) }}
															{{ dump(logPagination.pager.nbResults % logPagination.pager.maxPerPage) }}
															{{ dump(more_than_one_page) }}
														
#} {% if logPagination.pager.currentPage < logPagination.pager.nbResults // logPagination.pager.maxPerPage + 1 and logPagination.pager.nbResults % logPagination.pager.maxPerPage != 0 %} Next {% endif %} {% if logPagination.pager.currentPage <= logPagination.pager.nbResults // logPagination.pager.maxPerPage and logPagination.pager.nbResults % logPagination.pager.maxPerPage != 0 %} Last {% endif %}
{% else %}

{{'view_flux.empty_log'|trans}}

{% endif %}
{# ------------- LOGS ------------- #}
{% if workflowLogs is not empty %} {% if nb_workflow_logs > 0 %}

{{'view_flux.nbWorflowLogs'|trans}}

{{ nb_workflow_logs }}

{% endif %}
{% for log in workflowLogs %} {% endfor %}
{{ 'view_flux.workflow_log.id'|trans }} {{ 'view_flux.workflow_log.workflow'|trans }} {{ 'view_flux.workflow_log.job'|trans }} {{ 'view_flux.workflow_log.trigger_document'|trans }} {{ 'view_flux.workflow_log.generate_document'|trans }} {{ 'view_flux.workflow_log.created_by'|trans }} {{ 'view_flux.workflow_log.status'|trans }} {{ 'view_flux.workflow_log.date_created'|trans }} {{ 'view_flux.workflow_log.message'|trans }} {{ 'view_flux.workflow_log.action_name'|trans }} {{ 'view_flux.workflow_log.action_type'|trans }}
{{ log.id }} {{ log.workflow.name }} {{ log.job.id }} {% if log.triggerDocument is not null %} {{ log.triggerDocument.id }} {% else %} {% endif %} {% if log.generateDocument is not null %} {{ log.generateDocument.id }} {% else %} {% endif %} {{ log.createdBy }}
{{ log.status }}
{{ log.dateCreated|date('Y-m-d H:i:s') }} {{ log.getMessage }} {{ log.action.name }} {{ log.action.action }}
{% endif %}
{% endblock %}