From 3f62c9f03c4e06937df4d0fc07d7cc5a5ff25a63 Mon Sep 17 00:00:00 2001 From: Okechi Onyeje Date: Fri, 20 Jan 2017 11:48:10 -0500 Subject: [PATCH] forgotten files for previous commit --- .../app/views/dashboard/index.html.erb | 253 +++++++++--------- .../app/views/layouts/application.html.erb | 2 +- Pearlception/app/views/oysters/index.html.erb | 80 +++--- 3 files changed, 173 insertions(+), 162 deletions(-) diff --git a/Pearlception/app/views/dashboard/index.html.erb b/Pearlception/app/views/dashboard/index.html.erb index 56fc2c9..150e22e 100644 --- a/Pearlception/app/views/dashboard/index.html.erb +++ b/Pearlception/app/views/dashboard/index.html.erb @@ -89,131 +89,138 @@ <% else %>

Recent Results

<% end %> -
+
- - - <% if current_user.admin? %> - - <% end %> - - - - - - - - - - - - <% if current_user.admin? %> - <% @results.each_slice(1) do |row| %> - - <% row.each do |result| - run = Run.find(result.id) - #company = Company.find(run.company_id) - %> - - - - - - - - - - - - - - - - - - - - - - - - - <% end %> - - <% end %> - <% else %> - <% @results.each_slice(1) do |row| %> - - <% row.each do |result| - run = Run.find(result.id) %> - - - - - - - - - - - - - - - - - - - - - - <% end %> - - <% end %> - <% end %> - -
CompanyRun DateLocationHarvest TimeSupplierDistributorTotal ProcessedOtherOyster Info
- <%= #company.company_name - "Fake Industries" %> - - <%= run.runDate %> - - <%= run.location ? run.location : "" %> - - <%= "" %> - - - <%= run.supplier ? run.supplier : "" %> - - <%= run.distributor ? run.distributor : "" %> - - <%= result.total %> - - <%= run.other ? run.other : "" %> -
- <%= run.runDate %> - - <%= run.location ? run.location : "" %> - - <%= "" %> - - - <%= run.supplier ? run.supplier : "" %> - - <%= run.distributor ? run.distributor : "" %> - - <%= result.total %> - - <%= run.other ? run.other : "" %> - - <%= link_to "Show", oysters_index_path( :result_id => result.id, :page_num => params[:page]), :class => "btn btn-primary" %> -
-
-
- <%= paginate @results %>
- <%= page_entries_info @results %> +
+ + + <% if current_user.admin? %> + Company + <% end %> + Run Date + Location + Harvest Time + Supplier + Distributor + Total Processed + Other + Oyster Info + +
-
+
+ + <% if current_user.admin? %> + <% @results.each_slice(1) do |row| %> + + <% row.each do |result| + run = Run.find(result.id) + #company = Company.find(run.company_id) + %> + + + + <%= #company.company_name + "Fake Industries" %> + + + + + <%= run.runDate %> + + + + + <%= run.location ? run.location : "" %> + + + + + <%= "" %> + + + + + + <%= run.supplier ? run.supplier : "" %> + + + + + <%= run.distributor ? run.distributor : "" %> + + + + + <%= result.total %> + + + + + <%= run.other ? run.other : "" %> + + + <%= link_to "Show", oysters_index_path( :result_id => result.id, :page_num => params[:page]), :class => "btn btn-primary" %> + + <% end %> + + <% end %> + <% else %> + <% @results.each_slice(1) do |row| %> + + <% row.each do |result| + run = Run.find(result.id) %> + + + <%= run.runDate %> + + + + + <%= run.location ? run.location : "" %> + + + + + <%= "" %> + + + + + + <%= run.supplier ? run.supplier : "" %> + + + + + <%= run.distributor ? run.distributor : "" %> + + + + + <%= result.total %> + + + + + <%= run.other ? run.other : "" %> + + + <%= link_to "Show", oysters_index_path( :result_id => result.id, :page_num => params[:page]), :class => "btn btn-primary" %> + + <% end %> + + <% end %> + <% end %> + +
+ +
+
+
+ <%= paginate @results %>
+ <%= page_entries_info @results %> +
diff --git a/Pearlception/app/views/layouts/application.html.erb b/Pearlception/app/views/layouts/application.html.erb index 5978e7f..2dc8dbc 100644 --- a/Pearlception/app/views/layouts/application.html.erb +++ b/Pearlception/app/views/layouts/application.html.erb @@ -16,7 +16,7 @@ <%= yield %> - <%= debug(params) if Rails.env.development? %> + diff --git a/Pearlception/app/views/oysters/index.html.erb b/Pearlception/app/views/oysters/index.html.erb index bb4cc5b..81bee88 100644 --- a/Pearlception/app/views/oysters/index.html.erb +++ b/Pearlception/app/views/oysters/index.html.erb @@ -68,54 +68,58 @@ <% else %>
- - - - - - - - - - - <% @oysters.each_slice(1) do |row| %> - - <% row.each do |oyster|%> +
+
+ + + + + + + + + +
+
+ <% @oysters.each_slice(1) do |row| %> + + <% row.each do |oyster|%> - - + + - - + + - - + + - - + + - - - <% end %> - - <% end %> - + + + <% end %> + + <% end %> + +
Oyster GradeVolumeLengthWidthHeight
Oyster GradeVolumeLengthWidthHeight
- <%= oyster.grade %> - + <%= oyster.grade %> + - <%= oyster.volume %> - + <%= oyster.volume %> + - <%= oyster.length %> - + <%= oyster.length %> + - <%= oyster.width %> - + <%= oyster.width %> + - <%= oyster.height %> -
+ <%= oyster.height %> +
<% end %> <% if !@oysters.empty? %>
-
+
<%= paginate @oysters %>
<%= page_entries_info @oysters %>