<div class="col-md-8 col-md-offset-2">
<br>
    <form role="form" action="<%= search_path %>" method="get">
        <div class="form-group">
            <%= label_tag :course, "I'm looking for a course..." %>
            <%= text_field_tag :course, params[:course], :class => 'form-control', :placeholder => "biology, sociology, Oxford, China..." %>
        </div>
        
        <div class="text-center">
            <%= submit_tag "Search!", :name => nil, :class => "btn btn-default" %>
        </div>
    </form>

</div>

<% if params[:course] != nil && params[:course] != '' %>

<div class="col-md-8 col-md-offset-2">
    
    <% if @courses.count > 0 %>
    
    <h2>Results</h2>
    
    <hr>

    <%= render @courses %>

    <div class="text-center">
        <%= will_paginate @courses, renderer: BootstrapPagination::Rails %>
    </div>
    
    <% else %>
    
    <div class="text-center"><h2>Nothing turned up!</h2></div>
    
    <% end %>
    
</div>

<% end %>

<div class="col-md-8 col-md-offset-2">
<br>
    <form role="form" action="<%= search_path %>" method="get">
        <div class="form-group">
            <%= label_tag :course, "I'm looking for a course..." %>
            <%= text_field_tag :course, params[:course], :class => 'form-control', :placeholder => "biology, sociology, Oxford, China..." %>
        </div>
        
        <div class="text-center">
            <%= submit_tag "Search!", :name => nil, :class => "btn btn-default" %>
        </div>
    </form>
    
    <% if ENV['DEMO_MODE'] == 'true' %>
    <div class="text-center">
        <h4>DEMO MODE</h4>
        <h5>Use these credentials to log in as an admin:</h5>
        <b>Email: </b><%= ENV['DEMO_USER'] %><br/>
        <b>Password: </b><%= ENV['DEMO_PASS'] %>
    </div>
    <% end %>

</div>

<% if params[:course] != nil && params[:course] != '' %>

<div class="col-md-8 col-md-offset-2">
    
    <% if @courses.count > 0 %>
    
    <h2>Results</h2>
    
    <hr>

    <%= render @courses %>

    <div class="text-center">
        <%= will_paginate @courses, renderer: BootstrapPagination::Rails %>
    </div>
    
    <% else %>
    
    <div class="text-center"><h2>Nothing turned up!</h2></div>
    
    <% end %>
    
</div>

<% end %>

Add option for demo mode
Add option for demo mode
