Subversion Repositories SmartDukaan

Rev

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

<div id="hot-deals-table-panel" data-page="$page" data-pages="$pages">
    <div class="panel-body">
        #if($deals.isEmpty())
            <p class="text-muted">No hot deals found.</p>
        #else
            <table class="table table-striped table-hover">
                <thead>
                    <tr>
                        <th style="width:32px;"><input type="checkbox" id="hot-deal-select-all" title="Select all on page" /></th>
                        <th>Brand</th>
                        <th>Model</th>
                        <th>OEM Model</th>
                        <th style="width:85px;">Warranty</th>
                        <th style="width:115px;">Condition</th>
                        <th style="width:75px;">Fresh</th>
                        <th style="width:75px;">Finance</th>
                        <th style="width:75px;">Affordability</th>
                        <th>Added By</th>
                        <th style="width:150px;">Action</th>
                    </tr>
                </thead>
                <tbody>
                    #foreach($deal in $deals)
                        <tr data-deal-id="$deal.getId()" data-catalog-id="$deal.getCatalogItemId()">
                            <td><input type="checkbox" class="hot-deal-select" /></td>
                            <td>$!deal.getOemBrand()</td>
                            <td>$!deal.getCatalogDescription()</td>
                            <td>
                                #if($deal.getOemCatalogId())
                                    $!deal.getOemCatalogDescription()
                                #else
                                    <span class="text-muted">Not mapped</span>
                                #end
                            </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-fresh">
                                    <option value="true" #if($deal.isFresh())selected#end>Yes</option>
                                    <option value="false" #if(!$deal.isFresh())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 class="panel-footer" style="display:flex;align-items:center;justify-content:space-between;">
        <span class="text-muted">$total model(s) &middot; Page $page of $pages</span>
        <span>
            <button class="btn btn-default btn-sm hot-deal-page-prev" type="button" #if($page <= 1)disabled#end>&laquo; Prev</button>
            <button class="btn btn-default btn-sm hot-deal-page-next" type="button" #if($page >= $pages)disabled#end>Next &raquo;</button>
        </span>
    </div>
</div>