From 0dc0ba3a4a36070971f9413c419b7713e3aa24c5 Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 16 Jan 2015 10:59:25 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/index.html.erb | 68 ++++++++++++++++++++--------------- app/views/poll/show.html.erb | 4 ++- 2 files changed, 43 insertions(+), 29 deletions(-) diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index e45bdfabb..0e5e956ca 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -11,34 +11,46 @@
<% @polls.each do |poll|%> - + + <% unless !@is_teacher && poll.polls_status != 2 %> + + <% end %> +
<% end%> diff --git a/app/views/poll/show.html.erb b/app/views/poll/show.html.erb index dca45c25c..2db0045f6 100644 --- a/app/views/poll/show.html.erb +++ b/app/views/poll/show.html.erb @@ -217,7 +217,9 @@
- <%= link_to "提交",commit_poll_poll_path(@poll), :method => :post,:class => "ur_button",:format => 'js',:remote=>true %> + <% if @poll.polls_status == 2 %> + <%= link_to "提交",commit_poll_poll_path(@poll), :method => :post,:class => "ur_button",:format => 'js',:remote=>true %> + <% end %>
答题已完成 0%
From a5cf1576f1626d7eeebe79c812270e129418d4de Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 16 Jan 2015 13:44:20 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=B0=86=E6=96=B0=E5=A2=9E=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E6=A0=8F=E6=94=BE=E5=88=B0=E9=97=AE=E9=A2=98=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=8B=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll_form.html.erb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index 598ef1207..1c2afc27c 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -60,6 +60,19 @@
+ +
+ <%= render :partial => 'show_head', :locals => {:poll => @poll}%> +
+ + + +
+ <%= render :partial => 'poll_content', :locals => {:poll => @poll}%> +
+
  • @@ -86,19 +99,6 @@
- -
- <%= render :partial => 'show_head', :locals => {:poll => @poll}%> -
- - - -
- <%= render :partial => 'poll_content', :locals => {:poll => @poll}%> -
-
From 2954bba4117c7d852a1e7a5f88b7db51f01fb07e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 16 Jan 2015 13:54:06 +0800 Subject: [PATCH 3/9] =?UTF-8?q?j=E8=BF=9B=E5=85=A5=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=A4=B4=E6=98=BE=E7=A4=BA=E4=B8=BA=E5=8F=AF?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll_form.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index 1c2afc27c..1b30c973d 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -61,10 +61,10 @@
-
+ - +<% end%> \ No newline at end of file diff --git a/app/views/poll/_new_MC.html.erb b/app/views/poll/_new_MC.html.erb index 013bf0ed0..f4f1ef676 100644 --- a/app/views/poll/_new_MC.html.erb +++ b/app/views/poll/_new_MC.html.erb @@ -1,6 +1,5 @@ <%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%> -
- +
@@ -35,11 +34,10 @@
-
<% end%> \ No newline at end of file diff --git a/app/views/poll/_new_MCQ.html.erb b/app/views/poll/_new_MCQ.html.erb index 6739c233e..23f216427 100644 --- a/app/views/poll/_new_MCQ.html.erb +++ b/app/views/poll/_new_MCQ.html.erb @@ -1,33 +1,41 @@ -
+<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
- + + - - + +
    -
  • - - - - +
  • + + + +
  • -
    -
  • - - - - +
    +
  • + + + +
  • -
    +
    +
  • + + + + +
  • +
