effective_events 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b4f1c6fdc854ef73a51955a8d6384e5c4b92e1351ea77fe452038d9aaf0ea36c
         | 
| 4 | 
            +
              data.tar.gz: 8f7a424f52aa2c056969dba54947385e0374b66af5f41a7317dc2b682634e460
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: bb906912c0f4bcc169da25ee13b19c1f4403c30fb3019cee51b6a93e161941d48528d8c472e84d37a0eb8873e10151a128a9bd72c9c17ec325efef6baf0ce878
         | 
| 7 | 
            +
              data.tar.gz: d10878d80afeb41932d7e79d390d52226c172505bfa031d6a709b22fd564888f33681ff465f644abe2f0ccf5e23f0fe5b91a18c8d29ad207bff1e41769434004
         | 
| @@ -1,4 +1,11 @@ | |
| 1 1 | 
             
            module EffectiveEventsHelper
         | 
| 2 | 
            +
              def effective_events_event_schedule(event)
         | 
| 3 | 
            +
                if event.start_at.beginning_of_day == event.end_at.beginning_of_day
         | 
| 4 | 
            +
                  "#{event.start_at.strftime("%b %d, %Y %I:%M%P")} - #{event.end_at.strftime("%I:%M%P")}"
         | 
| 5 | 
            +
                else
         | 
| 6 | 
            +
                  "#{event.start_at.strftime("%b %d, %Y")} - #{event.end_at.strftime("%b %d, %Y")}"
         | 
| 7 | 
            +
                end
         | 
| 8 | 
            +
              end
         | 
| 2 9 |  | 
| 3 10 | 
             
              def effective_events_event_tickets_collection(event, namespace = nil)
         | 
| 4 11 | 
             
                raise('expected an Effective::Event') unless event.kind_of?(Effective::Event)
         | 
| @@ -37,5 +44,4 @@ module EffectiveEventsHelper | |
| 37 44 | 
             
                  [label, product.to_param, disabled].compact
         | 
| 38 45 | 
             
                end
         | 
| 39 46 | 
             
              end
         | 
| 40 | 
            -
             | 
| 41 47 | 
             
            end
         | 
| @@ -1,8 +1,6 @@ | |
| 1 1 | 
             
            .effective-event-categories
         | 
| 2 | 
            -
              % | 
| 3 | 
            -
                 | 
| 2 | 
            +
              %ul.nav.nav-pills{role: 'navigation'}
         | 
| 3 | 
            +
                = nav_link_to('All Events', effective_events.events_path, class: "nav-pill-effective-event effective-event-all")
         | 
| 4 4 |  | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
              - EffectiveEvents.categories.each do |category|
         | 
| 8 | 
            -
                = link_to(category, effective_events.events_path + '/' + category.parameterize)
         | 
| 5 | 
            +
                - EffectiveEvents.categories.each do |category|
         | 
| 6 | 
            +
                  = nav_link_to(category, effective_events.events_path + '/' + category.parameterize, class: "nav-pill-effective-event effective-event-#{category.parameterize}")
         | 
| @@ -1,53 +1,7 @@ | |
| 1 | 
            -
            .card
         | 
| 1 | 
            +
            .card{class: "effective-events-#{event.category.parameterize}"}
         | 
| 2 2 | 
             
              .card-body
         | 
| 3 | 
            -
                -  | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
                = event.excerpt.to_s
         | 
| 7 | 
            -
             | 
| 8 | 
            -
                %table.table.effective-events-table
         | 
| 9 | 
            -
                  %tbody
         | 
| 10 | 
            -
                    %tr
         | 
| 11 | 
            -
                      %th Dates
         | 
| 12 | 
            -
                      %td
         | 
| 13 | 
            -
                        Starts: #{event.start_at&.strftime('%F %R')}
         | 
| 14 | 
            -
                        %br
         | 
| 15 | 
            -
                        Ends: #{event.end_at&.strftime('%F %R')}
         | 
| 16 | 
            -
             | 
| 17 | 
            -
                    - if event.category.present?
         | 
| 18 | 
            -
                      %tr
         | 
| 19 | 
            -
                        %th Category
         | 
