<% if current_student.admin? %>
<% @students.each do |student| %>
<td><%= student.name %></td>
<td><%= student.email %></td>
<td><%= display_name student.gender %></td>
<td><%= display_age student.age %></td>
<td><%= student.opinion %></td>
<td><%= link_to 'Show', student %></td>
<td><%= link_to 'Edit', edit_student_path(student) %></td>
<td><%= link_to 'Destroy', student, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to 'New Exam Result', new_exam_result_path(student_id: student.id) %></td>
<td><%= link_to 'New Club Student', new_club_student_path(student_id: student.id) %></td>
<td><%= @student.name %></td>
<td><%= @student.email %></td>
<td><%= display_name @student.gender %></td>
<td><%= display_age @student.age %></td>
<td><%= @student.opinion %></td>
<td><%= link_to 'Show', @student %></td>
<td><%= link_to 'Edit', edit_student_path(@student) %></td>
<td><%= link_to 'Destroy', @student, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to 'New Exam Result', new_exam_result_path(student_id: @student.id) %></td>
<td><%= link_to 'New Club student', new_club_student_path(student_id: @student.id) %></td>
<% if current_student.admin? %>
<%= paginate @students %>