Subversion Repositories SmartDukaan

Rev

Rev 3551 | Rev 5291 | 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" />
        <link rel="stylesheet" type="text/css" href="/static/chart.css" />
</head>
<body>
        <h2>Phone Price Comparison Chart</h2>
{% if len(data) > 0 %}
        <table>
        <thead>
                <tr>
                        <th width="264">&nbsp;</th>
                        <th width="131">Saholic</th>
                        <th width="131">Flipkart</th>
                        <th width="131">HomeShop18</th>
                        <th width="131">Infibeam</th>
                        <th width="131">Let's Buy</th>
                        <th>Max-Min<br />difference</th>
                </tr>
        </thead>
        </table>
<div id="datatable-container">
        <table id="datatable">
        <tbody>
        {% for phone in data %}
                <tr id="{{ phone['entity_id'] }}">
                        <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'] }}" source="flipkart">
                {% else %}
                        <td class="price" source="flipkart">
                {% end %}
                
                {% if phone['flipkart']['price'] is None and phone['flipkart']['data'] is None %}
                                {{ phone['flipkart']['text'] }}
                
                {% elif phone['flipkart']['data'] is not None %}
                                <a href="{{ 'http://www.flipkart.com' + phone['flipkart']['url'] if phone['flipkart']['url'] is not None else '#' }}">
                                        {{ phone['flipkart']['text'] }}
                                </a>
                {% 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'] }}" source="homeshop18">
                {% else %}
                        <td class="price" source="homeshop18">
                {% end %}
                
                {% if phone['homeshop18']['price'] is None and phone['homeshop18']['data'] is None %}
                                {{ phone['homeshop18']['text'] }}
                {% elif phone['homeshop18']['data'] is not None %}
                                <a href="{{ phone['homeshop18']['url'] if phone['homeshop18']['url'] is not None else '#' }}">
                                        {{ phone['homeshop18']['text'] }}
                                </a>
                {% 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'] }}" source="infibeam">
                {% else %}
                        <td class="price" source="infibeam">
                {% end %}
                
                {% if phone['infibeam']['price'] is None and phone['infibeam']['data'] is None %}
                                {{ phone['infibeam']['text'] }}
                {% elif phone['infibeam']['data'] is not None %}
                                <a href="{{ 'http://www.infibeam.com' + phone['infibeam']['url'] if phone['infibeam']['url'] is not None else '#' }}">
                                        {{ phone['infibeam']['text'] }}
                                </a>
                {% 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'] }}" source="letsbuy">
                {% else %}
                        <td class="price" source="letsbuy">
                {% end %}
                
                {% if phone['letsbuy']['price'] is None and phone['letsbuy']['data'] is None %}
                                {{ phone['letsbuy']['text'] }}
                {% elif phone['letsbuy']['data'] is not None %}
                                <a href="{{ phone['letsbuy']['url'] if phone['letsbuy']['url'] is not None else '#' }}">
                                        {{ phone['letsbuy']['text'] }}
                                </a>
                {% 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>
</div>
{% 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>