<h2>
	{{ 'billTitle' | translate }}
	<i class="fa fa-refresh fa-spin fa-fw" ng-show="loading"></i>
</h2>

<form class="form-horizontal" role="form">
	<table ng-table="tableParams" class="table table-condensed table-striped table-hover">
		<tr ng-repeat="row in $data">
			<td class="fit" data-title="'user' | translate" sortable="'userName'" filter="{userName: 'text'}"><a href="#/transactions?userId={{row.id}}">{{ row.userName }}</a></td>
			<td class="fit" data-title="'udCustomerId' | translate" sortable="'customerId'" filter="{customerId: 'text'}"><a href="#/transactions?userId={{row.id}}">{{ row.customerId }}</a></td>
			<td class="fit" data-title="'nPADES' | translate" sortable="'nPADES.success'"><a href="#/transactions?type=PadesSignature&success=true&userId={{row.id}}">{{ row.nPADES.success }}</a> <a href="#/transactions?type=PadesSignature&success=false&userId={{row.id}}">({{ row.nPADES.fail }})</a></td>
			<td class="fit" data-title="'nCADES' | translate" sortable="'nCADES.success'"><a href="#/transactions?type=CadesSignature&success=true&userId={{row.id}}">{{ row.nCADES.success }}</a> <a href="#/transactions?type=CadesSignature&success=false&userId={{row.id}}">({{ row.nCADES.fail }})</a></td>
			<td class="fit" data-title="'nXADES' | translate" sortable="'nXADES.success'"><a href="#/transactions?type=XmlSignature&success=true&userId={{row.id}}">{{ row.nXADES.success }}</a> <a href="#/transactions?type=XmlSignature&success=false&userId={{row.id}}">({{ row.nXADES.fail }})</a></td>
			<td class="fit" data-title="'nAuths' | translate" sortable="'nAuths.success'"><a href="#/transactions?type=CertAuthentication&success=true&userId={{row.id}}">{{ row.nAuths.success }}</a> <a href="#/transactions?type=CertAuthentication&success=false&userId={{row.id}}">({{ row.nAuths.fail }})</a></td>
			<td class="fit" data-title="'nTimestamps' | translate" sortable="'nTimestamps.success'"><a href="#/transactions?type=Timestamp&success=true&userId={{row.id}}">{{ row.nTimestamps.success }}</a> <a href="#/transactions?type=Timestamp&success=false&userId={{row.id}}">({{ row.nTimestamps.fail }})</a></td>
			<td class="fit" data-title="'nOpenSig' | translate" sortable="'nOpenSig.success'"><a href="#/transactions?type=OpenSignature&success=true&userId={{row.id}}">{{ row.nOpenSig.success }}</a> <a href="#/transactions?type=OpenSignature&success=false&userId={{row.id}}">({{ row.nOpenSig.fail }})</a></td>
			<td class="fit" data-title="'nPdfMarks' | translate" sortable="'nPdfMarks.success'"><a href="#/transactions?type=AddPdfMarks&success=true&userId={{row.id}}">{{ row.nPdfMarks.success }}</a> <a href="#/transactions?type=AddPdfMarks&success=false&userId={{row.id}}">({{ row.nPdfMarks.fail }})</a></td>
			<td class="fit" data-title="'total' | translate" sortable="'total.success'"><a href="#/transactions?success=true&userId={{row.id}}">{{ row.total.success }}</a> <a href="#/transactions?success=false&userId={{row.id}}">({{ row.total.fail }})</a></td>
		</tr>
		<tr>
			<td class="fit">{{ 'total' | translate }}</td>
			<td class="fit"></td>
			<td class="fit">{{sum(data, 'nPADES', 'success')}} ({{sum(data, 'nPADES', 'fail')}})</td>
			<td class="fit">{{sum(data, 'nCADES', 'success')}} ({{sum(data, 'nCADES', 'fail')}})</td>
			<td class="fit">{{sum(data, 'nXADES', 'success')}} ({{sum(data, 'nXADES', 'fail')}})</td>
			<td class="fit">{{sum(data, 'nAuths', 'success')}} ({{sum(data, 'nAuths', 'fail')}})</td>
			<td class="fit">{{sum(data, 'nTimestamps', 'success')}} ({{sum(data, 'nTimestamps', 'fail')}})</td>
			<td class="fit">{{sum(data, 'nOpenSig', 'success')}} ({{sum(data, 'nOpenSig', 'fail')}})</td>
			<td class="fit">{{sum(data, 'nPdfMarks', 'success')}} ({{sum(data, 'nPdfMarks', 'fail')}})</td>
			<td class="fit">{{sum(data, 'total', 'success')}} ({{sum(data, 'total', 'fail')}})</td>
		</tr>
	</table>
</form>
