.container
  .row
    .col-md-10.col-md-offset-1
      .page-header
        %h1
          Registrations
          - if @event.max_attendees
            (#{@event.events_registrations.length}/#{@event.max_attendees})
          - else
            (#{@event.events_registrations.length})
        .text-muted
          for
          = @event.title

      .well
        %table.datatable#registrations
          %thead
            %tr
              %th
              %th Name
              %th Email
              %th Created AT
              %th Attended
              %th Attended Conference
          %tbody
            - @event.events_registrations.each.with_index(1) do |event_registration, index|
              %tr
                %td= index
                %td= event_registration.name
                %td
                  - if event_registration.registration.user.email_public
                    = event_registration.email
                  - else
                    (private)
                %td= event_registration.created_at
                %td.text-center
                  - if event_registration.attended
                    %i.fa-solid.fa-check.text-success
                  - else
                    %i.fa-solid.fa-xmark.text-danger
                %td
                  - if event_registration.registration.attended
                    %i.fa-solid.fa-check.text-success
                  -else
                    %i.fa-solid.fa-xmark.text-danger
