mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 13:36:15 +02:00
19 lines
483 B
Ruby
19 lines
483 B
Ruby
module AuctionHelper
|
|
include ActionView::Helpers::TagHelper
|
|
|
|
def colorize_auction(auction)
|
|
case auction.status
|
|
when 'started' then render_status_black(auction.domain)
|
|
when 'awaiting_payment' then render_status_black(auction.domain)
|
|
else render_status_green(auction.domain)
|
|
end
|
|
end
|
|
|
|
def render_status_black(name)
|
|
tag.span name.to_s, style: 'color: black;'
|
|
end
|
|
|
|
def render_status_green(name)
|
|
tag.span name.to_s, style: 'color: green;'
|
|
end
|
|
end
|