skill-assessment-app/app/views/admin/question/view.html.erb

33 lines
951 B
Plaintext
Raw Permalink Normal View History

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
%>
2017-03-20 10:57:50 -05:00
<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>
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
2017-03-20 10:57:50 -05:00
<%= link_to('Edit', admin_edit_question_path(@question.to_i), { class: "" }) %>
<%= link_to('View Quiz', admin_quiz_path(@question.quiz_id), { class: "" }) %>