2016-08-19 16:02:18 -05:00
|
|
|
<%
|
|
|
|
content_for :section_title, "Question for #{@question.quiz.name}"
|
|
|
|
%>
|
|
|
|
|
|
|
|
<main class="admin_tpl">
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<strong>Question</strong>
|
|
|
|
<p><%= @question.question %></p>
|
|
|
|
|
|
|
|
<%= fields_for @question do |fields| %>
|
|
|
|
<%= render partial: "admin/question/#{@question.input_type}", locals: {question: @question, disable: true, fields: fields } %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= link_to('Edit', admin_edit_question_path(@question.to_i), { class: 'btn' }) %>
|
|
|
|
</main>
|