<div class="content-header row">
    <h1> Coupang </h1>
</div>

<style>
    .modal-dialog {
        margin: 30px auto;
    }

    .modal-body {
        position: relative;
        padding: 0px;
    }

    .close {
        position: absolute;
        right: -30px;
        top: 0;
        z-index: 999;
        font-size: 2rem;
        font-weight: normal;
        color: #fff;
        opacity: 1;
    }
</style>
<div id="dsItemListTableTool">
    <div class="form-inline" role="form">
        <select class="form-control btn btn-default ds-market-category">
            <option value="">카테고리</option>
            <?php foreach ($categories as $c) echo '<option value="' . $c->id . '">' . $c->title . '</option>' ?>
        </select>


        <div class="input-group input-daterange">
            <input type="text" class="form-control">
            <div class="input-group-addon">to</div>
            <input type="text" class="form-control">
        </div>


        <input type="text" class="form-control keyword-search-input" name="keyword" placeholder="제목을 입력해주세요">

        <button type="submit" class="btn btn-primary ds-search-btn">검색</button>
        <select class="form-control btn btn-default show-modify-select" data-basepath="/data/">
            <option value="">선택된 상품</option>

        </select>


        <div class="input-group date">
            <button class="form-control btn btn-default" data-toggle="modal" data-target="#uploadModal">Upload CSV</button>
            <div class="input-group-addon"> OR </div>
            <input type="text" class="form-control ds-input-asin">
            <div class="input-group-addon">
                <span class="glyphicon glyphicon glyphicon-plus"></span>
            </div>
        </div>


        <button class="form-control btn btn-info show-export-excel">Excel</button>

    </div>
</div>
<table id="show-table" class="order-table fill table-condensed all-ds-item-list" data-page-size="50" data-page-list="[50,100,250,500,1000]" data-toolbar="#dsItemListTableTool" data-method="post" data-side-pagination="server" data-pagination="true" data-show-export="true" data-export-types="['excel','sheet']" data-show-refresh="true" data-show-columns="true" data-pagination-v-align="both" data-click-to-select="true" data-sort-name="vcDateCreated" data-sort-order="desc" data-url="/ds/coupang/all">
    <thead>
        <tr>
            <th data-field="state" data-checkbox="true"></th>
            <th data-field="sellerProductId" data-align="left" data-sortable="true">상품번호</th>
            <th data-field="sellerProductName" data-align="left" data-sortable="true">상품명</th>
            <th data-field="displayCategoryCode" data-align="left" data-sortable="true">표시카테고리</th>
            <th data-field="categoryId" data-align="left" data-sortable="true">카테고리</th>
            <th data-field="productId" data-align="left" data-sortable="true">상품코드</th>
            <th data-field="vendorId" data-align="left" data-sortable="true">업체코드</th>
            <th data-field="mdId" data-align="left" data-sortable="true">관리자코드</th>
            <th data-field="mdName" data-align="left" data-sortable="true">관리자명</th>
            <th data-field="saleStartedAt" data-align="left" data-sortable="true">판매시작일</th>
            <th data-field="saleEndeddAt" data-align="left" data-sortable="true">판매종료일</th>
            <th data-field="brand" data-align="left" data-sortable="true">브랜드</th>
            <th data-field="statusName" data-align="left" data-sortable="true">상태</th>            
            <th data-field="createdAt" data-align="center" data-width="150" data-sortable="true">등록일</th>
            <th data-field="id" data-width="50" data-align="center" data-formatter="DS.fn.operateFormatter" data-events="DS.fn.amazonTableOperateEvents">변경</th>
        </tr>
    </thead>

</table>

<?php $this->load->view('pages/amazon/item_modal') ?>

<form class="export-hide hide" action="/data/export" method="post"><input type="text" name="videos"></form>