Prettify the Purchase system
[cs356-p2-videostore.git] / app / views / purchase / filter.rhtml
diff --git a/app/views/purchase/filter.rhtml b/app/views/purchase/filter.rhtml
new file mode 100644 (file)
index 0000000..3e5be12
--- /dev/null
@@ -0,0 +1,16 @@
+<h1>Filter Purchases</h1>
+
+<% if @type == "customer" or @type == "all" %>
+  <%= start_form_tag :action => 'filter', :type => :customer %>
+    Customer ID: <%= text_field 'id', nil  %>
+    <%= submit_tag 'Ok' %>
+  <%= end_form_tag %>
+<% end %>
+
+<% if @type == "date" or @type == "all" %>
+  <%= start_form_tag :action => 'filter', :type => :date %>
+    Date: <%= date_select 'id', nil %>
+    <%= submit_tag 'Ok' %>
+  <%= end_form_tag %>
+<% end %>
+