<fieldset class="show">
    <h1><a class="show el">Subscription Logs <i class="fa fa-caret-right"></i></a></h1>
    <table class="manage-items">
        <thead>
            <tr>
                <th>Date/Time</th>
                <th>Action</th>
                <th>Description</th>
                <th>Actor</th>
                <th>Source</th>
                <th>Changes</th>
                <th>IP Address</th>
                <th class="center">Actions</th>
            </tr>
        </thead>
        <tbody>
            {% for log in logs %}
                <tr>
                    <td>{{ log.created_at }}</td>
                    <td>
                        <span class="badge badge-{{ log.action_type }}">
                            {{ log.action_type|replace({'_': ' '})|title }}
                        </span>
                    </td>
                    <td>{{ log.action_description }}</td>
                    <td>{{ log.actor }}</td>
                    <td>
                        <span class="badge badge-{{ log.source | title  }}">
                            {{ log.source | title }}
                        </span>
                    </td>
                    <td>
                        {% if log.changes %}
                            <small class="text-muted">{{ log.changes|truncate(30) }}</small>
                        {% else %}
                            <span class="text-muted">-</span>
                        {% endif %}
                    </td>
                    <td>
                        <small>{{ log.ip_address ?? '-' }}</small>
                    </td>
                    <td class="center">
                        <a href="{{ log.actions.view }}" class="edit">
                            <i class="fa fa-eye"></i>
                        </a>
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
</fieldset>