-
Add option
-
- <%= text_field_tag 'question[multi_choice][]', nil, { disabled: (disable ||= false), data: { last: nil } } %>
-
+
Add option
+
+ <%= text_field_tag 'question[multi_choice][]', nil, { disabled: (disable ||= false), data: { last: nil } } %>
<% end %>
diff --git a/app/views/admin/question/_table_list.html.erb b/app/views/admin/question/_table_list.html.erb
index 1ce0359..fc8bf60 100644
--- a/app/views/admin/question/_table_list.html.erb
+++ b/app/views/admin/question/_table_list.html.erb
@@ -15,7 +15,7 @@
<%= question.input_type %> |
<%= question.category %> |
<%= question.active unless question.active? %> |
-
<%= link_to 'Edit', admin_edit_question_path(question.to_i), { class: 'btn tertiary-btn' } %> |
+
<%= link_to 'Edit', admin_edit_question_path(question.to_i), { class: "" } %> |
<% end %>
diff --git a/app/views/admin/question/edit.html.erb b/app/views/admin/question/edit.html.erb
index 67ca722..83e3c3f 100644
--- a/app/views/admin/question/edit.html.erb
+++ b/app/views/admin/question/edit.html.erb
@@ -4,4 +4,5 @@
%>
<%= @question.quiz.name %>
+
<%= render partial: 'form', locals: {question: @question, action: admin_update_question_path } %>
diff --git a/app/views/admin/question/index.html.erb b/app/views/admin/question/index.html.erb
index 4f78c39..8675446 100644
--- a/app/views/admin/question/index.html.erb
+++ b/app/views/admin/question/index.html.erb
@@ -7,5 +7,5 @@
<% quizzes.each do |quiz, questions| %>
<%= quiz %>
<%= render partial: 'admin/question/table_list', locals: { questions: questions } %>
- <%= link_to('Edit Quiz', admin_quiz_path(questions.first.quiz.to_i), { class: 'btn' }) %>
+ <%= link_to('Edit Quiz', admin_quiz_path(questions.first.quiz.to_i), { class: "" }) %>
<% end %>
diff --git a/app/views/admin/question/view.html.erb b/app/views/admin/question/view.html.erb
index 913e737..7330537 100644
--- a/app/views/admin/question/view.html.erb
+++ b/app/views/admin/question/view.html.erb
@@ -3,39 +3,30 @@
content_for :title, "Question - Skills Assessment Admin"
%>
-
-
- Category |
- <%= @question.category %> |
-
-
- Type |
- <%= @question.input_type %> |
-
-
- Sort |
- <%= @question.sort %> |
-
-
- |
-
- <%= check_box_tag 'question_active', nil, @question.active?, {disabled: true} %>
- <%= label_tag 'question_active', 'Active' %>
- |
-
-
+
<%= @question.quiz.name %>
-
Question
-
<%= @question.question %>
+
Category
+
<%= @question.category %>
-<% if @question.attachment.present? %>
-
<%= image_tag @question.attachment %>
-<% end %>
+
Type
+
<%= @question.input_type %>
+
+
Sort
+
<%= @question.sort %>
+
+
+ <%= check_box_tag 'question_active', nil, @question.active?, {disabled: true} %>
+ <%= label_tag 'question_active', 'Active' %>
+
+
+
+
Question
+
<%= @question.question %>
+
<%= image_tag @question.attachment if @question.attachment.present? %>
<%= 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' }) %>
-
-<%= link_to('View Quiz', admin_quiz_path(@question.quiz_id), { class: 'btn' }) %>
+<%= link_to('Edit', admin_edit_question_path(@question.to_i), { class: "" }) %>
+<%= link_to('View Quiz', admin_quiz_path(@question.quiz_id), { class: "" }) %>
diff --git a/app/views/admin/quiz/_form.html.erb b/app/views/admin/quiz/_form.html.erb
index 5815161..765a47e 100644
--- a/app/views/admin/quiz/_form.html.erb
+++ b/app/views/admin/quiz/_form.html.erb
@@ -1,16 +1,16 @@
<%= render partial: 'shared/form_model_errors', locals: { obj: quiz} %>
<%= form_for quiz, url: action do |form| %>
-