Subversion Repositories SmartDukaan

Rev

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

<!DOCTYPE html>
<html>
<head>
        <title>Phone Price Comparison</title>
        <link rel="stylesheet" type="text/css" href="/static/facebox.css" />
        <style type="text/css">
body    {       font-size: 12px;        }
.even   {       background-color: #EDEFF4;      }
td      {       padding: 4px; font-size: 12px;  }
.price  {       width: 125px;   text-align: center;     }

.red    {       background-color: #FF9E9E;      }

.best {
        background-image: url(/static/images/best.png);
        background-repeat: no-repeat;
}
        </style>
</head>
<body>
        <h2>Phone Price Comparison Chart</h2>
        <br>
{% if len(data) > 0 %}
        <table id="datatable">
        <thead>
                <tr>
                        <th></th>
                        <th>Saholic</th>
                        <th>Flipkart</th>
                        <th>HomeShop18</th>
                        <th>Infibeam</th>
                        <th>Let's Buy</th>
                </tr>
        </thead>
        <tbody>
        {% for phone in data %}
                <tr>
                        <td class="name">{{ phone['product_name'] }}</td>
                        <td class="price">{{ phone['saholic']['price'] }}</td>
                        
                {% if phone['flipkart']['data'] is not None %}
                        <td class="price conflict" data="{{ phone['flipkart']['data'] }}">
                {% else %}
                        <td class="price">
                {% end %}
                
                {% if phone['flipkart']['price'] is None and phone['flipkart']['data'] is None %}
                                {{ phone['flipkart']['text'] }}
                {% else %}
                                <a href="{{ 'http://www.flipkart.com' + phone['flipkart']['url'] if phone['flipkart']['url'] is not None else '#' }}" target="_blank">
                                        {{ phone['flipkart']['text'] }}
                                </a>
                {% end %}
                        </td>
                
                {% if phone['homeshop18']['data'] is not None %}
                        <td class="price conflict" data="{{ phone['homeshop18']['data'] }}">
                {% else %}
                        <td class="price">
                {% end %}
                
                {% if phone['homeshop18']['price'] is None and phone['homeshop18']['data'] is None %}
                                {{ phone['homeshop18']['text'] }}
                {% else %}
                                <a href="{{ phone['homeshop18']['url'] if phone['homeshop18']['url'] is not None else '#' }}" target="_blank">
                                        {{ phone['homeshop18']['text'] }}
                                </a>
                {% end %}
                        </td>
                        
                {% if phone['infibeam']['data'] is not None %}
                        <td class="price conflict" data="{{ phone['infibeam']['data'] }}">
                {% else %}
                        <td class="price">
                {% end %}
                
                {% if phone['infibeam']['price'] is None and phone['infibeam']['data'] is None %}
                                {{ phone['infibeam']['text'] }}
                {% else %}
                                <a href="{{ 'http://www.infibeam.com' + phone['infibeam']['url'] if phone['infibeam']['url'] is not None else '#' }}" target="_blank">
                                        {{ phone['infibeam']['text'] }}
                                </a>
                {% end %}
                        </td>
                
                {% if phone['letsbuy']['data'] is not None %}
                        <td class="price conflict" data="{{ phone['letsbuy']['data'] }}">
                {% else %}
                        <td class="price">
                {% end %}
                
                {% if phone['letsbuy']['price'] is None and phone['letsbuy']['data'] is None %}
                                {{ phone['letsbuy']['text'] }}
                {% else %}
                                <a href="{{ phone['letsbuy']['url'] if phone['letsbuy']['url'] is not None else '#' }}" target="_blank">
                                        {{ phone['letsbuy']['text'] }}
                                </a>
                {% end %}
                        </td>
                </tr>
        {% end %}
        </tbody>
        </table>
{% end %}
        <script type="text/javascript" src="/static/jquery-1.6.2.min.js"></script>
        <script type="text/javascript" src="/static/facebox.js"></script>
        <script type="text/javascript" src="/static/chart.js"></script>
</body>
</html>