<%@ page contentType="text/html; charset=UTF-8"%><%@ include file="/WEB-INF/jspf/include/taglibs.jsp"%>

<ul class="nav nav-tabs px-4">
	<li class="nav-item"><a class="nav-link" href="#" onclick="showBlock( 'tvProductTab', 'list', tvProductQuery ); return false;">Текущие</a></li>
	<li class="nav-item"><a class="nav-link" href="#" onClick="showBlock( 'tvProductTab', 'available', tvProductQuery ); return false;">Доступные</a></li>
	<li class="nav-item"><a class="nav-link active" href="#" onClick="return false;">История</a></li>
</ul>

<div class="tile tileTabs">

<c:if test="${empty tvAccountList}">
	<div class="alert alert-primary mt-3">Аккаунты не найдены. Обратитесь в техподдержку.</div>
</c:if>

<c:forEach var="tvAccountItem" varStatus="tvAccountStatus" items="${tvAccountList}">
	<div class="mTop10 titleBottomLine"><span class="titleFont2">${tvAccountItem.title}</span><!-- <span class="paramColor" style="font-size: 10px;">[#${tvAccountItem.id}]</span> --></div>
	<c:forEach var="tvProduct" varStatus="tvProductStatus" items="${tvAccountProducts[tvAccountItem.id]}">
	<div class="flexRow" style="font-size: 0.8rem; margin-left: 1rem;">
		<div style="margin-top: 10px; margin-left: 0px;">
			<div class="titleFont3" style="margin: 0px;">${tvProduct.productSpecTitle}</div> <%-- [${tvProduct.description}] --%>
			<div style="margin: 5px 10px; line-height: 1.5rem;">
				<div class="paramColor">Период продукта: <span><fmt:formatDate type="BOTH" dateStyle="SHORT" timeStyle="MEDIUM" value="${tvProduct.timeFrom}"/> - <fmt:formatDate type="BOTH" dateStyle="SHORT" timeStyle="MEDIUM" value="${tvProduct.timeTo}"/></span></div>
			</div>
		</div>
	</div>
	<c:if test="${not tvProductStatus.last}"><div class="line"></div></c:if>
	</c:forEach>
	<c:if test="${empty tvAccountProducts[tvAccountItem.id]}">
		<div style="text-align: center; font-style: italic; color: #888;">Нет данных</div>
	</c:if>
</c:forEach>
</div>
