app/views/tutoring_sessions/new.html.erb
<div class="row">
<div class="col-md-12">
<h1 class="text-center">
New Tutoring Session
<% if !current_user.tutor? %>
<br> <small> For <%= link_to @tutor.name, @tutor %> </small>
<% end %>
</h1>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-6 col-md-offset-3">
<% if !@students.count.zero? %>
<%= simple_form_for :tutoring_session, url: tutoring_sessions_path do |f| %>
<%= render partial: 'form', locals: {f: f} %>
<% end %>
<% else %>
<div class="row">
<div class="col-md-12 text-center">
<% if current_user.tutor? %>
<p class="text-danger"> You have no active matches. </p>
<% else %>
<p class="text-danger"> This tutor has no active matches. Please match this tutor to add a tutoring session. </p>
<% end %>
</div>
</div>
<% end %>
</div>
</div>