Redmine-Jobs/app/helpers/jobs_helper.rb

16 lines
593 B
Ruby
Raw Normal View History

2023-11-16 20:23:09 +00:00
module JobsHelper
def total_progress_bar(job)
progress_bar(job.done_ratio,
legend: "#{job.done_ratio}%
(#{l_hours_short(job.total_time_logged)}/#{l_hours_short(job.total_time_budget)})",
class: "progress")
end
def progress_bar_for(budget)
progress_bar(budget.job.done_ratio_for(budget.activity),
legend: "#{budget.job.done_ratio_for(budget.activity)}%
(#{l_hours_short(budget.job.total_time_logged_for(budget.activity))}/#{l_hours_short(budget.hours)})",
class: "progress")
end
2023-11-16 20:23:09 +00:00
end