From e6b82e5463925829259715984713eeed3b36a06a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 15 Jun 2015 15:06:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=AF=8F=E4=B8=AA=E5=AD=A6=E7=94=9F=E7=9A=84=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index a222314ab..d8a9d88c3 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -483,6 +483,24 @@ class PollController < ApplicationController count_row += 1 end end + + sheet1.row(count_row).default_format = blue + sheet1[count_row ,0] = l(:label_bidding_user_studentname) + poll_questions.each_with_index do |poll_question, i| + sheet1[count_row ,i + 1] = poll_question.question_title + end + count_row += 1 + @poll.users.each do |user| + sheet1[count_row ,0] = user.show_name + poll_questions.each_with_index do |poll_question, i| + if poll_question.question_type == 1 || poll_question.question_type == 2 + sheet1[count_row ,i + 1] = user.poll_votes.where(:poll_question_id => poll_question.id).map{|poll_vote| poll_vote.poll_answer.answer_text.gsub(/<\/?.*?>/,"").gsub(/ /," ") if poll_vote.poll_answer}.join(";") + else + sheet1[count_row ,i + 1] = user.poll_votes.where(:poll_question_id => poll_question.id).map{|poll_vote| poll_vote.vote_text.gsub(/<\/?.*?>/,"").gsub(/ /," ")}.join(";") + end + end + count_row += 1 + end book.write xls_report xls_report.string end From d3837ba03cf7d86a271c2f716c90a1cfb9890fbf Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 16 Jun 2015 09:34:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?attachment=5Fcontrol=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E5=88=A4=E6=96=AD=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 2a772a949..4ecff7a40 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -23,6 +23,7 @@ class AttachmentsController < ApplicationController before_filter :delete_authorize, :only => [:destroy] before_filter :authorize_global, :only => [:upload] before_filter :authorize_attachment_download1, :only => [:download] + before_filter :has_login #before_filter :login_without_softapplication, only: [:download] accept_api_auth :show, :download, :upload require 'iconv' @@ -511,4 +512,8 @@ private format.js end end + + def has_login + render_403 unless User.current.logged? + end end From 3b3b8661c88689ed7ceb5678fe7dee9fdc64b158 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Wed, 17 Jun 2015 15:42:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?bug#2827:IE=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=EF=BC=9A=E8=AE=A8=E8=AE=BA=E5=8C=BA=EF=BC=9A=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=97=B6=EF=BC=8C=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E4=B8=8B=E9=9D=A2=E4=BC=9A=E5=87=BA=E7=8E=B0=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/show.html.erb | 1 + app/views/courses/_courses_jours.html.erb | 1 + app/views/projects/_project_jours.html.erb | 1 + app/views/users/_user_jours.html.erb | 1 + 4 files changed, 4 insertions(+) diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index 10383ff00..452ad81e3 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -123,6 +123,7 @@ function nh_check_field(params){ function nh_init_board(params){ //发帖/编辑/回复按钮的click params.showbtn.click(function(){ + params.textarea.removeAttr('placeholder'); if(params.textarea.data('init') == undefined){ //初始化编辑器 var editor = params.kindutil.create(params.textarea, { diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index 2cb22ce89..5813fc807 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -56,6 +56,7 @@ $(function(){ function init_editor(params){ + params.textarea.removeAttr('placeholder'); var editor = params.kindutil.create(params.textarea, { resizeType : 1,minWidth:"1px",width:"100%",height:"150px", items:['emoticons'], diff --git a/app/views/projects/_project_jours.html.erb b/app/views/projects/_project_jours.html.erb index 353223acd..1a7d3c5d5 100644 --- a/app/views/projects/_project_jours.html.erb +++ b/app/views/projects/_project_jours.html.erb @@ -45,6 +45,7 @@ $(function(){ function init_editor(params){ + params.textarea.removeAttr('placeholder'); var editor = params.kindutil.create(params.textarea, { resizeType : 1,minWidth:"1px",width:"100%",height:"150px", items:['emoticons'], diff --git a/app/views/users/_user_jours.html.erb b/app/views/users/_user_jours.html.erb index ee8d14841..c74f68a24 100644 --- a/app/views/users/_user_jours.html.erb +++ b/app/views/users/_user_jours.html.erb @@ -69,6 +69,7 @@ $(function(){ function init_editor(params){ + params.textarea.removeAttr('placeholder'); var editor = params.kindutil.create(params.textarea, { resizeType : 1,minWidth:"1px",width:"100%",height:"150px", items:['emoticons'],