mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 11:47:41 +00:00
forgotten files for previous commit
This commit is contained in:
parent
384033bfe6
commit
3f62c9f03c
@ -89,131 +89,138 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<h2 class="sub-header">Recent Results</h2>
|
<h2 class="sub-header">Recent Results</h2>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive panel panel-primary">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<div class="panel-heading">
|
||||||
<tr>
|
<thead>
|
||||||
<% if current_user.admin? %>
|
<tr>
|
||||||
<th>Company</th>
|
<% if current_user.admin? %>
|
||||||
<% end %>
|
<th>Company</th>
|
||||||
<th>Run Date</th>
|
<% end %>
|
||||||
<th>Location</th>
|
<th>Run Date</th>
|
||||||
<th>Harvest Time</th>
|
<th>Location</th>
|
||||||
<th>Supplier</th>
|
<th>Harvest Time</th>
|
||||||
<th>Distributor</th>
|
<th>Supplier</th>
|
||||||
<th>Total Processed</th>
|
<th>Distributor</th>
|
||||||
<th>Other</th>
|
<th>Total Processed</th>
|
||||||
<th>Oyster Info</th>
|
<th>Other</th>
|
||||||
</tr>
|
<th>Oyster Info</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
<% if current_user.admin? %>
|
|
||||||
<% @results.each_slice(1) do |row| %>
|
|
||||||
<tr>
|
|
||||||
<% row.each do |result|
|
|
||||||
run = Run.find(result.id)
|
|
||||||
#company = Company.find(run.company_id)
|
|
||||||
%>
|
|
||||||
|
|
||||||
<!-- company name -->
|
|
||||||
<td>
|
|
||||||
<%= #company.company_name
|
|
||||||
"Fake Industries" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- run date -->
|
|
||||||
<td>
|
|
||||||
<%= run.runDate %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- location -->
|
|
||||||
<td>
|
|
||||||
<%= run.location ? run.location : "" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- harvest time -->
|
|
||||||
<td>
|
|
||||||
<%= "" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- supplier -->
|
|
||||||
<td>
|
|
||||||
|
|
||||||
<%= run.supplier ? run.supplier : "" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- distributor -->
|
|
||||||
<td>
|
|
||||||
<%= run.distributor ? run.distributor : "" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- total processed -->
|
|
||||||
<td>
|
|
||||||
<%= result.total %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- other -->
|
|
||||||
<td>
|
|
||||||
<%= run.other ? run.other : "" %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% @results.each_slice(1) do |row| %>
|
|
||||||
<tr>
|
|
||||||
<% row.each do |result|
|
|
||||||
run = Run.find(result.id) %>
|
|
||||||
<!-- run date -->
|
|
||||||
<td>
|
|
||||||
<%= run.runDate %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- location -->
|
|
||||||
<td>
|
|
||||||
<%= run.location ? run.location : "" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- harvest time -->
|
|
||||||
<td>
|
|
||||||
<%= "" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- supplier -->
|
|
||||||
<td>
|
|
||||||
|
|
||||||
<%= run.supplier ? run.supplier : "" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- distributor -->
|
|
||||||
<td>
|
|
||||||
<%= run.distributor ? run.distributor : "" %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- total processed -->
|
|
||||||
<td>
|
|
||||||
<%= result.total %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- other -->
|
|
||||||
<td>
|
|
||||||
<%= run.other ? run.other : "" %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= link_to "Show", oysters_index_path( :result_id => result.id, :page_num => params[:page]), :class => "btn btn-primary" %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="center-block">
|
|
||||||
<div class="col-sm-6 panel panel-primary" align="center">
|
|
||||||
<%= paginate @results %><br>
|
|
||||||
<%= page_entries_info @results %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="panel-body">
|
||||||
|
<tbody>
|
||||||
|
<% if current_user.admin? %>
|
||||||
|
<% @results.each_slice(1) do |row| %>
|
||||||
|
<tr>
|
||||||
|
<% row.each do |result|
|
||||||
|
run = Run.find(result.id)
|
||||||
|
#company = Company.find(run.company_id)
|
||||||
|
%>
|
||||||
|
|
||||||
|
<!-- company name -->
|
||||||
|
<td>
|
||||||
|
<%= #company.company_name
|
||||||
|
"Fake Industries" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- run date -->
|
||||||
|
<td>
|
||||||
|
<%= run.runDate %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- location -->
|
||||||
|
<td>
|
||||||
|
<%= run.location ? run.location : "" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- harvest time -->
|
||||||
|
<td>
|
||||||
|
<%= "" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- supplier -->
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<%= run.supplier ? run.supplier : "" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- distributor -->
|
||||||
|
<td>
|
||||||
|
<%= run.distributor ? run.distributor : "" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- total processed -->
|
||||||
|
<td>
|
||||||
|
<%= result.total %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- other -->
|
||||||
|
<td>
|
||||||
|
<%= run.other ? run.other : "" %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= link_to "Show", oysters_index_path( :result_id => result.id, :page_num => params[:page]), :class => "btn btn-primary" %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% @results.each_slice(1) do |row| %>
|
||||||
|
<tr>
|
||||||
|
<% row.each do |result|
|
||||||
|
run = Run.find(result.id) %>
|
||||||
|
<!-- run date -->
|
||||||
|
<td>
|
||||||
|
<%= run.runDate %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- location -->
|
||||||
|
<td>
|
||||||
|
<%= run.location ? run.location : "" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- harvest time -->
|
||||||
|
<td>
|
||||||
|
<%= "" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- supplier -->
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<%= run.supplier ? run.supplier : "" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- distributor -->
|
||||||
|
<td>
|
||||||
|
<%= run.distributor ? run.distributor : "" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- total processed -->
|
||||||
|
<td>
|
||||||
|
<%= result.total %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<!-- other -->
|
||||||
|
<td>
|
||||||
|
<%= run.other ? run.other : "" %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= link_to "Show", oysters_index_path( :result_id => result.id, :page_num => params[:page]), :class => "btn btn-primary" %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</div>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="center-block">
|
||||||
|
<div class="col-sm-6 col-sm-offset-3 panel panel-primary" align="center">
|
||||||
|
<%= paginate @results %></br>
|
||||||
|
<%= page_entries_info @results %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<%= debug(params) if Rails.env.development? %>
|
<!-- <%= debug(params) if Rails.env.development? %> -->
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -68,54 +68,58 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<div class="panel panel-primary table-responsive">
|
<div class="panel panel-primary table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<div class="panel-heading">
|
||||||
<tr>
|
<thead>
|
||||||
<th>Oyster Grade</th>
|
<tr>
|
||||||
<th>Volume</th>
|
<th>Oyster Grade</th>
|
||||||
<th>Length</th>
|
<th>Volume</th>
|
||||||
<th>Width</th>
|
<th>Length</th>
|
||||||
<th>Height</th>
|
<th>Width</th>
|
||||||
</tr>
|
<th>Height</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
<% @oysters.each_slice(1) do |row| %>
|
</div>
|
||||||
<tr>
|
<div class="panel-body">
|
||||||
<% row.each do |oyster|%>
|
<tbody>
|
||||||
|
<% @oysters.each_slice(1) do |row| %>
|
||||||
|
<tr>
|
||||||
|
<% row.each do |oyster|%>
|
||||||
|
|
||||||
<!-- grade -->
|
<!-- grade -->
|
||||||
<td>
|
<td>
|
||||||
<%= oyster.grade %>
|
<%= oyster.grade %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- volume -->
|
<!-- volume -->
|
||||||
<td>
|
<td>
|
||||||
<%= oyster.volume %>
|
<%= oyster.volume %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- length -->
|
<!-- length -->
|
||||||
<td>
|
<td>
|
||||||
<%= oyster.length %>
|
<%= oyster.length %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- width -->
|
<!-- width -->
|
||||||
<td>
|
<td>
|
||||||
<%= oyster.width %>
|
<%= oyster.width %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- height -->
|
<!-- height -->
|
||||||
<td>
|
<td>
|
||||||
<%= oyster.height %>
|
<%= oyster.height %>
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
</div>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if !@oysters.empty? %>
|
<% if !@oysters.empty? %>
|
||||||
<div class="center-block">
|
<div class="center-block">
|
||||||
<div class="col-sm-6 panel panel-primary" align="center">
|
<div class="col-sm-6 col-sm-offset-3 panel panel-primary" align="center">
|
||||||
<%= paginate @oysters %><br>
|
<%= paginate @oysters %><br>
|
||||||
<%= page_entries_info @oysters %>
|
<%= page_entries_info @oysters %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user