YaleSTC/shifts

View on GitHub
app/views/templates/_location_and_time_slots.html.erb

Summary

Maintainability
Test Coverage
<% unless @locations %>
    Please select roles first
<% else %>
    <table class = "tablesorter">
      <thead>
        <tr>
            <th>Enable</th>
            <th>Where</th>
            <th>Start</th>
            <th>End</th>
            <th>Days</th>
        </tr>
      </thead>
      <tbody>
        <tr>
            <% if @template_time_slots.empty? %>
                Please select roles first
            <% else %>
                <% @template_time_slots.each do |@time_slot| %>
                    <%= content_tag :div, id: "time_slot_#{@time_slot.id}" do %>
                        <%= render partial: 'template_time_slot_form', locals: {locations: @locations, time_slot: @time_slot, f: f} %>
                    <% end %>
                <% end %>
            <% end %>
        </tr>
       </tbody>
    </table>
<% end %>