Subversion Repositories SmartDukaan

Rev

Rev 36563 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<script>
    $(function() {
        $('#flagshipTable').DataTable({
            order: [[3, 'desc']]
        });
    });
</script>

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.12/datatables.min.css"/>

<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><i class="icon_document_alt"></i>Flagship Models</h3>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
                <li><i class="icon_document_alt"></i>Flagship Models</li>
            </ol>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-5">
            <div class="panel panel-default">
                <div class="panel-heading">Add Flagship Model</div>
                <div class="panel-body">
                    <div class="form-group">
                        <label>Catalog Item</label>
                        <input type="text" class="form-control flagship-item-search"
                               autocomplete="off" value=""
                               placeholder="Search for product..." />
                    </div>
                    <div class="form-group">
                        <label>Start Date</label>
                        <input type="date" id="flagship-start-date" class="form-control" />
                    </div>
                    <div class="form-group">
                        <label>End Date (optional, leave blank for open-ended)</label>
                        <input type="date" id="flagship-end-date" class="form-control" />
                    </div>
                    <button class="btn btn-primary add-flagship-model" type="button">Add Flagship</button>
                </div>
            </div>
        </div>

        <div class="col-lg-7">
            <div class="panel panel-default">
                <div class="panel-heading">Current Flagship Models</div>
                <div class="panel-body">
                    <table class="table table-striped table-advance table-hover" id="flagshipTable">
                        <thead>
                            <tr>
                                <th>Model</th>
                                <th>Start Date</th>
                                <th>End Date</th>
                                <th>Created On</th>
                                <th>Created By</th>
                                <th>Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            #if(!$flagshipModels.isEmpty())
                                #foreach($fm in $flagshipModels)
                                    <tr>
                                        <td>$!fm.getCatalogDescription()</td>
                                        <td>$fm.getStartDate()</td>
                                        <td>#if($fm.getEndDate())$fm.getEndDate()#else<span class="label label-success">Open</span>#end</td>
                                        <td>$fm.getCreatedOn().toLocalDate()</td>
                                        <td>$!fm.getCreatedBy()</td>
                                        <td>
                                            <button class="btn btn-danger btn-sm remove-flagship" data-requestid="$fm.getId()" type="button">Remove</button>
                                        </td>
                                    </tr>
                                #end
                            #end
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>