Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

<div class="modal-header ">
    <h3 class="modal-title">List of Gifts</h3>
    <button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
    <table class="table table-bordered table-hover" id="giftTable">
        <thead class="thead-light">
        <tr>
            <th>Gift Name</th>
            <th>Validity</th>
            <th>Min. Cart Value</th>
            <th>Max. Redemptions</th>
            <th>Thumbnail</th>
            <th>Action</th>
        </tr>
        </thead>
        <tbody>
            #foreach($gift in $giftList)
            <tr>
                <td>$gift.name</td>
                <td>$gift.validity</td>
                <td>$gift.minCartValue</td>
                <td>$gift.maxRedemptions</td>
                <td>
                    <img src="/document/$gift.thumbnailUrl"
                         class="img-thumbnail"
                         width="50"
                         alt="$gift.name thumbnail">
                </td>
                <td class="text-center">
                    <button class="delete-gift btn btn-sm btn-danger" value="$gift.id">
                        <i class="fa fa-trash"></i>
                    </button>
                </td>
            </tr>
            #end
        </tbody>
    </table>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
<script>
    var dtable = $('#giftTable').DataTable(
            {
                "bPaginate": true,
                "bLengthChange": true,
                "bFilter": true,
                "bInfo": false,
                "bAutoWidth": false,
                "pageLength": 20,
            });
</script>