YaleSTC/cardswipr

View on GitHub
app/views/events/show.html.erb

Summary

Maintainability
Test Coverage
<%= button_to 'Back to Events', dashboard_path, method: :get, :class => 'btn btn-primary' %>
<br />
<div class="row">
  <div class="col-xl-6 offset-xl-3 col-lg-8 offset-lg-2 col-md-10 offset-md-1 col-12">
    <div class="container p-1">
    <%= render 'flashes' %>
    </div>
    <div class="card shadow text-center">
      <div class="card-header text-white bg-yale">
        <h2 class = "display-3"><b>Check in for <%=@event.title%></b></h2>
      </div>
      <div class="card-body">
        <p class="h3 m-1"><%=@event.description%></p>
        <br />
        <div class="h3 m-1">
          <p><b>Card Swipe</b> or <b>Card Tap</b> or <b>NetID</b></p>
        </div>
        <%= form_tag event_attendances_path(@event), id: 'swipr_swipe_form' do %>
          <div class="col-12 mx-auto input-group">
            <%= text_field_tag :search_param, '', autofocus: true, :class => 'p-2 form-control m-1' %>
            <%= submit_tag 'Check In', :class => 'btn btn-primary' %>
          </div>
        <% end %>
        <br />
        <p><%= @event.attendances.size %> Recorded</p>
      </div>
    </div>
  </div>
</div>