2016-08-19 16:02:18 -05:00
|
|
|
<%
|
|
|
|
content_for :section_title, "Question for #{@question.quiz.name}"
|
2016-11-22 16:59:54 -06:00
|
|
|
content_for :title, "Question - Skills Assessment Admin"
|
2016-08-19 16:02:18 -05:00
|
|
|
%>
|
|
|
|
|
2016-08-24 12:17:00 -05:00
|
|
|
<table cellspacing="0" cellpadding="0">
|
|
|
|
<tr>
|
|
|
|
<th>Category</th>
|
|
|
|
<td><%= @question.category %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Type</th>
|
|
|
|
<td><%= @question.input_type %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Sort</th>
|
|
|
|
<td><%= @question.sort %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
|
|
|
<td>
|
|
|
|
<%= check_box_tag 'question_active', nil, @question.active?, {disabled: true} %>
|
|
|
|
<%= label_tag 'question_active', 'Active' %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2016-08-19 16:02:18 -05:00
|
|
|
|
2016-08-24 12:17:00 -05:00
|
|
|
<strong>Question</strong>
|
|
|
|
<p><%= @question.question %></p>
|
2016-08-19 16:02:18 -05:00
|
|
|
|
2016-08-24 16:55:55 -05:00
|
|
|
<% if @question.attachment.present? %>
|
|
|
|
<p><%= image_tag @question.attachment %></p>
|
|
|
|
<% end %>
|
|
|
|
|
2016-08-24 12:17:00 -05:00
|
|
|
<%= fields_for @question do |fields| %>
|
|
|
|
<%= render partial: "admin/question/#{@question.input_type}", locals: {question: @question, disable: true, fields: fields } %>
|
|
|
|
<% end %>
|
2016-08-19 16:02:18 -05:00
|
|
|
|
2016-08-24 12:17:00 -05:00
|
|
|
<%= link_to('Edit', admin_edit_question_path(@question.to_i), { class: 'btn' }) %>
|
2016-08-22 16:24:00 -05:00
|
|
|
|
2016-08-24 12:17:00 -05:00
|
|
|
<%= link_to('View Quiz', admin_quiz_path(@question.quiz_id), { class: 'btn' }) %>
|