mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 22:46:22 +02:00
added auction list to admin panel
This commit is contained in:
parent
faf87aec7a
commit
2aa1100305
12 changed files with 359 additions and 4 deletions
21
app/helpers/auction_helper.rb
Normal file
21
app/helpers/auction_helper.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue