Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
3232 varun.gupt 1
<!DOCTYPE html>
2
<html>
3
<head>
4
	<title>Phone Price Comparison</title>
5
	<link rel="stylesheet" type="text/css" href="/static/facebox.css" />
3551 varun.gupt 6
	<link rel="stylesheet" type="text/css" href="/static/chart.css" />
3232 varun.gupt 7
</head>
8
<body>
9
	<h2>Phone Price Comparison Chart</h2>
3313 varun.gupt 10
{% if len(data) > 0 %}
3440 varun.gupt 11
	<table>
3232 varun.gupt 12
	<thead>
13
		<tr>
3440 varun.gupt 14
			<th width="264">&nbsp;</th>
15
			<th width="131">Saholic</th>
16
			<th width="131">Flipkart</th>
17
			<th width="131">HomeShop18</th>
18
			<th width="131">Infibeam</th>
19
			<th width="131">Let's Buy</th>
3232 varun.gupt 20
		</tr>
21
	</thead>
3440 varun.gupt 22
	</table>
23
<div id="datatable-container">
24
	<table id="datatable">
3232 varun.gupt 25
	<tbody>
3313 varun.gupt 26
	{% for phone in data %}
3440 varun.gupt 27
		<tr id="{{ phone['entity_id'] }}">
3232 varun.gupt 28
			<td class="name">{{ phone['product_name'] }}</td>
3313 varun.gupt 29
			<td class="price">{{ phone['saholic']['price'] }}</td>
30
 
31
		{% if phone['flipkart']['data'] is not None %}
3440 varun.gupt 32
			<td class="price conflict" data="{{ phone['flipkart']['data'] }}" source="flipkart">
3313 varun.gupt 33
		{% else %}
3440 varun.gupt 34
			<td class="price" source="flipkart">
3313 varun.gupt 35
		{% end %}
36
 
37
		{% if phone['flipkart']['price'] is None and phone['flipkart']['data'] is None %}
38
				{{ phone['flipkart']['text'] }}
3440 varun.gupt 39
 
40
		{% elif phone['flipkart']['data'] is not None %}
41
				<a href="{{ 'http://www.flipkart.com' + phone['flipkart']['url'] if phone['flipkart']['url'] is not None else '#' }}">
42
					{{ phone['flipkart']['text'] }}
43
				</a>
3313 varun.gupt 44
		{% else %}
45
				<a href="{{ 'http://www.flipkart.com' + phone['flipkart']['url'] if phone['flipkart']['url'] is not None else '#' }}" target="_blank">
46
					{{ phone['flipkart']['text'] }}
47
				</a>
48
		{% end %}
3232 varun.gupt 49
			</td>
3313 varun.gupt 50
 
51
		{% if phone['homeshop18']['data'] is not None %}
3440 varun.gupt 52
			<td class="price conflict" data="{{ phone['homeshop18']['data'] }}" source="homeshop18">
3313 varun.gupt 53
		{% else %}
3440 varun.gupt 54
			<td class="price" source="homeshop18">
3313 varun.gupt 55
		{% end %}
56
 
57
		{% if phone['homeshop18']['price'] is None and phone['homeshop18']['data'] is None %}
58
				{{ phone['homeshop18']['text'] }}
3440 varun.gupt 59
		{% elif phone['homeshop18']['data'] is not None %}
60
				<a href="{{ phone['homeshop18']['url'] if phone['homeshop18']['url'] is not None else '#' }}">
61
					{{ phone['homeshop18']['text'] }}
62
				</a>
3313 varun.gupt 63
		{% else %}
64
				<a href="{{ phone['homeshop18']['url'] if phone['homeshop18']['url'] is not None else '#' }}" target="_blank">
65
					{{ phone['homeshop18']['text'] }}
66
				</a>
67
		{% end %}
68
			</td>
69
 
70
		{% if phone['infibeam']['data'] is not None %}
3440 varun.gupt 71
			<td class="price conflict" data="{{ phone['infibeam']['data'] }}" source="infibeam">
3313 varun.gupt 72
		{% else %}
3440 varun.gupt 73
			<td class="price" source="infibeam">
3313 varun.gupt 74
		{% end %}
75
 
76
		{% if phone['infibeam']['price'] is None and phone['infibeam']['data'] is None %}
77
				{{ phone['infibeam']['text'] }}
3440 varun.gupt 78
		{% elif phone['infibeam']['data'] is not None %}
79
				<a href="{{ 'http://www.infibeam.com' + phone['infibeam']['url'] if phone['infibeam']['url'] is not None else '#' }}">
80
					{{ phone['infibeam']['text'] }}
81
				</a>
3313 varun.gupt 82
		{% else %}
83
				<a href="{{ 'http://www.infibeam.com' + phone['infibeam']['url'] if phone['infibeam']['url'] is not None else '#' }}" target="_blank">
84
					{{ phone['infibeam']['text'] }}
85
				</a>
86
		{% end %}
87
			</td>
88
 
89
		{% if phone['letsbuy']['data'] is not None %}
3440 varun.gupt 90
			<td class="price conflict" data="{{ phone['letsbuy']['data'] }}" source="letsbuy">
3313 varun.gupt 91
		{% else %}
3440 varun.gupt 92
			<td class="price" source="letsbuy">
3313 varun.gupt 93
		{% end %}
94
 
95
		{% if phone['letsbuy']['price'] is None and phone['letsbuy']['data'] is None %}
96
				{{ phone['letsbuy']['text'] }}
3440 varun.gupt 97
		{% elif phone['letsbuy']['data'] is not None %}
98
				<a href="{{ phone['letsbuy']['url'] if phone['letsbuy']['url'] is not None else '#' }}">
99
					{{ phone['letsbuy']['text'] }}
100
				</a>
3313 varun.gupt 101
		{% else %}
102
				<a href="{{ phone['letsbuy']['url'] if phone['letsbuy']['url'] is not None else '#' }}" target="_blank">
103
					{{ phone['letsbuy']['text'] }}
104
				</a>
105
		{% end %}
106
			</td>
3232 varun.gupt 107
		</tr>
3313 varun.gupt 108
	{% end %}
3232 varun.gupt 109
	</tbody>
110
	</table>
3440 varun.gupt 111
</div>
3313 varun.gupt 112
{% end %}
3232 varun.gupt 113
	<script type="text/javascript" src="/static/jquery-1.6.2.min.js"></script>
114
	<script type="text/javascript" src="/static/facebox.js"></script>
115
	<script type="text/javascript" src="/static/chart.js"></script>
116
</body>
117
</html>