1
0

Add Targets #show

Change css classes from subject-oriented to property-oriented
This commit is contained in:
cryptogopher
2021-05-05 12:42:30 +02:00
parent 8cac724694
commit e301665b6a
22 changed files with 132 additions and 130 deletions

View File

@@ -1,4 +1,17 @@
module TargetsHelper
def target_markup(date, quantity, target)
content = "#{' '*quantity.depth}#{quantity.name} #{target.to_s}"
classes = []
if date == target&.effective_from
classes << 'bolded' if @goal.quantities.include?(quantity)
else
classes << 'dimmed'
end
content_tag(:span, content, {class: classes}, false)
end
def action_links(date)
link_to(l(:button_reapply), reapply_goal_target_path(@goal, date, @view_params),
{remote: true, class: "icon icon-reload"}) +