Skip to content
Browse files

Add % done for producing units

  • Loading branch information...
1 parent 37651a4 commit 2f506ffc4c9060e694a1f1f8fffbe8f565fc3e5f @rmorali rmorali committed
Showing with 17 additions and 1 deletion.
  1. +4 −0 app/views/facility_fleets/edit.html.erb
  2. +13 −1 app/views/generic_fleets/_facilities.html.erb
View
4 app/views/facility_fleets/edit.html.erb
@@ -8,8 +8,12 @@
<br>
Current Balance: $ <%= @facility.balance %>
<br>
+<<<<<<< HEAD
Constructing: <%= @facility.producing_unit.name %>
<%= "( #{@current_producing_unit_status}% done )" if @facility.producing_unit.is_a? CapitalShip %>
+=======
+ Constructing: <%= @facility.producing_unit.name %> ( <%= @current_producing_unit_status.round(2) %>% done )
+>>>>>>> Add % done for producing units
<% else %>
Producing Capacity: $ <%= @producing_capacity %>
<br>
View
14 app/views/generic_fleets/_facilities.html.erb
@@ -2,14 +2,26 @@
<%= fleet.generic_unit.name %>
( <% if @round.move && fleet.squad == @squad %>
<% if fleet.producing_unit.present? %>
+<<<<<<< HEAD
<%= link_to "#{fleet.producing_unit.name}", edit_facility_fleet_path(fleet) %>
<%= link_to "#{(fleet.balance / fleet.producing_unit.price.to_f * 100).round(2)}%" if fleet.producing_unit.is_a? CapitalShip %>
+=======
+ <% if fleet.producing_unit.is_a? CapitalShip %>
+ <%= link_to "#{fleet.producing_unit.name} (#{(fleet.balance / fleet.producing_unit.price.to_f * 100).round(2)}%)", edit_facility_fleet_path(fleet) %>
+ <% else %>
+ <%= link_to "#{fleet.producing_unit.name}", edit_facility_fleet_path(fleet) %>
+ <% end %>
+>>>>>>> Add % done for producing units
<% else %>
<%= link_to 'inactive', edit_facility_fleet_path(fleet) %>
<% end %>
<% else %>
<% if fleet.producing_unit.present? %>
- <%= fleet.producing_unit.name %>
+ <% if fleet.producing_unit.is_a? CapitalShip %>
+ <%= fleet.producing_unit.name %> ( <%= (fleet.balance / fleet.producing_unit.price.to_f * 100).round(2) %> )
+ <% else %>
+ <%= fleet.producing_unit.name %>
+ <% end %>
<% else %>
<%= 'inactive' %>
<% end %>

0 comments on commit 2f506ff

Please sign in to comment.
Something went wrong with that request. Please try again.