YaleSTC/shifts

View on GitHub
app/views/timeline/_location_row_set.html.erb

Summary

Maintainability
Test Coverage
<% location_preprocessing(location_row_set, day) unless day < Date.today %><%# prepare signup bar, etc. %>

<%= render partial: "shifts/schedule/location_row", collection: @location_rows[location_row_set], locals: {day: day, location: location_row_set} %>
<%#timeslot row%>
<% unless @location_rows_timeslots[location_row_set].nil? %>
  <ul id="location<%=location_row_set.id%>_<%=day%>_events" class="events" style="height:<%= (@table_pixels / (@table_height)) / 2 %>px;">
    <li id="location<%=location_row_set.id%>_<%=day%>_timeslots" style="width:100%" class="click_to_add_new_timeslot"></li>
    <%#= render partial: "shifts/schedule/time_slot", collection: @location_rows_timeslots[location_row_set] %>
    <%= render partial: 'shifts/schedule/signup_bar', object: @signup_bar, locals: {location: location_row_set, day: day, show_text: true} unless day < Date.today %>
  </ul>
  <% @timeslot_rows += 1 %>
<% end %>