<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
  <script type="text/javascript" th:src="@{/js/translator/translator.js}"></script>
</th:block>
<div layout:fragment="content">
  <main class="pt-3">
    <h4>어권별 현황</h4>
    <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
    <div class="row mx-0">
      <div class="col-12 card text-center">
        <div class="card-body">
          <div class="row justify-content-start">
            <div class="col-12">
              <div class="card">
                <div class="card-body">
                  <div class="row">
                    <table class="table table-striped">
                      <thead>
                      <tr>
                        <th colspan="2">어권별 구분</th>
                        <th>총계</th>
                        <th>중부청</th>
                        <th>서해청</th>
                        <th>남해청</th>
                        <th>동해청</th>
                        <th>제주청</th>
                      </tr>
                      <tr> 
                        <th>연번</th>
                        <th>계</th>
                        <th:block th:if="${not #strings.isEmpty(total)}">
                        <th th:text="${total.total_total}"></th>
                        <th th:text="${total.total_center}"></th>
                        <th th:text="${total.total_west}"></th>
                        <th th:text="${total.total_south}"></th>
                        <th th:text="${total.total_east}"></th>
                        <th th:text="${total.total_jeju}"></th> 
                        </th:block>
                        <th:block th:unless="${not #strings.isEmpty(total)}">
                        <th>0</th>
                        <th>0</th>
                        <th>0</th>
                        <th>0</th>
                        <th>0</th>
                        <th>0</th>
                        </th:block>                       
                      </tr>
                      </thead>
                      <tbody>
                      <tr class="" th:each="cnt,index:${cntList}">
                      	<td th:text="${index.index+1}"></td>
                      	<td th:text="${cnt.lang}"></td>
                      	<td th:text="${cnt.cnt_total}"></td>  
                      	<td th:text="${cnt.cnt_center}"></td>
                      	<td th:text="${cnt.cnt_west}"></td>
                      	<td th:text="${cnt.cnt_south}"></td>
                      	<td th:text="${cnt.cnt_east}"></td>
                      	<td th:text="${cnt.cnt_jeju}"></td>                 	                   
                      </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="row justify-content-center">
                    <div class="col-auto">
                      <div class="col-auto">
			          <button id="excelDown">엑셀다운</button>
			        </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </main>

</div>
</html>