{% import "macros/util.tpl" as util %}
<table class="GridPanel SortableGrid AutoExpand" cellspacing="0" cellpadding="0" border="0" id="IndexGrid" style="width:100%;">
	<tr align="center">
		<td colspan="12" class="PagingNav">
			{{ util.paging(numCustomers, perPage, currentPage, pageURL, true) }}
		</td>
	</tr>
</table>
<div class="panel panel-default" style="display: {{ DisplayGrid|safe }}">
	<div class="panel-body pn">
		<div class="table-responsive">
			<table class="GridPanel SortableGrid AutoExpand m-0 table table-striped" cellspacing="0" cellpadding="0" border="0" id="IndexGrid" style="width:100%;">
				<thead>
					<tr>
						<td colspan="14">
							<table class="LetterSort" cellspacing="2" cellpadding="0" border="0">
								<tr>
									{% for letter in letters %}
										<td width="3%">
											<a class="SortLink {% if letter == activeLetter %}ActiveLetter{% endif %}" href="index.php?ToDo=viewCustomers&amp;{{ letterURL|http_build_query }}&amp;letter={{ letter }}">{{ letter }}</a></td>
									{% endfor %}
									<td width="3%">
										<a class="SortLink" href="index.php?ToDo=viewCustomers&amp;{{ letterURL|http_build_query }}">{% lang 'Clear' %}</a></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<th align="center"><input type="checkbox" onclick="ToggleDeleteBoxes(this.checked)"></th>
						<th>&nbsp;</th>
						<th>&nbsp;</th>
						<th>
							{% lang 'CustName' %} &nbsp;
							{{ SortLinksName|safe }}
						</th>
						<th>
							{% lang 'Email' %} &nbsp;
							{{ SortLinksEmail|safe }}
						</th>
						<th>
							{% lang 'Phone' %} &nbsp;
							{{ SortLinksPhone|safe }}
						</th>
						<th style="display: {{ HideGroup|safe }}">
							{% lang 'CustomerGroup' %} &nbsp;
							{{ SortLinksGroup|safe }}
						</th>
						<td style="display: {{ HideStoreCredit|safe }}">
							{% lang 'StoreCredit' %} &nbsp;
							{{ SortLinksStoreCredit|safe }}
						</td>
						<td>
							{% lang 'CustDateCreated' %} &nbsp;
							{{ SortLinksDate|safe }}
						</td>
						<th>
							{% lang 'NumOrders' %} &nbsp;
							{{ SortLinksNumOrders|safe }}
						</th>
						<td>
							Cadastro
						</td>
                		<td>
							Afiliado
						</td>
						<th>
							{% lang 'Action' %}
						</th>
					</tr>
				</thead>

				<tbody>
					{{ CustomerGrid|safe }}
				</tbody>
			</table>
		</div>
	</div>
	<table class="GridPanel SortableGrid AutoExpand" cellspacing="0" cellpadding="0" border="0" id="IndexGrid" style="width:100%;">
		<tr align="center">
			<td colspan="12" class="PagingNav">
				{{ util.paging(numCustomers, perPage, currentPage, pageURL, true) }}
			</td>
		</tr>
	</table>
</div>