Subversion Repositories SmartDukaan

Rev

Rev 8073 | Rev 8639 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.1 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
#set($mapItem = $action.getAliveItemMap())
<link type="image/x-icon" href="/Support/images/favicon_alt.ico" rel="shortcut icon">
<link href="/Support/css/demo_page_amazon.css" type="text/css" rel="stylesheet">
<link href="/Support/css/demo_table_amazon.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="/Support/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="/Support/js/jquery.dataTables.min.js"></script>
<style type="text/css">   
* { font-family: Verdana; font-size: 96%; }
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
p { clear: both; }
.submit { margin-left: 12em; }
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
ul { padding-left: 13px;}
.dataTable { width: 100%;}
</style>
<script type="text/javascript">
$(document).ready( function() {
  $('#amazon-listed').dataTable( {
    "bAutoWidth": false,
    "iDisplayLength": 15,
                "aoColumns": [
      null,
      null,
      null,
      null,
      null,
          null,
      null,
      null,
      null,
          { "sType": "html" },
          { "sType": "html" },
      null
    ],
    "aLengthMenu": [[15, 25 ,50, 100, -1], [15 ,25, 50, 100, "All"]]
  } );
} );
</script>
<title>Amazon Listed Items</title>
</head>
<body>
        <div>
       <a style="padding-left: 10px;" href="/Support/logout">Logout</a>
</div>
<div>
    <div style="color:blue;">
    #sactionmessage()
    </div>
    <div style="color:red;">
    #sactionerror()
    </div>
    
    #drawAllItems($action.fetchItems())
</div>

</body>
</html>

#macro (drawAllItems $items)
    <table id="amazon-listed" style="width: 100%">
        <thead>
            <tr>
                <th>Item Id</th>
                                <th>Category</th>
                                <th>Asin</th>
                                <th>Saholic / Amazon Item Description</th>
                                <th>Price Difference</th>
                                <th>Risky</th>
                 <th>Status</th>
                                <th>Shipping</th>
                                <th>Inventory Override</th>
                                <th>Mfn Listing</th>
                                <th>Fba Listing</th>
                                <th>Action</th>
            </tr>
        </thead>
        <tbody>
    #foreach ( $item in $items )
            <tr style="border: 1px">
                <td>$item.getItemid()</td>
                                <td>$item.getCategory()</td>
                                <td>$item.getAsin()</td>
                                #if ($mapItem.get($item.getItemid()))
                                <td style="text-align:left;">SAHOLIC: $mapItem.get($item.getItemid()).getBrand() $mapItem.get($item.getItemid()).getModelName() $mapItem.get($item.getItemid()).getModelNumber() $mapItem.get($item.getItemid()).getColor()<br /> AMAZON: $item.getName()</td>
                                #else
                                        #set ($saholicItem = $action.getSaholicItem("$item.getItemid()"))
                                <td style="text-align:left;">SAHOLIC: $saholicItem.getBrand() $saholicItem.getModelName() $saholicItem.getModelNumber() $saholicItem.getColor()<br /> AMAZON: $item.getName()</td>
                                #end
                                #if ($mapItem.get($item.getItemid()))
                                        #if($mapItem.get($item.getItemid()).getSellingPrice() != $item.getFbaPrice() || $mapItem.get($item.getItemid()).getSellingPrice() != $item.getSellingPrice())
                                                <td>Saholic: $mapItem.get($item.getItemid()).getSellingPrice() / FBA: $item.getFbaPrice() / MFN: $item.getSellingPrice()</td>
                                        #else
                                                <td>-</td>
                                        #end
                                #else
                                        #if($saholicItem.getSellingPrice() != $item.getFbaPrice() || $saholicItem.getSellingPrice() != $item.getSellingPrice())
                                                <td>$saholicItem.getSellingPrice() / FBA: $item.getFbaPrice() / MFN: $item.getSellingPrice()</td>
                                        #else
                                                <td>-</td>
                                        #end
                                #end
                                #if ($mapItem.get($item.getItemid()))
                                        #if($mapItem.get($item.getItemid()).isRisky())
                                                <td><a style="visibility: hidden;">A</a><img alt="active" src="/Support/images/active.ico" style="width: 18px;"></td>
                                        #else
                                                <td><a style="visibility: hidden;">I</a><img alt="Inactive" src="/Support/images/inactive.ico" style="width: 18px;"></td>
                                        #end
                                #else
                                        #if($saholicItem.isRisky())
                                                <td><a style="visibility: hidden;">A</a><img alt="active" src="/Support/images/active.ico" style="width: 18px;"></td>
                                        #else
                                                <td><a style="visibility: hidden;">I</a><img alt="Inactive" src="/Support/images/inactive.ico" style="width: 18px;"></td>
                                        #end
                                #end
                #if ($mapItem.get($item.getItemid()))
                                        <td>$mapItem.get($item.getItemid()).getItemStatus()</td>
                                #else
                                        <td>$saholicItem.getItemStatus()</td>
                                #end
                                #if($item.isIsCustomTime())
                                        <td>Set To Custom</td>
                                #else
                                        <td>Set To Default</td>
                                #end
                                #if($item.isIsInventoryOverride())
                                        <td><a style="visibility: hidden;">A</a><img alt="active" src="/Support/images/active.ico" style="width: 18px;"></td>
                                #else
                                        <td><a style="visibility: hidden;">I</a><img alt="Inactive" src="/Support/images/inactive.ico" style="width: 18px;"></td>
                                #end
                                #if($item.isIsNonFba())
                                        <td><a style="visibility: hidden;">A</a><img alt="active" src="/Support/images/active.ico" style="width: 18px;"></td>
                                #else
                                <td><a style="visibility: hidden;">I</a><img alt="inactive" src="/Support/images/inactive.ico" style="width: 18px;"></td>
                                #end
                                #if($item.isIsFba())
                                        <td><a style="visibility: hidden;">A</a><img alt="active" src="/Support/images/active.ico" style="width: 18px;"></td>
                                #else
                                        <td><a style="visibility: hidden;">I</a><img alt="inactive" src="/Support/images/inactive.ico" style="width: 18px;"></td>
                                #end
                                <td><a href="/Support/amazon-list/$item.getItemid()/edit">View/Edit</a></td>
                                </td>
            </tr>
    #end
        </tbody>
    </table>
        <br>
                <br>
                        <br>
                <hr/>
#end