Auction views

master
E. Almqvist 3 years ago
parent 0e8b4b61a2
commit 94701d2a14
  1. 4
      src/lib/db_models.rb
  2. 11
      src/views/auction/view.slim
  3. 4
      src/views/stylesheets/style.sass

@ -346,6 +346,10 @@ class Auction < EntityModel
data = Auction_Category_relation.get "category_id", "auction_id = ?", @id
data && data.map! { |category| Category.find_by_id category["category_id"]}
end
def bids
return []
end
end

@ -18,10 +18,19 @@
#auctioninfo.card
h2 = auction.title
ul.list-container#category-list
- auction.categories.each do |category|
p = category.name
- if auction.bids.length >= 1
.bid-container
- auctions.bids.each do |bid|
.bid
| BID
- else
p = "No bids! Be the first to bid on this item!"
script src="/js/slides.js" type="text/javascript"

@ -461,6 +461,10 @@ ul.list-container
h2
font-size: 1.8rem
#category-list
flex-direction: row
height: unset
.slideshow-container
grid-area: im
width: 40rem

Loading…
Cancel
Save