<%
  content_for :section_title, "Question for #{@question.quiz.name}"
  content_for :title, "Question - Skills Assessment Admin"
%>

<h1><%= @question.quiz.name %></h1>

<h2>Category</h2>
<div><%= @question.category %></div>

<h2>Type</h2>
<div><%= @question.input_type %></div>

<h2>Sort</h2>
<div><%= @question.sort %></div>

<div>
  <%= check_box_tag 'question_active', nil, @question.active?, {disabled: true} %>
  <%= label_tag 'question_active', 'Active' %>
</div>


<h2>Question</h2>
<div><%= @question.question %></div>
<div><%= image_tag @question.attachment if @question.attachment.present? %></div>

<%= 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: "" }) %>
<%= link_to('View Quiz', admin_quiz_path(@question.quiz_id), { class: "" }) %>
