osem-fcy/app/views/admin/stats/_tickets.html.haml
2013-07-30 11:41:39 +03:00

28 lines
832 B
Text

.row-fluid
.span12
%h3
Non-free Tickets (#{@tickets})
.row-fluid
.span5
- if @supporter_levels.count > 0
%table.table.table-bordered.table-striped
%thead
%th Support Level
%th #
%th %
- @supporter_levels.each do |level|
- reg_count = level.supporter_registrations.where(conference_id: @conference).count
- if reg_count > 0
%tr
%td= level.title
%td
= reg_count
%td
- if @registered and @registered > 0
= "#{reg_count * 100 / @registered}% of registered"
- if @attendees and @attendees > 0
%br
= "#{reg_count * 100 / @attendees}% of attendees"
- else
%p
No tickets sold yet