Update admin/product.php to use the new admin templates
[bugdar.git] / admin / templates / product.html
1 <%- $templates['doctype'] %>
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="<%- $stylevar['lang'] %>" xml:lang="<%- $stylevar['lang'] %>" dir="<%- $stylevar['lang_dir'] %>">
3 <head>
4 <%- $templates['headinclude'] %>
5 <title><%- $templates['title'] %> - <%- T('Products and Versions') %></title>
6
7 <script type="text/javascript" charset="utf-8">
8 /*<![CDATA[*/
9 function exec_action(name)
10 {
11 window.location = document.getElementById(name).value;
12 }
13 /*]]>*/
14 </script>
15 </head>
16
17 <body>
18
19 <%- $templates['nav'] %>
20
21 <div id="title"><%- T('Products and Versions') %></div>
22
23 <div id="body">
24
25 <%- admin_flash() %>
26
27 <form action="product.php" method="post">
28 <input type="hidden" name="do" value="displayorder" />
29
30 <table>
31 <thead>
32 <tr><td colspan="2"><%- T('Products / Versions') %></td></tr>
33 </thead>
34
35 <% foreach ($products as $product): %>
36 <tr class="headings">
37 <td><a href="product.php?do=editproduct&amp;productid=<%- $product['productid'] %>"><%- $product['title'] %></a></td>
38 <td><%- construct_option_list(T('Product'), 'product', $product['productid'], 1, 1, 1, 1, $product['displayorder']) %></td>
39 </tr>
40
41 <!-- non-component versions -->
42 <% foreach ($versions[$product['productid']] as $version): %>
43 <tr class="alt2">
44 <td>-- <%- $version['version'] %></td>
45 <td><%- construct_option_list(T('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']) %></td>
46 </tr>
47 <% endforeach %>
48 <!-- / non-component versions -->
49
50 <!-- components -->
51 <% if (is_array($components[$product['productid']])): %>
52 <% foreach ($components[$product['productid']] as $comp): %>
53 <tr class="alt1">
54 <td>-- <a href="product.php?do=editproduct&amp;productid=<%- $comp['productid'] %>"><%- $comp['title'] %></a></td>
55 <td><%- construct_option_list(T('Component'), 'component', $comp['productid'], 1, 0, 1, 1, $comp['displayorder']) %></td>
56 </tr>
57
58 <!-- component versions -->
59 <% if (is_array($versions[$comp['productid']])): %>
60 <% foreach ($versions[$comp['productid']] as $version): %>
61 <tr class="alt2">
62 <td>---- <%- $version['version'] %></td>
63 <td><%- construct_option_list(T('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']) %></td>
64 </tr>
65 <% endforeach %>
66 <% endif %>
67 <!-- / component versions -->
68 <% endforeach %>
69 <% endif %>
70 <!-- / components -->
71 <% endforeach %>
72 <tr class="submit">
73 <td colspan="2" style="text-align:center">
74 <a href="product.php?do=addproduct" class="button"><%- T('Add New Product') %></a>
75 <input type="submit" value="<%- T('Save Display Order') %>" />
76 </td>
77 </tr>
78 </table>
79
80 </form>
81
82 <%- admin_footer() %>
83
84 </div>
85
86 <script type="text/javascript"> nav_init("fields", "fields_product"); </script>
87
88 </body>
89
90 </html>