<div class="content-header row">
    <h1> Amazon </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/amazon/all" data-single-select="true">
    <thead>
        <tr>
            <th data-field="state" data-checkbox="true"></th>
            <th data-field="asin" data-align="left" data-sortable="true" data-formatter="DS.fn.AmazonItemAsinFormatter">ASIN</th>
            <th data-field="seller" data-align="left" data-sortable="true">Seller</th>
            <th data-field="img" data-align="left" data-sortable="true" data-formatter="DS.fn.AmazonItemImageFormatter">Image</th>
            <th data-field="title" data-align="left" data-sortable="true" data-formatter="DS.fn.AmazonItemTitleFormatter">Title</th>
            <th data-field="stock" data-align="left" data-sortable="true">Stock</th>
            <th data-field="price" data-align="left" data-sortable="true">Price</th>
            <th data-field="categoryLink" data-align="left" data-sortable="true" data-formatter="DS.fn.AmazonItemCategoryFormatter">AMZ Category</th>
            <th data-field="created_at" data-align="center" data-width="150" data-sortable="true">Updated</th>
            <th data-field="id" data-width="50" data-align="center" data-formatter="DS.fn.operateFormatter" data-events="DS.fn.amazonTableOperateEvents">Item Operate</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>