skill-assessment-app/app/views/admin/quiz/_table_list.html.erb

20 lines
516 B
Plaintext
Raw Normal View History

2016-08-18 18:22:57 -05:00
<table cellspacing="0" cellpadding="0">
<tr>
<th>Name</th>
<th>Dept</th>
<th>Unit</th>
<th>Questions</th>
<th></th>
</tr>
<% quizzes.each do |quiz| %>
<tr>
<td><%= link_to quiz.name, admin_quiz_path(quiz.to_i) %></td>
<td><%= quiz.dept %></td>
<td><%= quiz.unit %></td>
<td><%= quiz.questions.count %></td>
2016-09-22 16:29:19 -05:00
<td><%= link_to 'edit', admin_edit_quiz_path(quiz.to_i), { class: 'btn tertiary-btn' } if policy(quiz).edit? %></td>
2016-08-18 18:22:57 -05:00
</tr>
<% end %>
</table>