Add Targets #show
Change css classes from subject-oriented to property-oriented
This commit is contained in:
@@ -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"}) +
|
||||
|
||||
Reference in New Issue
Block a user