Sha256: bd0e5f0f870a45ac795e9d1322f1989d8045ae002d21faf7f2372a8859cebd9e
Contents?: true
Size: 1.37 KB
Versions: 5
Compression:
Stored size: 1.37 KB
Contents
<div style="float: left; width: 50%; text-align: center; font-size: 1.5em;"> <h3>Vending Machines</h3> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <th>Id</th> <th>Location</th> <th>Cash</th> <th>Products</th> <th>Delete</th> </tr> <% @vending_machines.each do |vending_machine| %> <tr> <td><%= vending_machine.id %></td> <td><%= link_to vending_machine.location, :action => "index", :controller => "main", :id => vending_machine.id %></td> <td><%= vending_machine.cash_str %></td> <td><%= vending_machine.products.length %></td> <td><%= link_to "delete", :action => "delete", :id => vending_machine.id %> </tr> <% end %> </table> </div> <div style="float: right; width: 50%;"> <h3>Create New Vending Machine</h3> <%= form_tag :action => "save" %> Location: <input type="text" name="location"><br /> Cash (in pennies): <input type="text" name="cash"><br /> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <th></th> <th>Name</th> <th>Price (in pennies)</th> <th>Inventory</th> </tr> <% 8.times do |i| %> <tr> <td>Product #<%= i + 1 %></td> <td><input type="text" name="name_<%= i %>"></td> <td><input type="text" name="price_<%= i %>"></td> <td><input type="text" name="inventory_<%= i %>"></td> </tr> <% end %> </table> <%= submit_tag "Save" %> <%= end_form_tag %> </div>
Version data entries
5 entries across 5 versions & 1 rubygems