Subversion Repositories SmartDukaan

Rev

Rev 37212 | Rev 37256 | Go to most recent revision | Blame | Compare with Previous | 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:150px;">Start Date</th>
                        <th style="width:150px;">End Date</th>
                        <th style="width:90px;">Warranty</th>
                        <th style="width:120px;">Condition</th>
                        <th style="width:80px;">Activated</th>
                        <th style="width:80px;">Finance</th>
                        <th style="width:80px;">Affordability</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><input type="number" class="form-control input-sm hot-deal-row-field hot-deal-row-warranty" min="0" max="12" value="$deal.getWarrantyMonths()" /></td>
                            <td>
                                <select class="form-control input-sm hot-deal-row-field hot-deal-row-condition">
                                    <option value="NEW" #if("$!deal.getItemCondition()" == "NEW")selected#end>New</option>
                                    <option value="OPEN_BOX" #if("$!deal.getItemCondition()" == "OPEN_BOX")selected#end>Open Box</option>
                                    <option value="REFURBISHED" #if("$!deal.getItemCondition()" == "REFURBISHED")selected#end>Refurbished</option>
                                </select>
                            </td>
                            <td>
                                <select class="form-control input-sm hot-deal-row-field hot-deal-row-activated">
                                    <option value="true" #if($deal.isActivated())selected#end>Yes</option>
                                    <option value="false" #if(!$deal.isActivated())selected#end>No</option>
                                </select>
                            </td>
                            <td>
                                <select class="form-control input-sm hot-deal-row-field hot-deal-row-finance">
                                    <option value="true" #if($deal.isFinanceMapping())selected#end>Yes</option>
                                    <option value="false" #if(!$deal.isFinanceMapping())selected#end>No</option>
                                </select>
                            </td>
                            <td>
                                <select class="form-control input-sm hot-deal-row-field hot-deal-row-affordability">
                                    <option value="true" #if($deal.isAffordability())selected#end>Yes</option>
                                    <option value="false" #if(!$deal.isAffordability())selected#end>No</option>
                                </select>
                            </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>