-
\ No newline at end of file +<% end%> \ 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 f3fc9c8b5..594baea9d 100644 --- a/app/views/poll/_show_MC.html.erb +++ b/app/views/poll/_show_MC.html.erb @@ -7,7 +7,7 @@ <%if poll_question.is_necessary == 1%> * <%end%> - + (单选题)
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> diff --git a/app/views/poll/_show_MCQ.html.erb b/app/views/poll/_show_MCQ.html.erb index e56de53b9..64e39523a 100644 --- a/app/views/poll/_show_MCQ.html.erb +++ b/app/views/poll/_show_MCQ.html.erb @@ -1,28 +1,31 @@
- 第2题: 多选题 * + + 第<%= poll_question.question_number%>题: + + <%= poll_question.question_title %> + <%if poll_question.is_necessary == 1%> + * + <%end%> + (多选题)
- - + <%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), + method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> +
- - - - - - - - - + <% poll_question.poll_answers.reorder("answer_position").each do |poll_answer| %> + + + + <% end %>
- -
- -
- -
+ +
diff --git a/app/views/poll/create_poll_question.js.erb b/app/views/poll/create_poll_question.js.erb index 18f999157..ac44ebb4c 100644 --- a/app/views/poll/create_poll_question.js.erb +++ b/app/views/poll/create_poll_question.js.erb @@ -1,10 +1,26 @@ $("#new_poll_question").html(""); $("#poll_content").append("
" + "
" + + "<% if @poll_questions.question_type == 1%>" + "<%= escape_javascript(render :partial => 'show_MC', :locals => {:poll_question => @poll_questions}) %>" + + "<% elsif @poll_questions.question_type == 2%>" + + "<%= escape_javascript(render :partial => 'show_MCQ', :locals => {:poll_question => @poll_questions}) %>" + + "<% elsif @poll_questions.question_type == 3%>" + + "<%= escape_javascript(render :partial => 'show_single', :locals => {:poll_question => @poll_questions}) %>" + + "<% elsif @poll_questions.question_type == 4%>" + + "<%= escape_javascript(render :partial => 'show_mulit', :locals => {:poll_question => @poll_questions}) %>" + + "<% end%>" + "
" + "" + "
"); From f46c8e8adc8cdd6c626667f538249520a168d9e4 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 16 Jan 2015 14:47:09 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=8D=95=E9=80=89?= =?UTF-8?q?=E3=80=81=E5=A4=9A=E9=80=89=E5=8F=96=E6=B6=88=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=BB=A7=E7=BB=AD=E6=96=B0=E5=BB=BA=E7=9A=84?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_new_MC.html.erb | 2 +- app/views/poll/_new_MCQ.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/poll/_new_MC.html.erb b/app/views/poll/_new_MC.html.erb index f4f1ef676..5ff70e9eb 100644 --- a/app/views/poll/_new_MC.html.erb +++ b/app/views/poll/_new_MC.html.erb @@ -35,7 +35,7 @@
diff --git a/app/views/poll/_new_MCQ.html.erb b/app/views/poll/_new_MCQ.html.erb index 23f216427..d94964bbf 100644 --- a/app/views/poll/_new_MCQ.html.erb +++ b/app/views/poll/_new_MCQ.html.erb @@ -34,7 +34,7 @@
From 65a3ddce41b921f5f3b0ec13867db4f451aad6d1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 16 Jan 2015 15:05:30 +0800 Subject: [PATCH 7/9] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8D=95=E8=A1=8C=E6=96=87=E5=AD=97=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=202=E3=80=81=E4=BF=AE=E6=94=B9=E9=A2=98=E7=9B=AE=E5=90=8E?= =?UTF-8?q?=E6=80=BB=E6=98=AF=E6=98=BE=E7=A4=BA=E4=B8=BA=E5=8D=95=E9=80=89?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 3 +-- app/views/poll/_edit_single.html.erb | 14 +++++++---- app/views/poll/_new_single.html.erb | 29 ++++++++++++---------- app/views/poll/_show_single.html.erb | 14 ++++++++--- app/views/poll/update_poll_question.js.erb | 20 +++++++++++++-- 5 files changed, 55 insertions(+), 25 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 9c5f810c6..fc23166ff 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -119,8 +119,7 @@ class PollController < ApplicationController #修改单选题 def update_poll_question @poll_question = PollQuestion.find params[:poll_question] - @poll = @poll_question.poll - + #@poll = @poll_question.poll @poll_question.is_necessary = params[:is_necessary]=="true" ? 1 : 0 @poll_question.question_title = params[:poll_questions_title].nil? || params[:poll_questions_title].empty? ? l(:label_enter_single_title) : params[:poll_questions_title] ################处理选项 diff --git a/app/views/poll/_edit_single.html.erb b/app/views/poll/_edit_single.html.erb index 4e98babe4..b8157ee6c 100644 --- a/app/views/poll/_edit_single.html.erb +++ b/app/views/poll/_edit_single.html.erb @@ -1,13 +1,17 @@ +<%= form_for("",:url => update_poll_question_poll_index_path(:poll_question => poll_question.id),:remote => true) do |f|%>
- - + + + />
-
\ No newline at end of file + +<% end%> \ No newline at end of file diff --git a/app/views/poll/_new_single.html.erb b/app/views/poll/_new_single.html.erb index b7d5a9725..ec06933a8 100644 --- a/app/views/poll/_new_single.html.erb +++ b/app/views/poll/_new_single.html.erb @@ -1,13 +1,16 @@ -
-
- - - - -
- -
-
\ No newline at end of file +<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%> +
+
+ + + + + +
+ +
+
+<% end%> \ No newline at end of file diff --git a/app/views/poll/_show_single.html.erb b/app/views/poll/_show_single.html.erb index 437e38044..d9ef2abc7 100644 --- a/app/views/poll/_show_single.html.erb +++ b/app/views/poll/_show_single.html.erb @@ -1,9 +1,17 @@
- 第3题: 单行文字 + + 第<%= poll_question.question_number%>题: + + <%= poll_question.question_title %> + <%if poll_question.is_necessary == 1%> + * + <%end%> + (单行文字)
- - + <%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), + method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> +
diff --git a/app/views/poll/update_poll_question.js.erb b/app/views/poll/update_poll_question.js.erb index 39d0fcfd6..e0727df67 100644 --- a/app/views/poll/update_poll_question.js.erb +++ b/app/views/poll/update_poll_question.js.erb @@ -1,6 +1,22 @@ $("#poll_questions_<%= @poll_question.id%>").html("
" + - "<%= escape_javascript(render :partial => 'show_MC', :locals => {:poll_question => @poll_question}) %>" + + "<% if @poll_question.question_type == 1%>" + + "<%= escape_javascript(render :partial => 'show_MC', :locals => {:poll_question => @poll_question}) %>" + + "<% elsif @poll_question.question_type == 2%>" + + "<%= escape_javascript(render :partial => 'show_MCQ', :locals => {:poll_question => @poll_question}) %>" + + "<% elsif @poll_question.question_type == 3%>" + + "<%= escape_javascript(render :partial => 'show_single', :locals => {:poll_question => @poll_question}) %>" + + "<% elsif @poll_question.question_type == 4%>" + + "<%= escape_javascript(render :partial => 'show_mulit', :locals => {:poll_question => @poll_question}) %>" + + "<% end%>" + "
" + ""); From 0a367249ae3b7f3fb32072316c5324f55ed570e8 Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 16 Jan 2015 15:32:09 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=BA=A6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 90 +++++++++++++++++++++------ app/views/poll/_commit_alert.html.erb | 2 +- app/views/poll/show.html.erb | 27 ++++++-- 3 files changed, 95 insertions(+), 24 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index a843e9d9b..8f89c1a9e 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -24,6 +24,7 @@ class PollController < ApplicationController render_403 else @can_edit_poll = (!has_commit_poll?(@poll.id,User.current.id)) || User.current.admin? + @percent = get_percent(@poll,User.current) poll_questions = @poll.poll_questions @poll_questions = paginateHelper poll_questions,3 #分页 respond_to do |format| @@ -172,7 +173,7 @@ class PollController < ApplicationController def commit_answer pq = PollQuestion.find(params[:poll_question_id]) if has_commit_poll?(@poll.id,User.current.id) && (!User.current.admin?) - render :text => 'failure' + render :json => {:text => "failure"} return end if pq.question_type == 1 @@ -185,9 +186,10 @@ class PollController < ApplicationController end pv.poll_answer_id = params[:poll_answer_id] if pv.save - render :text => "ok" + @percent = get_percent(@poll,User.current) + render :json => {:text => "ok" ,:percent => format("%.2f" ,@percent)} else - render :text => "failure" + render :json => {:text => "failure"} end elsif pq.question_type == 2 pv = PollVote.find_by_poll_answer_id_and_user_id(params[:poll_answer_id],User.current.id) @@ -197,38 +199,64 @@ class PollController < ApplicationController pv.poll_question_id = params[:poll_question_id] pv.poll_answer_id = params[:poll_answer_id] if pv.save - render :text => "true" + @percent = get_percent(@poll,User.current) + render :json => {:text => "true",:percent => format("%.2f" ,@percent)} else - render :text => "failure" + render :json => {:text => "failure"} end else if pv.delete - render :text => "false" + @percent = get_percent(@poll,User.current) + render :json => {:text => "false" ,:percent => format("%.2f" ,@percent)} else - render :text => "failure" + render :json => {:text => "failure"} end end elsif pq.question_type == 3 || pq.question_type == 4 pv = PollVote.find_by_poll_question_id_and_user_id(params[:poll_question_id],User.current.id) if pv.nil? - pv = PollVote.new - pv.user_id = User.current.id - pv.poll_question_id = params[:poll_question_id] - end - pv.vote_text = params[:vote_text] - if pv.save - render :text => pv.vote_text + if params[:vote_text].nil? || params[:vote_text].blank? + @percent = get_percent(@poll,User.current) + render :json => {:text => pv.vote_text,:percent => format("%.2f" ,@percent)} + else + pv = PollVote.new + pv.user_id = User.current.id + pv.poll_question_id = params[:poll_question_id] + pv.vote_text = params[:vote_text] + if pv.save + @percent = get_percent(@poll,User.current) + render :json => {:text => pv.vote_text,:percent => format("%.2f" ,@percent)} + else + render :json => {:text => "failure"} + end + end else - render :text => "failure" + if params[:vote_text].nil? || params[:vote_text].blank? + if pv.delete + @percent = get_percent(@poll,User.current) + render :json => {:text => pv.vote_text,:percent => format("%.2f" ,@percent)} + else + render :json => {:text => "failure"} + end + else + pv.vote_text = params[:vote_text] + if pv.save + @percent = get_percent(@poll,User.current) + render :json => {:text => pv.vote_text,:percent => format("%.2f" ,@percent)} + else + render :json => {:text => "failure"} + end + end end + else - render :text => "failure" + render :json => {:text => "failure"} end end #提交问卷 def commit_poll - @uncomplete_question = get_uncomplete_question(@poll) + @uncomplete_question = get_uncomplete_question(@poll,User.current) if @uncomplete_question.count < 1 pu = get_poll_user(@poll.id,User.current.id) pu.user_id = User.current.id @@ -277,17 +305,41 @@ class PollController < ApplicationController end #获取未完成的题目 - def get_uncomplete_question poll + def get_uncomplete_question poll,user necessary_questions = poll.poll_questions.where("#{PollQuestion.table_name}.is_necessary = 1") uncomplete_question = [] necessary_questions.each do |question| - if question.poll_votes.nil? || question.poll_votes.count < 1 + answers = get_user_answer(question,user) + if answers.nil? || answers.count < 1 uncomplete_question << question end end uncomplete_question end + #获取用户对某个问题的答案 + def get_user_answer(question,user) + user_answer = question.poll_votes.where("#{PollVote.table_name}.user_id = #{user.id}") + user_answer + end + + def get_complete_question(poll,user) + questions = poll.poll_questions + complete_question = [] + questions.each do |question| + answers = get_user_answer(question,user) + if !(answers.nil? || answers.count < 1) + complete_question << question + end + end + complete_question + end + + def get_percent poll,user + complete_count = get_complete_question(poll,user).count + (complete_count.to_f / poll.poll_questions.count.to_f)*100 + end + #PollUser记录用户是否已提交问卷有对应的记录则已提交,没有则新建一个 def get_poll_user poll_id,user_id pu = PollUser.find_by_poll_id_and_user_id(poll_id,user_id) diff --git a/app/views/poll/_commit_alert.html.erb b/app/views/poll/_commit_alert.html.erb index 76bbda416..3910bc8b5 100644 --- a/app/views/poll/_commit_alert.html.erb +++ b/app/views/poll/_commit_alert.html.erb @@ -3,7 +3,7 @@

提交成功!

<%= link_to "确定", poll_index_path(:polls_group_id => @course.id,:polls_type => 'Course'),:class => 'commit'%> <% elsif status == 1 %> -

您还有尚未作答的题目请完成后在提交!

+

您还有尚未作答的必答题目请完成后再提交!

<%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%> <% else %>

发生未知错误,请检查您的网络。

diff --git a/app/views/poll/show.html.erb b/app/views/poll/show.html.erb index 2db0045f6..42818dd34 100644 --- a/app/views/poll/show.html.erb +++ b/app/views/poll/show.html.erb @@ -72,7 +72,10 @@ poll_question_id: <%= pq.id %> }, success: function (data) { - obj.checked = true; + var dataObj = eval(data); + obj.checked = true; + var span = $('#percent'); + span.html(dataObj.percent); } }); } @@ -118,7 +121,8 @@ poll_question_id: <%= pq.id %> }, success: function (data) { - if(data == "true") + var dataObj = eval(data); + if(dataObj.text == "true") { obj.checked = true; } @@ -126,6 +130,8 @@ { obj.checked = false; } + var span = $('#percent'); + span.html(dataObj.percent); } }); } @@ -165,6 +171,9 @@ vote_text: obj.value }, success: function (data) { + var dataObj = eval(data); + var span = $('#percent'); + span.html(dataObj.percent); // obj.value = data; } }); @@ -198,7 +207,17 @@ vote_text: obj.innerHTML }, success: function (data) { -// obj.value = data; + var dataObj = eval(data); + if(dataObj.text != 'failure') + { + var span = $('#percent'); + span.html(dataObj.percent); + } + else + { + alert("error"); + } + } }); } @@ -222,7 +241,7 @@ <% end %>
-
答题已完成 0%
+
答题已完成 <%= format "%.2f" ,@percent %>%
From fe3a84c8db35c648478d900bd2c1faa9433f5af9 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 16 Jan 2015 15:34:25 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=A4=9A=E8=A1=8C=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_edit_mulit.html.erb | 19 +++++++++++-------- app/views/poll/_new_mulit.html.erb | 21 ++++++++++++--------- app/views/poll/_show_mulit.html.erb | 14 +++++++++++--- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/app/views/poll/_edit_mulit.html.erb b/app/views/poll/_edit_mulit.html.erb index c4a9e0e0f..684a285e3 100644 --- a/app/views/poll/_edit_mulit.html.erb +++ b/app/views/poll/_edit_mulit.html.erb @@ -1,18 +1,21 @@ +<%= form_for("",:url => update_poll_question_poll_index_path(:poll_question => poll_question.id),:remote => true) do |f|%>
- - + + + />
- - , - + + +
-
\ No newline at end of file + +<% end%> \ No newline at end of file diff --git a/app/views/poll/_new_mulit.html.erb b/app/views/poll/_new_mulit.html.erb index 6c3528473..e034e54af 100644 --- a/app/views/poll/_new_mulit.html.erb +++ b/app/views/poll/_new_mulit.html.erb @@ -1,18 +1,21 @@ +<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
- - - + + + +
- - , - + + +
-
\ No newline at end of file + +<% end%> \ No newline at end of file diff --git a/app/views/poll/_show_mulit.html.erb b/app/views/poll/_show_mulit.html.erb index 35e37ef06..23bdbe6eb 100644 --- a/app/views/poll/_show_mulit.html.erb +++ b/app/views/poll/_show_mulit.html.erb @@ -1,10 +1,18 @@
- 第4题: 多行主观 + + 第<%= poll_question.question_number%>题: + + <%= poll_question.question_title %> + <%if poll_question.is_necessary == 1%> + * + <%end%> + (多行主观)
- - + <%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id), + method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %> +