Merge remote-tracking branch 'origin/szzh' into guange_dev
This commit is contained in:
commit
71ae441bfc
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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, {
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
Loading…
Reference in New Issue