| 20 | 
            -
                        %td= event.category
         | 
| 21 | 
            -
             | 
| 22 | 
            -
                    %tr
         | 
| 23 | 
            -
                      %th Published At
         | 
| 24 | 
            -
                      %td= event.published_at.strftime('%F %R')
         | 
| 25 | 
            -
             | 
| 26 | 
            -
                    %tr
         | 
| 27 | 
            -
                      %th Registration Closes
         | 
| 28 | 
            -
                      %td= event.registration_end_at.strftime('%F %R')
         | 
| 29 | 
            -
             | 
| 30 | 
            -
                    %tr
         | 
| 31 | 
            -
                      %th Early Bird
         | 
| 32 | 
            -
                      %td
         | 
| 33 | 
            -
                        Status: #{event.early_bird_status}
         | 
| 34 | 
            -
                        %br
         | 
| 35 | 
            -
                        Ends: #{event.early_bird_end_at&.strftime('%F %R')}
         | 
| 36 | 
            -
             | 
| 37 | 
            -
                    - if event.event_tickets.present?
         | 
| 38 | 
            -
                      %tr
         | 
| 39 | 
            -
                        %th Tickets
         | 
| 40 | 
            -
                        %td
         | 
| 41 | 
            -
                          %ul.pl-3
         | 
| 42 | 
            -
                            - event.event_tickets.each do |ticket|
         | 
| 43 | 
            -
                              %li= "#{ticket} (#{price_to_currency(ticket.price)})"
         | 
| 44 | 
            -
             | 
| 45 | 
            -
                    - if event.event_products.present?
         | 
| 46 | 
            -
                      %tr
         | 
| 47 | 
            -
                        %th Add-ons
         | 
| 48 | 
            -
                        %td
         | 
| 49 | 
            -
                          %ul.pl-0
         | 
| 50 | 
            -
                            - event.event_products.each do |product|
         | 
| 51 | 
            -
                              %li= "#{product} (#{price_to_currency(product.price)})"
         | 
| 52 | 
            -
             | 
| 53 | 
            -
                = link_to('View more', effective_events.event_path(event))
         | 
| 3 | 
            +
                = link_to(event.category, effective_events.events_path + '/' + event.category.parameterize, class: "badge badge-event mb-2 effective-events-#{event.category.parameterize}")
         | 
| 4 | 
            +
                %h2.mt-1= link_to event.title, effective_events.event_path(event)
         | 
| 5 | 
            +
                .effective-events-schedule= effective_events_event_schedule(event)
         | 
| 6 | 
            +
                .effective-events-excerpt= event.excerpt.to_s
         | 
| 7 | 
            +
                = link_to "View Event",  effective_events.event_path(event), class: 'btn btn-primary'
         | 
| @@ -1,52 +1,58 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
              - | 
| 3 | 
            -
                 | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
                 | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
                . | 
| 10 | 
            -
                  - | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 1 | 
            +
            = render 'layout' do
         | 
| 2 | 
            +
              .effective-event
         | 
| 3 | 
            +
                - if @event.sold_out?
         | 
| 4 | 
            +
                  .alert.alert-warning.mb-3 This event is sold out.
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                - if @event.closed?
         | 
| 7 | 
            +
                  .alert.alert-warning.mb-3 This event is no longer available.
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                - if @event.registerable?
         | 
| 10 | 
            +
                  .resource-buttons
         | 
| 11 | 
            +
                    - url = @event.external_registration_url.presence || effective_events.new_event_event_registration_path(@event)
         | 
| 12 | 
            +
                    = link_to 'Register', url, class: 'btn btn-primary'
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              - if @event.file.attached?
         | 
| 15 | 
            +
                = image_tag(@event.file)
         | 
| 16 | 
            +
             | 
| 17 | 
            +
              - if @event.file.attached?
         | 
| 18 | 
            +
                = image_tag(@event.file)
         | 
| 19 | 
            +
             | 
| 20 | 
            +
              %ul.list-unstyled
         | 
| 21 | 
            +
                -# Not shown
         | 
| 22 | 
            +
                  %li
         | 
| 23 | 
            +
                    %strong Published:
         | 
