show.html.erb 788 Bytes
Newer Older
Zac Wood's avatar
Zac Wood committed
1
<div class="row">
Zac Wood's avatar
Zac Wood committed
2
    <div class="col-md-4 col-sm-12">
Zac Wood's avatar
Zac Wood committed
3 4
	<h1><%= @instructor.name %></h1>
	<% prev = @instructor.course_sections.reject { |s| s.course.semester == @semester }.map { |s| s.name.split[0..1].join(' ') }.uniq %>
5

Zac Wood's avatar
Zac Wood committed
6 7 8 9 10 11 12 13 14 15
	<% if prev.count.positive? %>
	    <strong>Previously taught: </strong>
	    <ul>
		<% prev.each do |s| %>
		    <li><%= s %></li>
		<% end %>
	    </ul>
	<% end %>
    </div>

Zac Wood's avatar
Zac Wood committed
16
    <div class ="col-md-8 col-sm-12">
Zac Wood's avatar
Zac Wood committed
17 18 19 20 21 22 23 24
	<h3><%= @semester.to_s %></h3>
	<% if @courses.any? %>
	    <%= render partial: 'shared/course', collection: @courses, locals: { expanded: true } %>
	<% else %>
	    <p><%= @instructor.name %> is not teaching any courses this semester...</p>
	<% end %>
    </div>
</div>
25 26 27

<%= javascript_include_tag 'search' %>
<%= stylesheet_link_tag 'search' %>