_section.html.erb 1.55 KB
Newer Older
Zac Wood's avatar
Zac Wood committed
1
<% if in_cart %>
2
3
4
5
6
7
8
9
10
11
12
13
    <div id="section-<%= section.crn %>"
	      class="list-group-item schedule-section-card"
	      data-crn="<%= section.crn %>"
	      onclick="removeFromSchedule(this)">
    	<ul class="attr-list">
      	<li><b class="subj"><%= "#{section.name}" %></b>:  <%= section.title %></li>
      	<li><i class="fas fa-map-marker-alt"></i> <%= section.location %></li>
      	<li><i class="fas fa-chalkboard-teacher"></i> <%= link_to section.instructor.name, instructor_path(section.instructor) %> </li>
      	<li><i class="fas fa-clock"></i> <%= "#{section.days}, #{section.start_time}-#{section.end_time}" %></li>
      </ul>
    </a>
  </div>
Zac Wood's avatar
Zac Wood committed
14
15

<% else %>
16
17
18
19
    <div id="section-<%= section.crn %>"
	      class="list-group-item section-item <%= "selected" if @cart.include? section %>"
	      data-crn="<%= section.crn %>"
	      onclick="addOrRemoveFromSchedule(event, this)">
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
	  <div class="unpadded container">
	    <div class="row">
	      <div class="col">
	        <b class="subj"><%= "#{section.name}" %></b>:  <%= section.title %>
	      </div>
	      <div class="col text-right">
	        <i class="fas fa-map-marker-alt"></i> <%= section.location %>
	      </div>
	    </div>
	    <div class="row">
	      <div class="col">
	        <i class="fas fa-chalkboard-teacher"></i> <%= link_to section.instructor.name, instructor_path(section.instructor) %>
	      </div>
	      <div class="col text-right">
	        <i class="fas fa-clock"></i> <%= "#{section.days}, #{section.start_time}-#{section.end_time}" %>
	      </div>
	    </div>
	  </div>
38
  </div>
Zac Wood's avatar
Zac Wood committed
39
40
41
<% end  %>