diff --git a/app/views/poll/_show_MCQ_result.html.erb b/app/views/poll/_show_MCQ_result.html.erb index 065a4b6c9..4129f164b 100644 --- a/app/views/poll/_show_MCQ_result.html.erb +++ b/app/views/poll/_show_MCQ_result.html.erb @@ -13,7 +13,7 @@ <% poll_question.poll_votes.where("user_id = #{User.current.id}").each do |answer|%> -

+

<%= answer.poll_answer.answer_text == "" ? (answer.vote_text.nil? ? "其他" : answer.vote_text) : answer.poll_answer.answer_text %>

diff --git a/app/views/poll/_show_MC_result.html.erb b/app/views/poll/_show_MC_result.html.erb index 34bd7f644..d154468b3 100644 --- a/app/views/poll/_show_MC_result.html.erb +++ b/app/views/poll/_show_MC_result.html.erb @@ -13,7 +13,7 @@ <% poll_question.poll_votes.where("user_id = #{User.current.id}").each do |answer|%> -

+

<%= answer.poll_answer.answer_text == "" ? (answer.vote_text.nil? ? "其他" : answer.vote_text) : answer.poll_answer.answer_text %>

diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index 83b5d26e9..cf270fb67 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,5 +1,5 @@
- +

<%= poll.polls_name%>

<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
diff --git a/app/views/poll/_show_mulit_result.html.erb b/app/views/poll/_show_mulit_result.html.erb index 77c6d510c..da72ea35d 100644 --- a/app/views/poll/_show_mulit_result.html.erb +++ b/app/views/poll/_show_mulit_result.html.erb @@ -10,7 +10,7 @@ <% poll_question.poll_answers.reorder("answer_position").each_with_index do |poll_answer, i| %>

<%= i + 1 %>.<%= poll_answer.answer_text%>

-

+

<%= get_anwser_vote_text(poll_question.id,User.current.id,poll_answer.id).html_safe%>

diff --git a/app/views/poll/_show_single_result.html.erb b/app/views/poll/_show_single_result.html.erb index 7bdf9940a..4fbf3698f 100644 --- a/app/views/poll/_show_single_result.html.erb +++ b/app/views/poll/_show_single_result.html.erb @@ -8,7 +8,7 @@
-

+

<%= get_anwser_vote_text poll_question.id,User.current.id%>