_readonly_pool.slim
842 Bytes
table
thead
th style='text-align: left' Day
th style='text-align: left' Home
th style='text-align: left' Your bet
th style='text-align: left' Away
th style='text-align: left' Your bet
th style='text-align: left' Result
th style='text-align: left' Home Score
th style='text-align: left' Away Score
th style='text-align: left' Points
- pool.matches.each do |match|
- bet = current_user.bets.find_or_initialize_by(match_id: match.id)
tr
td = l(match.date, format: :short)
td = match.local
td = bet.try(:score_local)
td = match.visit
td = bet.try(:score_visit)
td = match.result ? match.result.upcase : 'PENDING'
td = match.score_local
td = match.score_visit
td.points class="#{bet.points.to_i.zero? ? 'zero' : 'positive'}" = bet.try(:points)