<div class="tab-pane fade in bdr-w-0 page-list" id="recent-activity-container">
    <!-- auditlog -->
    <div class="table-responsive">
        <table class="table table-hover" id="campaign-auditlog">
            <tr>
                <th class="timeline-icon np"></th>
                <th class="table-expand np">
                    <a class="table-expand-button" data-activate-details="all" data-toggle="tooltip" title="{{ 'mautic.lead.timeline.toggle_details'|trans }}">
                        <span class="ri-arrow-down-s-line"></span>
                    </a>
                </th>
                {{ include('@MauticCore/Helper/tableheader.html.twig', {
                    'text': 'mautic.campaign.timeline.user_name',
                    'class': 'timeline-name',
                    'target': '#recent-activity-container',
                }) }}
                {{ include('@MauticCore/Helper/tableheader.html.twig', {
                    'text': 'mautic.audit_log.report.action',
                    'class': 'visible-md visible-lg timeline-type',
                    'target': '#recent-activity-container',
                }) }}
                {{ include('@MauticCore/Helper/tableheader.html.twig', {
                    'text': 'mautic.lead.timeline.event_timestamp',
                    'class': 'visible-md visible-lg timeline-timestamp',
                    'target': '#recent-activity-container',
                }) }}
            </tr>
            <tbody>
            {% for log in logs %}
                {% set counter = loop.index0 + 1 %}
                {% set icon = 'ri-history-line' %}
                {% if log.action == 'create' %}
                    {% set icon = 'ri-check-line' %}
                {% endif %}
                {% set rowStripe = cycle(['', 'timeline-row-highlighted'], loop.index0) %}
                <tr class="timeline-row {{ rowStripe }}">
                    <td class="timeline-icon np">
                        <span class="fa ri-fw {{ icon }}"></span>
                    </td>
                    <td class="table-expand np">
                        {% if log.action != 'create' %}
                        <a href="javascript:void(0);"
                           data-activate-details="{{ counter }}"
                           class="table-expand-button"
                           data-toggle="tooltip"
                           title="{{ 'mautic.lead.timeline.toggle_details'|trans }}">
                            <span class="ri-arrow-down-s-line"></span>
                        </a>
                        {% endif %}
                    </td>
                    <td class="timeline-name">{{ log.userName }}</td>
                    <td class="timeline-type">{{ ('mautic.campaign.event.'~log.action)|trans }}
                    </td>
                    <td class="timeline-timestamp">{{ dateToText(log.dateAdded, 'local', 'Y-m-d H:i:s', true) }}</td>
                </tr>
                {% if log.action != 'create' %}
                <tr class="timeline-row {{ rowStripe }} timeline-details hide" id="auditlog-details-{{ counter }}">
                    <td colspan="5">
                        {{- include('@MauticCampaign/Campaign/Tab/_details.html.twig', {'details': log.details|default({})}) -}}
                    </td>
                </tr>
                {% endif %}
            {% endfor %}
            </tbody>
        </table>
    </div>
</div>