| 24 | 
            +
                    = @event.published_at.strftime("%b %d, %Y %I:%M%P")
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                %li
         | 
| 27 | 
            +
                  %strong Event Date:
         | 
| 28 | 
            +
                  = effective_events_event_schedule(@event)
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                %li
         | 
| 31 | 
            +
                  %strong Registration Opens:
         | 
| 32 | 
            +
                  = @event.registration_start_at.strftime("%b %d, %Y %I:%M%P")
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                - if @event.early_bird_end_at.present?
         | 
| 35 | 
            +
                  %li
         | 
| 36 | 
            +
                    %strong Early Bird Rate Ends:
         | 
| 37 | 
            +
                    = @event.early_bird_end_at.strftime("%b %d, %Y %I:%M%P")
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                %li
         | 
| 40 | 
            +
                  %strong Registration Closes:
         | 
| 41 | 
            +
                  = @event.registration_end_at.strftime('%F %R')
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                - if @event.event_tickets.present?
         | 
| 44 | 
            +
                  %li
         | 
| 45 | 
            +
                    %strong Tickets
         | 
| 46 | 
            +
                    %ul
         | 
| 47 | 
            +
                      - @event.event_tickets.each do |ticket|
         | 
| 48 | 
            +
                        %li= "#{ticket} (#{price_to_currency(ticket.price)})"
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                - if @event.event_products.present?
         | 
| 51 | 
            +
                  %li
         | 
| 52 | 
            +
                    %strong Add-ons
         | 
| 53 | 
            +
                    %ul
         | 
| 54 | 
            +
                      - @event.event_products.each do |product|
         | 
| 55 | 
            +
                        %li= "#{product} (#{price_to_currency(product.price)})"
         | 
| 56 | 
            +
             | 
| 57 | 
            +
              - if @event.body.present?
         | 
| 17 58 | 
             
                = @event.body.to_s
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                %table.table.effective-events-table
         | 
| 20 | 
            -
                  %tbody
         | 
| 21 | 
            -
                    %tr
         | 
| 22 | 
            -
                      %th Dates
         | 
| 23 | 
            -
                      %td
         | 
| 24 | 
            -
                        Starts: #{@event.start_at&.strftime('%F %R')}
         | 
| 25 | 
            -
                        %br
         | 
| 26 | 
            -
                        Ends: #{@event.end_at&.strftime('%F %R')}
         | 
| 27 | 
            -
             | 
| 28 | 
            -
                    %tr
         | 
| 29 | 
            -
                      %th Registration Closes
         | 
| 30 | 
            -
                      %td= @event.registration_end_at.strftime('%F %R')
         | 
| 31 | 
            -
             | 
| 32 | 
            -
                    %tr
         | 
| 33 | 
            -
                      %th Early Bird
         | 
| 34 | 
            -
                      %td
         | 
| 35 | 
            -
                        Status: #{@event.early_bird_status}
         | 
| 36 | 
            -
                        %br
         | 
| 37 | 
            -
                        Ends: #{@event.early_bird_end_at&.strftime('%F %R')}
         | 
| 38 | 
            -
             | 
| 39 | 
            -
                    %tr
         | 
| 40 | 
            -
                      %th Tickets
         | 
| 41 | 
            -
                      %td
         | 
| 42 | 
            -
                        %ul.pl-3
         | 
| 43 | 
            -
                          - @event.event_tickets.each do |ticket|
         | 
| 44 | 
            -
                            %li= "#{ticket} (#{price_to_currency(ticket.price)})"
         | 
| 45 | 
            -
             | 
| 46 | 
            -
                    - if @event.event_products.present?
         | 
| 47 | 
            -
                      %tr
         | 
| 48 | 
            -
                        %th Add-ons
         | 
| 49 | 
            -
                        %td
         | 
| 50 | 
            -
                          %ul.pl-0
         | 
| 51 | 
            -
                            - @event.event_products.each do |product|
         | 
| 52 | 
            -
                              %li= "#{product} (#{price_to_currency(product.price)})"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: effective_events
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.5. | 
| 4 | 
            +
              version: 0.5.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Code and Effect
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022-10- | 
| 11 | 
            +
            date: 2022-10-30 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         |