openSUSE/osem

View on GitHub
app/views/admin/physical_tickets/index.html.haml

Summary

Maintainability
Test Coverage
.container
  .row
    .col-md-12.page-header
      %h2
        Tickets Sold
      .text-muted
        Tickets sold for the conference
  .row
    .col-md-4
      = render 'donut_chart', title: 'Tickets sold',
        combined_data: @tickets_sold_distribution
    .col-md-4
      = render 'donut_chart', title: 'Tickets turnover',
        combined_data: @tickets_turnover_distribution
  %br
  - if @physical_tickets.any?
    .row
      .col-md-12
        %table.datatable#tickets
          %thead
            %tr
              %th ID
              %th Type
              %th User
              %th Paid
              %th Actions
          %tbody
            - @physical_tickets.each do |physical_ticket|
              = render "physical_ticket", physical_ticket: physical_ticket,
                conference: @conference
  - else
    %h5 No Tickets sold!