{% extends "/features/feature-base.twig" %}

{% block options_body %}
<div class="row">
	<div class="span12">

		{% if aAudits|length %}

			{% for aAuditDataContext in aAudits %}
				<h4 class="table-title">{{ aAuditDataContext.title }}</h4>
				<table class="table table-hover table-striped table-audit_trail">
					<tr>
						<th class="cell-time">{{ strings.at_time }}</th>
						<th class="cell-event">{{ strings.at_event }}</th>
						<th class="cell-message">{{ strings.at_message }}</th>
						<th class="cell-username">{{ strings.at_username }}</th>
						<th class="cell-category">{{ strings.at_category }}</th>
						<th class="cell-ip">{{ strings.at_ipaddress }}</th>
					</tr>
					{% for aAuditData in aAuditDataContext.trail %}
					<tr>
						<td class="cell-time">{{ aAuditData.created_at }}</td>
						<td class="cell-event">{{ aAuditData.event }}</td>
						<td class="cell-message">{{ aAuditData.message }}</td>
						<td class="cell-username">{{ aAuditData.wp_username }}</td>
						<td class="cell-category">{{ aAuditData.category }}</td>
						<td class="cell-ip {{ ( nYourIp is sameas( aAuditData.ip ) ) ? strings.at_you : 'your-ip' }}">
							{{ aAuditData.ip }}
							{{ ( nYourIp is sameas( aAuditData.ip ) ) ? strings.at_you : '' }}
						</td>
					</tr>
					{% endfor %}
				</table>
			{% endfor %}

		{% else %}
			{{ strings.at_no_audit_entries }}
		{% endif %}

	</div><!-- / span9 -->
</div><!-- / row -->
<style>

	h4.table-title {
		font-size: 20px;
		margin: 20px 0 10px 5px;
	}
	th {
		background-color: white;
	}

	tr.row-Warning td {
		background-color: #F2D5AE;
	}
	tr.row-Critical td {
		background-color: #DBAFB0;
	}
	tr.row-log-header td {
		border-top: 2px solid #999 !important;
	}
	td.cell-log-type {
		text-align: right !important;
	}
	td .cell-section {
		display: inline-block;
	}
	td .section-ip {
		width: 68%;
	}
	td .section-timestamp {
		text-align: right;
		width: 28%;
	}
</style>
{% endblock %}