Created
July 17, 2014 21:13
-
-
Save bomatson/1bfc99719a79976bab7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1> | |
| Welcome to Restaurant GA! | |
| </h1> | |
| <h2> | |
| Menu | |
| </h2> | |
| <form action="/order" method="post"> | |
| <h3> | |
| Appetizers | |
| </h3> | |
| <ul> | |
| <% MENU['appetizers'].each do |appetizer| %> | |
| <% appetizer.each do |image, name| %> | |
| <li> | |
| <input type='checkbox' name='appetizer[]' value='<%= name %>'> | |
| <!-- You actually only need to send the name, then you can lookup the image url by name in the "get '/order'" in your hungry_app.rb --> | |
| <!-- to send the appetizer image to the next page, not working yet --> | |
| <!--<input type='hidden' name='appimage[]' value=<%= image %> > --> | |
| <img style="height:200px;"src=<%= image %> > | |
| <%= name %> | |
| </li> | |
| <% end %> | |
| <% end %> | |
| </ul> | |
| <h3> | |
| Entrees | |
| </h3> | |
| <ul> | |
| <% MENU['entrees'].each do |entree| %> | |
| <li> | |
| <input type='checkbox' name='entree[]' value='<%= entree %>'> <%= entree %> | |
| </li> | |
| <% end %> | |
| </ul> | |
| <h3> | |
| Desserts | |
| </h3> | |
| <ul> | |
| <% MENU['desserts'].each do |dessert| %> | |
| <li> | |
| <input type='checkbox' name='dessert[]' value='<%= dessert %>'><%= dessert %> | |
| </li> | |
| <% end %> | |
| </ul> | |
| <h3> | |
| Drinks | |
| </h3> | |
| <ul> | |
| <% MENU['drinks'].each do |drink| %> | |
| <li> | |
| <!-- shouldnt the name on this input be drink[] ? --> | |
| <input type='checkbox' name='[]' value='<%= drink %>'><%= drink %> | |
| </li> | |
| <% end %> | |
| </ul> | |
| <input type='submit'> | |
| </form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment