Sha256: 4b4af034fa7a2f04ef474332c7cefe83f950630385a172ade3e285f50a21501d

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

.card.mb-4
  .card-body
    - tickets = resource.event.event_tickets.reject(&:archived?)

    - member_column = tickets.any? { |ticket| ticket.member_only? || ticket.member_or_non_member? }
    - waitlist = tickets.any? { |ticket| ticket.waitlist? }

    %p This event has the following tickets available for purchase:

    %table.table.table-sm.table-striped
      %thead
        %tr
          %th Ticket
          - if member_column
            %th Member Price
          %th #{'Regular ' if member_column}Price

      %tbody
        - tickets.each do |ticket|
          %tr
            %td
              = ticket.to_s
              - if ticket.capacity.present? && ticket.display_capacity?
                %br
                %small
                  #{ticket.capacity_available} remaining
                  - if ticket.waitlist?
                    before waitlist

            - if member_column
              %td
                - if ticket.member_price.present?
                  = price_to_currency(ticket.member_price)
                - else
                  = '-'
            %td
              - if ticket.regular_price.present?
                = price_to_currency(ticket.regular_price)
              - else
                = '-'

    - if waitlist
      %p If the ticket capacity has been reached you will be added to the waitlist.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
effective_events-0.18.2 app/views/effective/event_registrations/_event_tickets.html.haml
effective_events-0.18.1 app/views/effective/event_registrations/_event_tickets.html.haml