Rearranged Meals index columns
This commit is contained in:
@@ -5,9 +5,14 @@ module MealsHelper
|
||||
delete_link(meal_path(m), {remote: true, data: {}})
|
||||
end
|
||||
|
||||
def display_notes(m)
|
||||
content_tag(:span, m.notes) +
|
||||
link_to(l(:button_notes), edit_notes_meal_path(m),
|
||||
{remote: true, class: "icon icon-wiki-page", style: "float: right"})
|
||||
def adjustment_buttons(i)
|
||||
{'- -' => -10, '-' => -1, '+' => 1, '++' => 10}.map do |text, value|
|
||||
link_to text, adjust_ingredient_path(i, adjustment: value),
|
||||
{remote: true, method: :post, class: "button #{value>0 ? 'green' : 'red'}"}
|
||||
end.reduce(&:+)
|
||||
end
|
||||
|
||||
def notes(m)
|
||||
content_tag(:span, m.notes)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user