_section.html.erb 1.4 KB
Newer Older
Zac Wood's avatar
Zac Wood committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<% if in_cart %>
    <li id="section-<%= section.crn %>"
	class="list-group-item schedule-section-card"
	data-crn="<%= section.crn %>"
	onclick="removeFromSchedule(this)"
    >
	<span style="float:left"><b class="subj"><%= "#{section.name}" %></b>:  <%= section.title %></span>
	<span style="float:right"><i class="fas fa-map-marker-alt"></i> <%= section.location %></span>
	<div style="clear: both"></div>
	<span style="float:left"><i class="fas fa-chalkboard-teacher"></i> <%= section.instructor.name %></span>
	<span style="float:right"><i class="fas fa-clock"></i> <%= "#{section.days}, #{section.start_time}-#{section.end_time}" %></span>
	<div style="clear: both"></div>
    </li>

<% else %>
    <li id="section-<%= section.crn %>"
	    class="list-group-item section-item <%= "selected" if @cart.include? section %>"
	    data-crn="<%= section.crn %>"
	    onclick="addToSchedule(event, this)"
    >
	<span style="float:left"><b class="subj"><%= "#{section.name}" %></b>:  <%= section.title %></span>
	<span style="float:right"><i class="fas fa-map-marker-alt"></i> <%= section.location %></span>
	<div style="clear: both"></div>
	<span style="float:left"><i class="fas fa-chalkboard-teacher"></i> <%= section.instructor.name %></span>
	<span style="float:right"><i class="fas fa-clock"></i> <%= "#{section.days}, #{section.start_time}-#{section.end_time}" %></span>
	<div style="clear: both"></div>
    </li>
<% end  %>