added auction list to admin panel

This commit is contained in:
olegphenomenon 2022-04-08 18:39:47 +03:00
parent faf87aec7a
commit 2aa1100305
12 changed files with 359 additions and 4 deletions

View file

@ -0,0 +1,21 @@
module AuctionHelper
include ActionView::Helpers::TagHelper
extend self
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)
content_tag(:span, name.to_s, style: 'color: black;')
end
def render_status_green(name)
content_tag(:span, name.to_s , style: 'color: green;')
end
end