2024-02-25 12:15:55 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-04-16 19:37:53 -04:00
|
|
|
module TakedownsHelper
|
|
|
|
def pretty_takedown_status(takedown)
|
2023-06-28 11:14:58 -04:00
|
|
|
status = takedown.status.capitalize
|
|
|
|
classes = {
|
2024-07-25 17:21:32 -04:00
|
|
|
"inactive" => "background-grey",
|
|
|
|
"denied" => "background-red",
|
|
|
|
"partial" => "background-green",
|
|
|
|
"approved" => "background-green",
|
2023-06-28 11:14:58 -04:00
|
|
|
}
|
2020-04-16 19:37:53 -04:00
|
|
|
tag.td(status, class: classes[takedown.status])
|
|
|
|
end
|
|
|
|
end
|