Now make it hackable and work with or without data

This commit is contained in:
Henne Vogelsang 2013-07-12 15:21:05 +02:00
parent d96f7d5332
commit 27812216b9
4 changed files with 130 additions and 127 deletions

View file

@ -0,0 +1,24 @@
%h3
Tickets (#{@tickets.length if @tickets}#{0 unless @tickets})
- if @supporter_levels.count > 0
%table.table.table-bordered.table-striped
%thead
%th Support Level
%th #
%th %
- @supporter_levels.each do |level|
- reg_support = reg_support(level)
- if reg_support.count > 0
%tr
%td= level.title
%td
= reg_support.count
%td
- if @registered and @registered > 0
= "#{reg_support.count * 100 / @registered}% of registered"
- if @attendees and @attendees > 0
%br
= "#{reg_support.count * 100 / @attendees}% of attendees"
- else
%p
No tickets sold yet