<h2 ng-hide="targetUser">
	{{ 'tlTitle' | translate }}
</h2>
<h2 ng-show="targetUser">
	{{ 'transactionLimits' | translate }}
</h2>
<div class="row">
	<div class="col-md-12">
		<p>
			<span ng-show="targetUser" translate="tlSubtitleUser" translate-compile translate-values="targetUser"></span>
			<span ng-hide="targetUser" translate="tlSubtitle">{{ 'tlSubtitle' | translate }}</span>
		</p>
	</div>
</div>

<div class="row top-buffer">
	<div clas="col-md-12">
		<form class="form-horizontal" role="form">
			<table class="table table-striped table-hover">
				<tr>
					<th class="fit">
						{{ 'tlTransactionType' | translate }}
					</th>
					<th class="fit text-center">{{ 'tlLimit' | translate }}</th>
					<th class="fit text-center">{{ 'tlWarning' | translate }}</th>
					<th class="fit text-center">{{ 'tlTolerance' | translate }}</th>
					<th class="fit text-center">
						{{ 'tlParameter' | translate }}
					</th>
					<th class="fit text-center">
						<button class="btn btn-xs btn-success pull-right" type="button" ng-click="create()">
							<i class="fa fa-plus" aria-hidden="true"></i>
							{{ 'tlCreate' | translate }}
						</button>
					</th>
				</tr>
				<tr ng-repeat="tl in data">
					<td class="fit">
						<a href="" ng-click="showTransactionLimit(tl.id, getTransactionTypeName(tl.typeCode), tl.typeCode, parameter)">{{ tl.typeCode }} - {{ getTransactionTypeName(tl.typeCode) }}</a>
					</td>
					<td class="fit text-center">
						{{ tl.limit }}
						<span class="badge alert-warning" ng-show="tl.limit == null">{{ 'tlUnlimited' | translate }}</span>
					</td>
					<td class="fit text-center">
						<span ng-show="tl.warning != null">{{ tl.warning }}%</span>
						<span class="badge alert-warning" ng-show="tl.warning == null">{{ 'tlNoWarnings' | translate }}</span>
					</td>
					<td class="fit text-center">
						<span ng-show="tl.tolerance != null">{{ tl.tolerance }}%</span>
						<span class="badge alert-warning" ng-show="tl.tolerance == null">{{ 'tlNoTolerance' | translate }}</span>
					</td>
					<td class="fit text-center">
						{{ tl.parameter }}<em class="text-muted" ng-show="tl.parameter == null">{{ 'n_a' | translate }}</em>
					</td>
					<td class="fit text-center">
						<button class="btn btn-xs btn-danger pull-right" type="button" ng-click="delete(tl.id, getTransactionTypeName(tl.typeCode))">
							<i class="fa fa-remove" aria-hidden="true"></i>
							{{ 'remove' | translate }}
						</button>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>
