anthonymidili/Bullhorn

View on GitHub
app/views/events/index.html.haml

Summary

Maintainability
Test Coverage
- provide :title, 'Events'
.row.center-content
  .col-12.col-md-8
    %p= render 'timezones/link_to_form', return_to: events_path
    .links.mb-3
      = link_to calendar_events_path, class: 'btn btn-secondary' do
        %i.fa-regular.fa-calendar
        Calendar view
      = link_to 'Create a New Event', new_event_path, class: 'btn btn-primary'

    %h1#upcoming_events Upcoming events
    - if @future_events.present?
      = render @future_events
    - else
      %h4 No Upcoming Events...

    %h3 Past events
    = turbo_frame_tag "past_events" do
      = render @past_events
    -# Infinate scroll events with turbo.
    = render "infinate_scroll/load_more"