Visual changes
This commit is contained in:
@@ -6,10 +6,10 @@ module MealsHelper
|
||||
end
|
||||
|
||||
def adjust_ingredient_links(i)
|
||||
[-10, -1, 0, 1, 10].map do |v|
|
||||
if v != 0
|
||||
link_to "%+d" % v, adjust_ingredient_path(i, adjustment: v),
|
||||
{remote: true, method: :post, class: "button #{v>0 ? 'green' : 'red'}"}
|
||||
{'- -' => -10, '-' => -1, nil => 0, '+' => 1, '++' => 10}.map do |text, value|
|
||||
if text
|
||||
link_to text, adjust_ingredient_path(i, adjustment: value),
|
||||
{remote: true, method: :post, class: "button #{value>0 ? 'green' : 'red'}"}
|
||||
else
|
||||
yield.to_s
|
||||
end
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<% m.ingredients.each do |i| %>
|
||||
<tr id="ingredient-<%= i.id %>" class="ingredient project idnt idnt-1">
|
||||
<tr id="ingredient-<%= i.id %>" class="ingredient project idnt idnt-1 buttonable">
|
||||
<td class="name unwrappable" style="width: 5%;">
|
||||
<%= i.food.name %>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user