@using Expedience.Infrastructure.Models;
@using Expedience.Web.Extensions;
@{
@model IEnumerable<DutyCompletionRecord>
}

<table id="dutyTable" data-toggle="table">
	<thead>
		<tr>
			<th></th>
			<th></th>
			<th colspan="2">Normal</th>
			<th colspan="2">Solo</th>
			<th colspan="2">Min iLvl No Echo</th>
		</tr>
		<tr>
			<th data-sortable="true">Level</th>
			<th data-sortable="true">Duty</th>
			<th data-sortable="true" data-sorter="durationSorter">Min</th>
			<th data-sortable="true" data-sorter="durationSorter">Avg</th>
			<th data-sortable="true" data-sorter="durationSorter">Min</th>
			<th data-sortable="true" data-sorter="durationSorter">Avg</th>
			<th data-sortable="true" data-sorter="durationSorter">Min</th>
			<th data-sortable="true" data-sorter="durationSorter">Avg</th>
		</tr>
	</thead>
	<tbody>
		@foreach (var record in Model)
		{
			<tr>
				<td>@record.Level</td>
				<td>@record.ContentName</td>
				<td>@record.MinNormal.Format()</td>
				<td>@record.AvgNormal.Format()</td>
				<td>@record.MinSolo.Format()</td>
				<td>@record.AvgSolo.Format()</td>
				<td>@record.MinMine.Format()</td>
				<td>@record.AvgMine.Format()</td>
			</tr>
		}
	</tbody>
</table>