From ad7014f8b66d7e4ca2ced0ebba9d59960118cfa1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 17 Jan 2015 12:20:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?#1809=E6=96=B0=E5=BB=BA/=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=86=85=E5=AE=B9=E6=88=96=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E8=B6=B3=E5=A4=9F=E9=95=BF=E4=B8=94=E4=B8=BA?= =?UTF-8?q?=E9=9D=9E=E6=B1=89=E5=AD=97=E7=B1=BB=E5=9E=8B=EF=BC=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=B6=85=E5=87=BA=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/polls.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index 0476f4291..5864a9801 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -42,15 +42,15 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} /*问卷页面*/ .polls_box{ border:1px solid #dcdcdc; padding:15px 30px;} -.ur_page_title{ font-size:16px; text-align:center; color:#353535;} +.ur_page_title{ font-size:16px; text-align:center; color:#353535;word-break: break-all; word-wrap: break-word;} .ur_prefix_content{ color:#656565; text-indent:30px; margin-top:10px; } .ur_card{border-top:1px solid #dcdcdc;margin-top:20px; color:#3a3a3a;} -.ur_title{ padding:20px 0px ; float:left; width:604px; } +.ur_title{ padding:20px 0px ; float:left; width:604px; word-break: break-all; word-wrap: break-word;} .ur_required{ font-weight: bold; color:red;} .ur_inputs{ color:#666;} .ur_table{border-top:1px solid #dcdcdc;} .ur_inputs tr td{ height:40px;border-bottom:1px solid #dcdcdc; width:617px;} -.ur_inputs label{ padding-left:10px;} +.ur_inputs label{ padding-left:10px;word-break: break-all; word-wrap: break-word;} .ur_inputs input{ margin-right:5px;} .ur_text{ height:30px;} .ur_textbox{ border:1px solid #dcdcdc !important; color:#676765;} From 629c4aaaa1352f79b71c2963157ed3385a0bf55f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 17 Jan 2015 13:30:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?1=E3=80=81#1814=20=E6=9C=AA=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E7=9A=84=E9=97=AE=E5=8D=B7=E6=98=BE=E7=A4=BA=E5=9C=A8?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E7=9A=84=E9=97=AE=E5=8D=B7=E6=80=BB=E6=95=B0?= =?UTF-8?q?=E4=B8=AD=202=E3=80=81=E4=BF=AE=E5=A4=8D=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E8=BF=87=E9=95=BF=EF=BC=8C=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=203?= =?UTF-8?q?=E3=80=81=E5=B7=B2=E5=8F=91=E5=B8=83=E7=9A=84=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 6 ++- app/views/poll/index.html.erb | 76 +++++++++++++++--------------- public/stylesheets/polls.css | 2 +- 3 files changed, 44 insertions(+), 40 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 6a4ba0cc5..ce031f586 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -7,7 +7,11 @@ class PollController < ApplicationController def index if @course @is_teacher = User.current.allowed_to?(:as_teacher,@course) - polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id}") + if @is_teacher + polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id}") + else + polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id} and polls_status = 2") + end @polls = paginateHelper polls,10 #分页 respond_to do |format| format.html{render :layout => 'base_courses'} diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index 0e5e956ca..e57674c7a 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -11,46 +11,46 @@
<% @polls.each do |poll|%> - - <% unless !@is_teacher && poll.polls_status != 2 %> -
<% end%> diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index 5864a9801..324fb2bb9 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -26,7 +26,7 @@ div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margi a.newbtn{ float:right; display:block; width:80px; height:30px; background:#64bdd9; color:#fff; font-size:14px; margin:10px; text-align:center;} a:hover.newbtn{ background:#55a1b9; text-decoration:none;} .polls_list ul{ padding-left:10px; border-bottom:1px dashed #c9c9c9; height:32px; padding-top:8px;} -a.polls_title{ font-weight:bold; color:#3e6d8e;} +a.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 350px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} .polls_title{ font-weight:bold; color:#3e6d8e;} a.pollsbtn{ display:block; width:66px; height:22px; text-align:center; border:1px solid #64bdd9; color:#64bdd9;} a:hover.pollsbtn{ background:#64bdd9; color:#fff; text-decoration:none;} From 8e017425cfd77f344dd22d8fcc121a4bdc51627b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 17 Jan 2015 13:55:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E6=A1=86=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll_form.html.erb | 7 ++-- app/views/poll/_poll_submit.html.erb | 50 +++++++++------------------- public/stylesheets/polls.css | 14 ++++++++ 3 files changed, 33 insertions(+), 38 deletions(-) diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index de5e2e713..49e04a3ba 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -58,13 +58,14 @@ function poll_submit() { $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { poll: @poll}) %>'); - showModal('ajax-modal', '500px'); - $('#ajax-modal').css('height','180px'); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','100px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); $('#ajax-modal').parent().css("top","").css("left",""); - $('#ajax-modal').parent().addClass("anonymos"); + $('#ajax-modal').parent().addClass("popbox_polls"); } diff --git a/app/views/poll/_poll_submit.html.erb b/app/views/poll/_poll_submit.html.erb index 0f9e96b73..cdc41dd9d 100644 --- a/app/views/poll/_poll_submit.html.erb +++ b/app/views/poll/_poll_submit.html.erb @@ -1,28 +1,6 @@ - 开启匿评功能 - -