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

<% unless @courses.nil? %>
    <h2>Courses</h2>
    <% @courses.map(&:data).each do |course| %>
	<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' %>