_section.html.erb 1.11 KB
Newer Older
Zac Wood's avatar
Zac Wood committed
1
2
3
4
<% unless defined?(editable) %>
    <% editable = true %>
<% end %>

Zac Wood's avatar
Zac Wood committed
5
<li id="section-<%= section.id %>"
6
    class="list-group-item section-item"
Zac Wood's avatar
Zac Wood committed
7
8
    data-crn="<%= section.crn %>"
    data-id="<%= section.id %>"
9
    data-cid="<%= course.id if defined?(course) %>"
10
    data-type="<%= section.section_type %>"
Zac Wood's avatar
Zac Wood committed
11
>
12
13
    <p><b class="subj"><%= "#{section.name}" %></b>:  <%= section.title %></p>

Zac Wood's avatar
Zac Wood committed
14
15
16
17
18
19
    <% if editable %>
	<% if in_cart? section.id  %>
	    <span class="float-right text-center add-remove-btn"><i id="icon" class="fas fa-minus"></i><br/><span class="text">Remove</span></span>	
	<% else %>
	    <span class="float-right text-center add-remove-btn"><i id="icon" class="fas fa-plus"></i><br/><span class="text">Add</span></span>
	<% end %>
20
21
    <% end %>
    
Zac Wood's avatar
Zac Wood committed
22
23
24
25
26
27
    <i class="fas fa-chalkboard-teacher"></i>
    <% if section.instructor.name == "TBA" %>
	TBA
    <% else %>
	<%= link_to section.instructor.name, section.instructor %><% end %> <br/>
    
28
29
    <i class="fas fa-map-marker-alt"></i> <%= section.location %> <br/>
    <i class="fas fa-clock"></i> <%= "#{section.days}, #{section.start_time}-#{section.end_time}" %> <br/>
Zac Wood's avatar
Zac Wood committed
30
</li>