Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

<div class="panel panel-default" id="hot-deals-table-panel"
     data-active-count="$activeCount" data-max-deals="$maxDeals">
    <div class="panel-heading">Hot Deal Models</div>
    <div class="panel-body">
        #if($deals.isEmpty())
            <p class="text-muted">No hot deals for this brand yet. Add the first one above.</p>
        #else
            <table class="table table-striped table-hover">
                <thead>
                    <tr>
                        <th>Model</th>
                        <th>Status</th>
                        <th style="width:170px;">Start Date</th>
                        <th style="width:170px;">End Date</th>
                        <th>Added By</th>
                        <th style="width:160px;">Action</th>
                    </tr>
                </thead>
                <tbody>
                    #foreach($deal in $deals)
                        <tr data-deal-id="$deal.getId()">
                            <td>$!deal.getCatalogDescription()</td>
                            <td>
                                #if($deal.getStatus() == "ACTIVE")
                                    <span class="label label-success">Active</span>
                                #elseif($deal.getStatus() == "SCHEDULED")
                                    <span class="label label-info">Scheduled</span>
                                #else
                                    <span class="label label-default">Expired</span>
                                #end
                            </td>
                            <td><input type="date" class="form-control input-sm hot-deal-row-start" value="$deal.getStartDate()" /></td>
                            <td><input type="date" class="form-control input-sm hot-deal-row-end" value="$deal.getEndDate()" /></td>
                            <td>$!deal.getCreatedBy()</td>
                            <td>
                                <button class="btn btn-success btn-sm save-hot-deal" type="button" style="display:none;">Save</button>
                                <button class="btn btn-danger btn-sm remove-hot-deal" type="button">Remove</button>
                            </td>
                        </tr>
                    #end
                </tbody>
            </table>
        #end
    </div>
</div>