_course.html.erb 1.39 KB
Newer Older
Zac Wood's avatar
Zac Wood committed
1
<div class="card course-card" id="course-<%= course.id %>">
Zac Wood's avatar
Zac Wood committed
2
    <div class="card-header">
Zac Wood's avatar
Zac Wood committed
3
4
	<div class="row">
	    <div class="col">
5
6
7
		<%= link_to course do %>
		    <h4 class="title"><%= "#{course.subject} #{course.course_number}" %></h4>
		<% end %>
Zac Wood's avatar
Zac Wood committed
8
9
	    </div>
	</div>
Zac Wood's avatar
Zac Wood committed
10
11
12
13
14
15
16
17
	<div class="d-md-flex justify-content-between">
	    <h5><em><%= course.title %></em></h5>
	    <div class="attr-list justify-content-start">
		<div class="attr">
		    <div class="icon">
			<i class="fa fa-book"></i>
		    </div>
		    <%= course.credits %> credits
Zac Wood's avatar
Zac Wood committed
18
		</div>
Zac Wood's avatar
Zac Wood committed
19
		&nbsp;&nbsp;&nbsp;
Zac Wood's avatar
Zac Wood committed
20
	    </div>
Zac Wood's avatar
Zac Wood committed
21
	</div>
Zac Wood's avatar
Zac Wood committed
22
23
24
    </div>
    <div class="card-body">
	
Zac Wood's avatar
Zac Wood committed
25
26
	<p class="description"><%= course.description %></p>	
	
Zac Wood's avatar
Zac Wood committed
27
28
29
30
31
	<% unless course.prereqs.nil? || course.prereqs.empty? %>
    	    <% first, rest = course.prereqs.split(':') %>
    	    <% prereqs, note = rest.split('.') %>
    	    <p><strong><%= first %>:</strong> <%= prereqs %> <sub><%= note %></sub></p>
	<% end %>
Zac Wood's avatar
Zac Wood committed
32

33
34
35
36
37
38
39
40
41
42
43
	<% if expanded %>
		<div class="d-block" style="text-align: center">
	  	    <p id="chevron-label" style="margin-bottom:-4px; font-size: 10px;">Minimize</p>
	  	    <i id="course-chevron" class="fas fa-chevron-up"></i>
		</div>
	<% else %>
		<div class="d-block" style="text-align: center">
	  	    <p id="chevron-label" style="margin-bottom:-4px; font-size: 10px;">Expand</p>
	  	    <i id="course-chevron" class="fas fa-chevron-down"></i>
		</div>
	<% end %>
44
    </div>
Zac Wood's avatar
Zac Wood committed
45
</div>