index.html.erb 670 Bytes
Newer Older
Zac Wood's avatar
Zac Wood committed
1 2 3
<% unless @instructors.nil? %>
    <h2>Instructors</h2>
    <div class="row">
Zac Wood's avatar
Zac Wood committed
4
	<% @instructors.each do |instructor| %>
Zac Wood's avatar
Zac Wood committed
5 6 7 8 9 10 11 12
	    <div class="col"><%= render partial: 'shared/instructor', object: instructor %></div>
	<% end %>
    </div>
    <hr />
<% end %>

<% unless @courses.nil? %>
    <h2>Courses</h2>
Zac Wood's avatar
Zac Wood committed
13
    <% @courses.each do |course| %>
Zac Wood's avatar
Zac Wood committed
14
	<div class="col"><%= render partial: 'shared/course', object: course %></div>
15
    <% end %>
Zac Wood's avatar
Zac Wood committed
16
<% end %>
Zac Wood's avatar
Zac Wood committed
17

Zac Wood's avatar
Zac Wood committed
18 19 20 21 22 23
<% if @courses.nil? && @instructors.nil? %>
    <h1>Sorry, we couldn't find anything matching your search.</h1>
    <p>Please try again!</p>
<% end %>


Zac Wood's avatar
Zac Wood committed
24 25
<%= javascript_include_tag 'search' %>
<%= stylesheet_link_tag 'search' %>