app/views/registrations/index.html.erb
<p id="notice"><%= notice %></p>
<h1>Listing registrations</h1>
<h3>Current course</h3>
<table>
<tr>
<th>Student</th>
<th>Topic</th>
<th>Repository</th>
<th></th>
</tr>
<% @registrations.each do |registration| %>
<tr class='<%= active registration %>'>
<td><%= link_to registration.user, registration.user %></td>
<td><%= link_to registration.topic, registration %></td>
<td><%= link_to registration.repository, registration.repository %></td>
<td><%= link_to link_to registration.course, registration.course %></td>
</tr>
<% end %>
</table>
<% if @past_registrations.count > 0 %>
<h3>Past courses</h3>
<table>
<tr>
<th>Student</th>
<th>Topic</th>
<th>Repository</th>
<th>Course</th>
<th></th>
</tr>
<% @past_registrations.each do |registration| %>
<tr>
<td><%= link_to registration.user, registration.user %></td>
<td><%= link_to registration.topic, registration %></td>
<td><%= link_to registration.repository, registration.repository %></td>
<td><%= link_to link_to registration.course, registration.course %></td>
</tr>
<% end %>
</table>
<% end %>