From 6e698d45bb853a4c0a92f588ba61f4f1a2f7a139 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 17 Jan 2015 12:34:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86html=E8=BE=B9?= =?UTF-8?q?=E7=95=8C=E8=B6=85=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/poll_helper.rb | 4 ++-- app/views/poll/_quiz_answers.html.erb | 2 +- public/stylesheets/polls.css | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/helpers/poll_helper.rb b/app/helpers/poll_helper.rb index 47612f825..7497e4d79 100644 --- a/app/helpers/poll_helper.rb +++ b/app/helpers/poll_helper.rb @@ -63,9 +63,9 @@ module PollHelper when 2 "多选题" when 3 - "单行主观" + "单行主观题" else - "多行主观" + "多行主观题" end end diff --git a/app/views/poll/_quiz_answers.html.erb b/app/views/poll/_quiz_answers.html.erb index f2cfff5cc..34086d25e 100644 --- a/app/views/poll/_quiz_answers.html.erb +++ b/app/views/poll/_quiz_answers.html.erb @@ -6,7 +6,7 @@ <% poll_question.poll_votes.each do |poll_vote| %> - <%= poll_vote.vote_text %>dddd + <%= poll_vote.vote_text.html_safe %> <% end %> diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index b81308c70..728126267 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -65,10 +65,10 @@ a:hover.ur_button{ background:#0fa9bb; text-decoration:none;} .ur_table_result{ color:#5d5d5d;border-right:1px solid #cbcbcb;border-bottom:1px solid #cbcbcb;} .ur_table_result tr td{ border-left:1px solid #cbcbcb;border-top:1px solid #cbcbcb; height:20px;} .table_bluebg{ background:#d7e5ee; color:#2f3a40; height:24px;} -.td327{ width:300px; padding-left:5px;} +.td327{ width:601px; padding-left:5px;} .td42{ width:42px; text-align:center;} .td287{ width:259px;padding-left:5px; } -.td111{ width:601px;padding-left:5px; } +.td111{ width:601px;padding-left:5px; word-break:break-all; word-wrap:break-word } .Bar{ position: relative; width: 120px; border: 1px solid #cbcbcb; float:left; height:10px; margin-top:5px; margin-right:3px; } .Bar span{ display: block; position: relative;background:#64badb;/* 进度条背景颜色 */ color: #333333;height: 10px; /* 高度 */ line-height: 20px; } .ur_progress_text{ color:#3a3a3a;} From 05b1b9741b11c4abfaf5294276c9b2931549f908 Mon Sep 17 00:00:00 2001 From: z9hang Date: Sat, 17 Jan 2015 13:35:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=AF=8F=E9=A1=B5?= =?UTF-8?q?=E6=98=BE=E7=A4=BA5=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 6a4ba0cc5..dd0b498a7 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -26,7 +26,7 @@ class PollController < ApplicationController @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 #分页 + @poll_questions = paginateHelper poll_questions,5 #分页 respond_to do |format| format.html {render :layout => 'base_courses'} end