diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb
index 99287e2cd..52b4d8997 100644
--- a/app/controllers/poll_controller.rb
+++ b/app/controllers/poll_controller.rb
@@ -89,7 +89,8 @@ class PollController < ApplicationController
option = {
:is_necessary => params[:is_necessary] || true,
:question_title => question_title,
- :question_type => params[:question_type] || 1
+ :question_type => params[:question_type] || 1,
+ :question_number => @poll.poll_questions.count + 1
}
@poll_questions = @poll.poll_questions.new option
if params[:question_answer]
diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb
index e2e9a217d..473c1df83 100644
--- a/app/views/poll/_poll_form.html.erb
+++ b/app/views/poll/_poll_form.html.erb
@@ -62,6 +62,11 @@
<%= render :partial => 'edit_head'%>
+
+ <% @poll.poll_questions.each do |poll_question|%>
+ <%= render :partial => 'show_MC', :locals => {:poll_question => poll_question} %>
+ <% end%>
+
<%#= render :partial => 'edit_MC'%>
diff --git a/app/views/poll/_question_answer.html.erb b/app/views/poll/_question_answer.html.erb
deleted file mode 100644
index 765d71787..000000000
--- a/app/views/poll/_question_answer.html.erb
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- 选项
-
- :
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/views/poll/_show_MC.html.erb b/app/views/poll/_show_MC.html.erb
index b156bc0bc..a33967ffd 100644
--- a/app/views/poll/_show_MC.html.erb
+++ b/app/views/poll/_show_MC.html.erb
@@ -1,10 +1,13 @@
- 第<%= question_index%>题:
+ 第<%= poll_question.question_number%>题:
- <%= poll_questions.question_title%>
- *
+ <%= poll_question.question_title %>
+ <%if poll_question.is_necessary == 1%>
+ *
+ <%end%>
+
@@ -12,24 +15,16 @@
diff --git a/app/views/poll/create_poll_question.js.erb b/app/views/poll/create_poll_question.js.erb
new file mode 100644
index 000000000..e69de29bb