diff --git a/app/models/quantity.rb b/app/models/quantity.rb
index a56f2aa..748a3c6 100644
--- a/app/models/quantity.rb
+++ b/app/models/quantity.rb
@@ -5,7 +5,7 @@ class Quantity < ActiveRecord::Base
exercise: 2
}
- acts_as_nested_set dependent: :nullify, scope: :project
+ acts_as_nested_set dependent: :destroy, scope: :project
belongs_to :project, required: false
validates :name, presence: true, uniqueness: {scope: :project_id}
diff --git a/app/views/ingredients/index.html.erb b/app/views/ingredients/index.html.erb
index ee65e43..aa317b7 100644
--- a/app/views/ingredients/index.html.erb
+++ b/app/views/ingredients/index.html.erb
@@ -64,13 +64,13 @@
<% next if i.new_record? %>
<%= i.name %> |
- <%= i.ref_amount %> [<%= i.ref_unit.shortname %>] |
+ <%= i.ref_amount %> [<%= i.ref_unit.shortname %>] |
<%= i.group %> |
<%= i.source.name if i.source.present? %>
<%= ", #{i.source_ident}" if i.source_ident.present? %>
|
- <%= delete_link ingredient_path(i), data: {} %> |
+ <%= delete_link ingredient_path(i), data: {} %> |
<% end %>
diff --git a/app/views/quantities/index.html.erb b/app/views/quantities/index.html.erb
index f56f508..f9f8d37 100644
--- a/app/views/quantities/index.html.erb
+++ b/app/views/quantities/index.html.erb
@@ -35,13 +35,17 @@
<% Quantity.each_with_level(@quantities) do |q, level| %>
- <% next if q.new_record? %>
- 0 %>">
+ <%
+ next if q.new_record?
+ quantity_class = "quantity"
+ quantity_class += " project idnt idnt-#{level}" if level > 0
+ quantity_class += " primary" if q.primary
+ %>
+
<%= q.name %> |
<%= q.domain %> |
<%= q.description %> |
- <%= delete_link quantity_path(q), data: {} %> |
+ <%= delete_link quantity_path(q), data: {} %> |
<% end %>
diff --git a/app/views/sources/index.html.erb b/app/views/sources/index.html.erb
index c024a01..fef940a 100644
--- a/app/views/sources/index.html.erb
+++ b/app/views/sources/index.html.erb
@@ -38,7 +38,7 @@
<%= s.name %> |
<%= s.description %> |
- <%= delete_link source_path(s), data: {} %> |
+ <%= delete_link source_path(s), data: {} %> |
<% end %>
diff --git a/app/views/units/index.html.erb b/app/views/units/index.html.erb
index f8d7aa2..bde47ad 100644
--- a/app/views/units/index.html.erb
+++ b/app/views/units/index.html.erb
@@ -38,7 +38,7 @@
<%= u.shortname %> |
<%= u.name %> |
- <%= delete_link unit_path(u), data: {} %> |
+ <%= delete_link unit_path(u), data: {} %> |
<% end %>
diff --git a/assets/stylesheets/body_tracking.css b/assets/stylesheets/body_tracking.css
index 2abcd23..df6123e 100644
--- a/assets/stylesheets/body_tracking.css
+++ b/assets/stylesheets/body_tracking.css
@@ -1 +1,3 @@
-table.nutrients td.value {text-align:right;}
+table.list tr.quantity.primary td.name {font-weight: bold;}
+table.list td.action,
+table.list td.value {text-align: right;}