-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathIndex.asp
80 lines (70 loc) · 3.59 KB
/
Index.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<h2>
<%= H(Model.Title) %>
</h2>
<p>
<%= H(Model.RecordCount) %> products found. Showing <%= H(Model.PageSize) %> records per page.
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-plus-sign'></i> New", "Products", "Create", empty, Array("class", "btn btn-xs btn-primary")) %>
</p>
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Category</th>
<th>Supplier</th>
<th style="text-align: right">Unit Price</th>
<th style="text-align: right">Units In Stock</th>
<th style="text-align: right">Units On Order</th>
<th style="text-align: right">Reorder Level</th>
<th style="text-align: center">Discontinued?</th>
</tr>
</thead>
<tbody>
<% dim it : set it = Model.Products.Iterator %>
<% dim product %>
<% While it.HasNext %>
<% set product = it.GetNext() %>
<tr>
<td>
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-pencil'></i>", "Products", "Edit", Array("Id", product.Id), Array("class", "btn btn-primary")) %>
</td>
<td><%= H(product.Name) %></td>
<td><%= H(product.CategoryName) %></td>
<td><%= H(product.SupplierName) %></td>
<td style="text-align: right"><%= H(FormatCurrency(product.UnitPrice)) %></td>
<td style="text-align: right"><%= H(product.UnitsInStock) %></td>
<td style="text-align: right"><%= H(product.UnitsOnOrder) %></td>
<td style="text-align: right"><%= H(product.ReorderLevel) %></td>
<td style="text-align: center">
<% If product.Discontinued then %>
<i class="glyphicon glyphicon-ok"></i>
<% End If %>
</td>
</tr>
<% Wend %>
</tbody>
</table>
<div>
<% If Model.CurrentPageNumber <> 1 then %>
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-chevron-left'></i><i class='glyphicon glyphicon-chevron-left'></i>", MVC.ControllerName, MVC.ActionName, Array("page_num", 1), Array("class", "btn btn-default")) %>
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-chevron-left'></i>", MVC.ControllerName, MVC.ActionName, Array("page_num", Model.CurrentPageNumber - 1), Array("class", "btn btn-default")) %>
<% Else %>
<a class='btn btn-default disabled'><i class='glyphicon glyphicon-chevron-left'></i><i class='glyphicon glyphicon-chevron-left'></i></a>
<a class='btn btn-default disabled'><i class='glyphicon glyphicon-chevron-left'></i></a>
<% End If %>
<% If CInt(Model.CurrentPageNumber) < CInt(Model.PageCount) then %>
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-chevron-right'></i>", MVC.ControllerName, MVC.ActionName, Array("page_num", Model.CurrentPageNumber + 1), Array("class", "btn btn-default")) %>
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-chevron-right'></i><i class='glyphicon glyphicon-chevron-right'></i>", MVC.ControllerName, MVC.ActionName, Array("page_num", Model.PageCount), Array("class", "btn btn-default")) %>
<% Else %>
<a class='btn btn-default disabled'><i class='glyphicon glyphicon-chevron-right'></i><i class='glyphicon glyphicon-chevron-right'></i></a>
<a class='btn btn-default disabled'><i class='glyphicon glyphicon-chevron-right'></i></a>
<% End If %>
</div>