diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 353108dc7..2a772a949 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -79,9 +79,7 @@ class AttachmentsController < ApplicationController if candown || User.current.admin? || User.current.id == @attachment.author_id @attachment.increment_download if stale?(:etag => @attachment.digest) - if params[:force] == 'true' - direct_download - else + if params[:preview] == 'true' convered_file = @attachment.diskfile #如果本身不是pdf文件,则先寻找是不是已转换化,如果没有则转化 unless pdf?(convered_file) @@ -96,6 +94,8 @@ class AttachmentsController < ApplicationController else direct_download end + else + direct_download end end else diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index e89f621c8..f58d6ea24 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -94,6 +94,9 @@ class CoursesController < ApplicationController def new_join @course = Course.find(params[:object_id]) + respond_to do |format| + format.js + end end # 课程搜索 @@ -836,7 +839,7 @@ class CoursesController < ApplicationController sql_select = "" if groupid == 0 sql_select = "SELECT members.*,( - SELECT SUM(student_works.final_score) + SELECT AVG(student_works.final_score) FROM student_works,homework_commons WHERE student_works.homework_common_id = homework_commons.id AND homework_commons.course_id = #{@course.id} @@ -848,7 +851,7 @@ class CoursesController < ApplicationController WHERE members.course_id = #{@course.id} ORDER BY score #{score_sort_by}" else sql_select = "SELECT members.*,( - SELECT SUM(student_works.final_score) + SELECT AVG(student_works.final_score) FROM student_works,homework_commons WHERE student_works.homework_common_id = homework_commons.id AND homework_commons.course_id = #{@course.id} diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 32ec3dad2..a222314ab 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -1,8 +1,8 @@ class PollController < ApplicationController - before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result,:close_poll] + before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result,:close_poll,:export_poll] before_filter :find_container, :only => [:new,:create, :index] before_filter :is_member_of_course, :only => [:index,:show,:poll_result] - before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll,:close_poll] + before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll,:close_poll,:export_poll] include PollHelper def index if @course @@ -360,6 +360,17 @@ class PollController < ApplicationController end end + #导出问卷 + def export_poll + poll_questions = @poll.poll_questions + respond_to do |format| + format.xls { + send_data(poll_to_xls(poll_questions), :type => "text/excel;charset=utf-8; header=present", + :filename => "#{@poll.polls_name}.xls") + } + end + end + private def find_poll_and_course @poll = Poll.find params[:id] @@ -438,4 +449,41 @@ class PollController < ApplicationController end pu end + + #将poll中题目转换为Excel + def poll_to_xls poll_questions + xls_report = StringIO.new + book = Spreadsheet::Workbook.new + sheet1 = book.create_worksheet :name => "poll" + blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 + count_row = 0 + poll_questions.each do |poll_question| + if poll_question.question_type == 1 || poll_question.question_type == 2 + sheet1.row(count_row).default_format = blue + sheet1[count_row,0]= l(:label_poll_question_num,:num => poll_question.question_number) + sheet1[count_row + 1,0] = l(:label_poll_subtotal) + sheet1[count_row + 2,0] = l(:label_poll_proportion) + poll_question.poll_answers.each_with_index do |poll_answer,i| + sheet1[count_row, i + 1] = poll_answer.answer_text.gsub(/<\/?.*?>/,"").gsub(/ /," ") + sheet1[count_row + 1, i + 1] = poll_answer.poll_votes.count + sheet1[count_row + 2, i + 1] = statistics_result_percentage(poll_answer.poll_votes.count, total_answer(poll_question.id)).to_s + "%" + end + sheet1[count_row + 3,0] = l(:label_poll_valid_commit) + sheet1[count_row + 3,1] = total_answer(poll_question.id) + count_row += 5 + else + sheet1.row(count_row).default_format = blue + sheet1[count_row,0] = l(:label_poll_question_num,:num => poll_question.question_number) + sheet1[count_row,1] = poll_question.question_title + count_row += 1 + poll_question.poll_votes.each do |poll_vote| + sheet1[count_row,0] = poll_vote.vote_text.gsub(/<\/?.*?>/,"").gsub(/ /," ") + count_row += 1 + end + count_row += 1 + end + end + book.write xls_report + xls_report.string + end end \ No newline at end of file diff --git a/app/controllers/test_controller.rb b/app/controllers/test_controller.rb index 12fead4f2..71c445dc4 100644 --- a/app/controllers/test_controller.rb +++ b/app/controllers/test_controller.rb @@ -24,7 +24,7 @@ class TestController < ApplicationController end @paths = homeworks_attach_path zipfile = ziping homeworks_attach_path - send_file zipfile, :filename => bid.name, + send_file zipfile, :filename => filename_for_content_disposition(bid.name), :type => detect_content_type(zipfile) rescue Errno::ENOENT => e logger.error "[Errno::ENOENT] ===> #{e}" diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index 7eb06d270..53b40942a 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -11,7 +11,7 @@ class ZipdownController < ApplicationController def download if User.current.logged? begin - send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => params[:filename], :type => detect_content_type(params[:file]) + send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => filename_for_content_disposition(params[:filename]), :type => detect_content_type(params[:file]) rescue => e render file: 'public/no_file_found.html' end @@ -59,9 +59,10 @@ class ZipdownController < ApplicationController if homework != nil unless homework.attachments.empty? zipfile = zip_homework_by_user homework - send_file zipfile.file_path, :filename => ((homework.user.user_extensions.nil? || homework.user.user_extensions.student_id.nil?) ? "" : homework.user.user_extensions.student_id) + - "_" + homework.user.show_name + - "_" + homework.name + ".zip", :type => detect_content_type(zipfile.file_path) if(zipfile) + filename = ((homework.user.user_extensions.nil? || homework.user.user_extensions.student_id.nil?) ? "" : homework.user.user_extensions.student_id) + + "_" + homework.user.show_name + + "_" + homework.name + ".zip" + send_file zipfile.file_path, :filename => filename_for_content_disposition(filename), :type => detect_content_type(zipfile.file_path) if(zipfile) else render file: 'public/no_file_found.html' end diff --git a/app/helpers/activity_notifys_helper.rb b/app/helpers/activity_notifys_helper.rb index 15fc43b54..f2069a2d3 100644 --- a/app/helpers/activity_notifys_helper.rb +++ b/app/helpers/activity_notifys_helper.rb @@ -1,7 +1,6 @@ module ActivityNotifysHelper def get_new_notify_count(container,type) - logger.info('xxoo') - query = ActivityNotify.where('activity_container_id=? and activity_container_type=? and notify_to=?',container.id,type,User.current.id); + query = ActivityNotify.where('activity_container_id=? and activity_container_type=? and notify_to=? and is_read=0',container.id,type,User.current.id); return query.count() end end \ No newline at end of file diff --git a/app/models/bid.rb b/app/models/bid.rb index ccd6198bb..f5cb5a3b7 100644 --- a/app/models/bid.rb +++ b/app/models/bid.rb @@ -10,158 +10,158 @@ homework_type == 1 文件提交 homework_type == 2 Project提交 =end class Bid < ActiveRecord::Base - Enterprise = 1 - Contest = 2 - Homework = 3 - HomeworkFile = 1 - HomeworkProject = 2 - attr_accessible :author_id, :budget, :deadline, :name, :description, :homework_type, :password - include Redmine::SafeAttributes - include ApplicationHelper - has_many_kindeditor_assets :assets, :dependent => :destroy - belongs_to :author, :class_name => 'User', :foreign_key => :author_id - belongs_to :course - has_many :biding_projects, :dependent => :destroy - has_many :projects, :through => :biding_projects - has_many :courses_member, :class_name => 'User', :through => :courses - has_many :journals_for_messages, :as => :jour, :dependent => :destroy - has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy - has_many :homework_for_courses, :dependent => :destroy - has_many :courses, :through => :homework_for_courses, :source => :course - has_many :homeworks, :class_name => 'HomeworkAttach', :dependent => :destroy - has_many :homework_evaluations, :through => :homeworks - has_many :join_in_contests, :dependent => :destroy - has_many :praise_tread, as: :praise_tread_object, dependent: :destroy - # has_many :fork_homework, :class_name => 'Bid', :conditions => "#{Bid.table_name}.parent_id = #{id}" - acts_as_attachable - - NAME_LENGTH_LIMIT = 60 - DESCRIPTION_LENGTH_LIMIT = 3000 - validates :name, length: {maximum: NAME_LENGTH_LIMIT}, presence: true - validates :description, length: {maximum: DESCRIPTION_LENGTH_LIMIT} - validates :author_id, presence: true - validates :deadline, presence: true, format: {:with => /^[\d]{4}[-][\d]{1,2}[-][\d]{1,2}$/} - validates :name, length: {maximum: NAME_LENGTH_LIMIT} - validates :budget, format: { with: ->(p) { if p.reward_type == 1 then /^(\d+)$|^(\d+).([0-9]{2})|^(\d+).([0-9]{1})$/ - elsif p.reward_type == 3 then /^(\d+)$|^(\d+).([0-9]{1})$/ end } } - - validate :validate_user - validate :validate_reward_type - after_create :act_as_activity - after_destroy :delete_kindeditor_assets - scope :visible, lambda {|*args| - nil - } - - scope :like, lambda {|arg| - if arg.blank? - where(nil) - else - pattern = "%#{arg.to_s.strip.downcase}%" - where("LOWER(id) LIKE :p OR LOWER(name) LIKE :p OR LOWER(description) LIKE :p", :p => pattern) - end - } - - scope :course_visible, lambda {|*args| - includes(:courses).where(Course.allowed_to_condition(args.shift || User.current, :view_homeworks, *args)) - } - - acts_as_watchable - acts_as_taggable - - acts_as_event :title => Proc.new {|o| "#{l(:label_course_homework)} ##{o.id}: #{o.name}" }, - :description => :description, - :author => :author, - :url => Proc.new {|o| {:controller => 'bids', :action => 'show', :id => o.id}} - - acts_as_activity_provider :type => 'homeworks', - :author_key => :author_id - - acts_as_activity_provider :find_options => {:include => [:projects, :author]}, - :author_key => :author_id - - safe_attributes 'name', - 'description', - 'budget', - 'deadline', - 'homework_type', - 'reward_type', - 'password' - - + # Enterprise = 1 + # Contest = 2 + # Homework = 3 + # HomeworkFile = 1 + # HomeworkProject = 2 + # attr_accessible :author_id, :budget, :deadline, :name, :description, :homework_type, :password + # include Redmine::SafeAttributes + # include ApplicationHelper + # has_many_kindeditor_assets :assets, :dependent => :destroy + # belongs_to :author, :class_name => 'User', :foreign_key => :author_id + # belongs_to :course + # has_many :biding_projects, :dependent => :destroy + # has_many :projects, :through => :biding_projects + # has_many :courses_member, :class_name => 'User', :through => :courses + # has_many :journals_for_messages, :as => :jour, :dependent => :destroy + # has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy + # has_many :homework_for_courses, :dependent => :destroy + # has_many :courses, :through => :homework_for_courses, :source => :course + # has_many :homeworks, :class_name => 'HomeworkAttach', :dependent => :destroy + # has_many :homework_evaluations, :through => :homeworks + # has_many :join_in_contests, :dependent => :destroy + # has_many :praise_tread, as: :praise_tread_object, dependent: :destroy + # # has_many :fork_homework, :class_name => 'Bid', :conditions => "#{Bid.table_name}.parent_id = #{id}" + # acts_as_attachable + # + # NAME_LENGTH_LIMIT = 60 + # DESCRIPTION_LENGTH_LIMIT = 3000 + # validates :name, length: {maximum: NAME_LENGTH_LIMIT}, presence: true + # validates :description, length: {maximum: DESCRIPTION_LENGTH_LIMIT} + # validates :author_id, presence: true + # validates :deadline, presence: true, format: {:with => /^[\d]{4}[-][\d]{1,2}[-][\d]{1,2}$/} + # validates :name, length: {maximum: NAME_LENGTH_LIMIT} + # validates :budget, format: { with: ->(p) { if p.reward_type == 1 then /^(\d+)$|^(\d+).([0-9]{2})|^(\d+).([0-9]{1})$/ + # elsif p.reward_type == 3 then /^(\d+)$|^(\d+).([0-9]{1})$/ end } } + # + # validate :validate_user + # validate :validate_reward_type + # after_create :act_as_activity + # after_destroy :delete_kindeditor_assets + # scope :visible, lambda {|*args| + # nil + # } + # + # scope :like, lambda {|arg| + # if arg.blank? + # where(nil) + # else + # pattern = "%#{arg.to_s.strip.downcase}%" + # where("LOWER(id) LIKE :p OR LOWER(name) LIKE :p OR LOWER(description) LIKE :p", :p => pattern) + # end + # } + # + # scope :course_visible, lambda {|*args| + # includes(:courses).where(Course.allowed_to_condition(args.shift || User.current, :view_homeworks, *args)) + # } + # + # acts_as_watchable + # acts_as_taggable + # + # acts_as_event :title => Proc.new {|o| "#{l(:label_course_homework)} ##{o.id}: #{o.name}" }, + # :description => :description, + # :author => :author, + # :url => Proc.new {|o| {:controller => 'bids', :action => 'show', :id => o.id}} + # + # acts_as_activity_provider :type => 'homeworks', + # :author_key => :author_id + # + # acts_as_activity_provider :find_options => {:include => [:projects, :author]}, + # :author_key => :author_id + # # safe_attributes 'name', - # 'description', - # 'deadline' - def add_jour(user, notes, reference_user_id = 0, options = {}) - if options.count == 0 - jfm = JournalsForMessage.new(:user_id => user.id, :notes => notes, :reply_id => reference_user_id) - self.journals_for_messages << jfm - jfm - else - jfm = self.journals_for_messages.build(options) - jfm.save - jfm - end - end - - def self.creat_bids(budget, deadline, name, description=nil, reward_type) - self.create(:author_id => User.current.id, :budget => budget, - :deadline => deadline, :name => name, :description => description, :commit => 0, :reward_type => reward_type) - # self.acts << Activity.new(:user_id => self.author_id) - end - - def update_bids(budget, deadline, name, description=nil) - if(User.current.id == self.author_id) - self.name = name - self.budget = budget - self.deadline = deadline - self.description = description - self.save - end - end - - def delete_bids - unless self.nil? - if User.current.id == self.author_id - self.destroy - end - end - end - - def set_commit(commit) - self.update_attribute(:commit, commit) - end - - private - - def validate_user - errors.add :author_id, :invalid if author.nil? || !author.active? - end - - def validate_reward_type - errors.add :reward_type, :invalid if self.reward_type == 0 - end - - def act_as_activity - self.acts << Activity.new(:user_id => self.author_id) - end - - # used to validate weather the user is the creater of the bid - # added by william - def validate_bid_manager(user_id) - unless user_id.nil? - if self.author_id == user_id - return true - else - return false - end - end - end - - # Time 2015-04-01 14:19:06 - # Author lizanle - # Description 删除对应课程通知的图片资源 - def delete_kindeditor_assets - delete_kindeditor_assets_from_disk self.id,OwnerTypeHelper::BID - end + # 'description', + # 'budget', + # 'deadline', + # 'homework_type', + # 'reward_type', + # 'password' + # + # + # # safe_attributes 'name', + # # 'description', + # # 'deadline' + # def add_jour(user, notes, reference_user_id = 0, options = {}) + # if options.count == 0 + # jfm = JournalsForMessage.new(:user_id => user.id, :notes => notes, :reply_id => reference_user_id) + # self.journals_for_messages << jfm + # jfm + # else + # jfm = self.journals_for_messages.build(options) + # jfm.save + # jfm + # end + # end + # + # def self.creat_bids(budget, deadline, name, description=nil, reward_type) + # self.create(:author_id => User.current.id, :budget => budget, + # :deadline => deadline, :name => name, :description => description, :commit => 0, :reward_type => reward_type) + # # self.acts << Activity.new(:user_id => self.author_id) + # end + # + # def update_bids(budget, deadline, name, description=nil) + # if(User.current.id == self.author_id) + # self.name = name + # self.budget = budget + # self.deadline = deadline + # self.description = description + # self.save + # end + # end + # + # def delete_bids + # unless self.nil? + # if User.current.id == self.author_id + # self.destroy + # end + # end + # end + # + # def set_commit(commit) + # self.update_attribute(:commit, commit) + # end + # + # private + # + # def validate_user + # errors.add :author_id, :invalid if author.nil? || !author.active? + # end + # + # def validate_reward_type + # errors.add :reward_type, :invalid if self.reward_type == 0 + # end + # + # def act_as_activity + # self.acts << Activity.new(:user_id => self.author_id) + # end + # + # # used to validate weather the user is the creater of the bid + # # added by william + # def validate_bid_manager(user_id) + # unless user_id.nil? + # if self.author_id == user_id + # return true + # else + # return false + # end + # end + # end + # + # # Time 2015-04-01 14:19:06 + # # Author lizanle + # # Description 删除对应课程通知的图片资源 + # def delete_kindeditor_assets + # delete_kindeditor_assets_from_disk self.id,OwnerTypeHelper::BID + # end end diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 204aa109a..8488fc1d0 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -103,11 +103,10 @@ class Mailer < ActionMailer::Base course_ids = courses.map {|course| course.id}.join(",") # 查询user的缺陷,项目中成员都能收到 - sql = "select * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}' + sql = "select DISTINCT * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}' and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc" @issues = Issue.find_by_sql(sql) - # @bids 查询课程作业,包括老师发布的作业,以及user提交作业 # @attachments查询课程课件更新 @attachments ||= [] @@ -126,13 +125,19 @@ class Mailer < ActionMailer::Base # user 提交的作业 # @homeworks = HomeworkAttach.where("user_id=#{user.id} and (created_at between '#{date_from}' and '#{date_to}')").order("created_at desc") + # 查询user所在项目添加wiki + @wiki_contents = WikiContent.find_by_sql("select DISTINCT wc.* from wikis w, members m, projects p, wiki_pages wp, wiki_contents wc where + m.user_id = '#{user.id}' and m.project_id = p.id and w.project_id = p.id and w.id = wp.wiki_id and wc.page_id = wp.id and w.project_id>0 + and (wc.updated_on between '#{date_from}' and '#{date_to}') order by updated_on desc") + # 查询user在课程中发布的讨论帖子 - course_mesages = Message.find_by_sql("select me.* from messages me, boards b, members m where + course_mesages = Message.find_by_sql("select DISTINCT me.* from messages me, boards b, members m where b.id = me.board_id and b.course_id = m.course_id and b.course_id is not Null and m.user_id = '#{user.id}' and (me.created_on between '#{date_from}' and '#{date_to}') order by created_on desc") + # 查询user在项目中发布的讨论帖子 - project_messages = Message.find_by_sql("select me.* from messages me, boards b, members m where + project_messages = Message.find_by_sql("select DISTINCT me.* from messages me, boards b, members m where b.id = me.board_id and b.project_id = m.project_id and b.project_id != '-1' and m.user_id = '#{user.id}' and (me.created_on between '#{date_from}' and '#{date_to}') order by created_on desc") # messages = Message.find_by_sql("select DISTINCT * from messages where author_id = #{user.id} and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") @@ -158,17 +163,24 @@ class Mailer < ActionMailer::Base and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : [] # 查询user在课程及个人中留言 - @course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where - jour_type='Course' and user_id = #{user.id} - and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") - @user_journal_messages = user.journals_for_messages.where("m_parent_id IS NULL and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC') + @course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT jfm.* from journals_for_messages jfm, members m, courses c + where m.user_id = '#{user.id}' and c.id = m.course_id and jfm.jour_id = c.id + and jfm.jour_type='Course' and (jfm.created_on between '#{date_from}' and '#{date_to}') order by created_on desc") + + @user_journal_messages = user.journals_for_messages.where("jour_type='Principal' and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC') + + # 查询user在项目中留言(用户反馈) + @project_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT jfm.* from journals_for_messages jfm, members m, projects p + where m.user_id = '#{user.id}' and p.id = m.project_id and jfm.jour_id = p.id + and jfm.jour_type='Project' and (jfm.created_on between '#{date_from}' and '#{date_to}') order by created_on desc") + # 查询user新建贴吧或发布帖子 @forums = Forum.find_by_sql("select DISTINCT * from forums where creator_id = #{user.id} and (created_at between '#{date_from}' and '#{date_to}') order by created_at desc") @memos = Memo.find_by_sql("select DISTINCT m.* from memos m, forums f where (m.author_id = #{user.id} or (m.forum_id = f.id and f.creator_id = #{user.id})) and (m.created_at between '#{date_from}' and '#{date_to}') order by m.created_at desc") has_content = [@issues,@course_messages,@project_messages,@course_news,@project_news, - @course_journal_messages,@user_journal_messages,@forums,@memos,@attachments,@bids].any? {|o| !o.empty?} + @course_journal_messages,@user_journal_messages,@project_journal_messages,@forums,@memos,@attachments,@bids,@wiki_contents].any? {|o| !o.empty?} mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}" #有内容才发,没有不发 mail :to => user.mail,:subject => subject if has_content diff --git a/app/models/member.rb b/app/models/member.rb index 2936392ab..5b1e277d7 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -116,21 +116,23 @@ class Member < ActiveRecord::Base # 查找每个学生每个作业的评分 def student_homework_score - score_count = 0 homework_score = StudentWork.find_by_sql("SELECT homework_commons.name,student_works.final_score as score FROM student_works,homework_commons WHERE student_works.homework_common_id = homework_commons.id AND homework_commons.course_id = #{self.course_id} AND student_works.user_id = #{self.user_id}") - homework_score.each do |homework| - mem_score = 0 - if homework[:score] - mem_score = homework[:score] - end - score_count = score_count + mem_score - end + score_count = StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f [homework_score, format("%0.2f", score_count)] end + + def student_work_score + StudentWork.select("homework_commons.name, student_works.final_score").joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}") + end + + def student_work_score_avg + StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f + end + protected def validate_role diff --git a/app/views/applied_project/applied_join_project.js.erb b/app/views/applied_project/applied_join_project.js.erb index ab5cdd484..846d2a61d 100644 --- a/app/views/applied_project/applied_join_project.js.erb +++ b/app/views/applied_project/applied_join_project.js.erb @@ -1,9 +1,11 @@ +// @status: 0 该项目不存在;1 不重复加入;2 成功加入; 3 已是项目成员;其它 加入失败 <% if @status == 0%> alert("<%= l('project.join.tips.notexist') %>"); <% elsif @status == 1%> alert("<%= l('project.join.tips.repeat') %>"); <% elsif @status == 2%> alert("<%= l('project.join.tips.success') %>"); + hideModal($("#popbox")); <% elsif @status == 3%> alert("<%= l('project.join.tips.has') %>"); <%else%> diff --git a/app/views/attachments/_course_file_links.html.erb b/app/views/attachments/_course_file_links.html.erb index d32025787..e651c0a93 100644 --- a/app/views/attachments/_course_file_links.html.erb +++ b/app/views/attachments/_course_file_links.html.erb @@ -53,7 +53,7 @@ <% end %> <% if options[:author] %> - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>, + <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "author_name" %>, <%= format_time(attachment.created_on) %> <% end %> diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index fe0e9ab97..b6d934c64 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -29,7 +29,7 @@ <% is_float ||= false %> <% for attachment in attachments %>
-

+

<%if is_float%>

<% end%> diff --git a/app/views/bids/_fork_form.html.erb b/app/views/bids/_fork_form.html.erb deleted file mode 100644 index 7a7010794..000000000 --- a/app/views/bids/_fork_form.html.erb +++ /dev/null @@ -1,25 +0,0 @@ - -<%= error_messages_for 'bid' %> - -

<%= l(:label_fork_form_new_description) %>

- - -

<%= l(:label_choose_course) %><%= select_tag 'course', course_options_for_select(@courses) %>

-

<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :value => @bid.name %>

- - -

-<%= f.text_area :description, :rows => 8, :value => @bid.description, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>

- -

<%= f.text_field :deadline, :value => nil,:required => true, :size => 60, :style => "width:150px;" , :readonly => true %><%= calendar_for('bid_deadline')%> - -

<%= f.select :is_evaluation, is_evaluation_option %> -

<%= l(:label_attachment_plural) %> -

<%= render :partial => 'attachments/form', :locals => {:container => @homework} %>

-
\ No newline at end of file diff --git a/app/views/bids/_form_contest.html.erb b/app/views/bids/_form_contest.html.erb deleted file mode 100644 index ccd16f15e..000000000 --- a/app/views/bids/_form_contest.html.erb +++ /dev/null @@ -1,36 +0,0 @@ - - -<%= error_messages_for 'bid' %> - -

<%= l(:label_bids_form_contest_new_description) %>

-

<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %>

- -

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %>

- -

<%= f.text_field :password, :size => 60, :style => "width:488px;margin-left: 10px;" %>

- -

- <%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %> - - -

- -

<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :readonly => true, :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%>

diff --git a/app/views/bids/show_bid_user.html.erb b/app/views/bids/show_bid_user.html.erb deleted file mode 100644 index f4d7b2642..000000000 --- a/app/views/bids/show_bid_user.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -
- <% for user in @bid.watcher_users %> -
  • - - - - - -
    <%= image_tag(url_to_avatar(user), :class => "avatar") %> - - - - - - - - - -
    <%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %> -

    - <% unless user.memberships.empty? %> - <%= l(:label_x_contribute_to, :count => user.memberships.count) %> - <% for member in user.memberships %> - <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %> - <% end %> - <% end %> -

    <%= l(:label_user_joinin) %><%= format_date(user.created_on) %> -
-<% end %> -
\ No newline at end of file diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 48e5a870d..5beee8601 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -253,7 +253,7 @@ }; params.get_ref_str_call=function(btn){ var div = btn.parent('div'); - var str = '
'+$('a',div).filter(':first').html()+' 写到:
'+$("input[nhname='nh_content_val']",div).val()+'
'; + var str = '
'+$('a',div).filter(':first').html()+' 写到:
'+$("input[nhname='nh_content_val']",div).val()+'
'; return str; } nh_init_board(params); diff --git a/app/views/boards/_form_project.html.erb b/app/views/boards/_form_project.html.erb index f6b41b53f..525869901 100644 --- a/app/views/boards/_form_project.html.erb +++ b/app/views/boards/_form_project.html.erb @@ -47,6 +47,7 @@
  • +
    <% unless replying %> <% end %> diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index aed6b80e5..d5a5a7882 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -238,7 +238,7 @@ }; params.get_ref_str_call=function(btn){ var div = btn.parent('div'); - var str = '
    '+$('a',div).filter(':first').html()+' 写到:
    '+$("input[nhname='nh_content_val']",div).val()+'
    '; + var str = '
    '+$('a',div).filter(':first').html()+' 写到:
    '+$("input[nhname='nh_content_val']",div).val()+'
    '; return str; } nh_init_board(params); diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index bf276925a..ba9583e7d 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -105,6 +105,7 @@ function nh_check_field(params){ } if(params.content.html()!=params.textarea.html() || params.issubmit==true){ params.textarea.html(params.content.html()); + params.content.sync(); //用上面那句ie11提交到服务器居然木有值 if(params.content.isEmpty()){ params.contentmsg.html('内容不能为空'); params.contentmsg.css({color:'#ff0000'}); @@ -184,9 +185,17 @@ function nh_init_board(params){ if(params.quote_input!=undefined)params.quote_input.empty(); }else{ if(params.type=='reply'){ - params.jumphref.attr('href','#'+params.form.attr('id')); - params.jumphref[0].click(); - }else params.inputsubject.focus(); + params.textarea.show(); + params.textarea.focus(); + params.textarea.hide(); + //params.jumphref.attr('href','#'+params.form.attr('id')); + //params.jumphref[0].click(); + }else{ + params.textarea.show(); + params.textarea.focus(); + params.textarea.hide(); +// params.inputsubject.focus(); + } } }); params.textarea.data('init','1');//标记为已经初始化 diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index adbbf4780..3d25be603 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -1,31 +1,210 @@ + <%= javascript_include_tag "/assets/kindeditor/kindeditor" %> -
    +
    <%# reply_allow = JournalsForMessage.create_by_user? User.current %>

    <%= l(:label_leave_message) %>

    <% if !User.current.logged?%> -
    - <%= l(:label_user_login_tips) %> - <%= link_to l(:label_user_login_new), signin_path %> -
    -
    +
    + <%= l(:label_user_login_tips) %> + <%= link_to l(:label_user_login_new), signin_path %> +
    +
    <% else %> - <%= form_for('new_form', :method => :post, - :url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%> - <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - <%= f.kindeditor 'course_message',:height => '140px;',:editor_id => 'leave_message_editor',:input_html=>{:id => "leave_meassge",:style => "resize: none;", + <%= form_for('new_form', :method => :post, + :url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%> + <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> + <%#= f.kindeditor 'course_message',:height => '140px;',:editor_id => 'leave_message_editor',:input_html=>{:id => "leave_meassge",:style => "resize: none;", :placeholder => "#{l(:label_welcome_my_respond)}",:maxlength => 250}%> - 取  消 - - <%= l(:button_leave_meassge)%> - - <% end %> + +

    + <% end %> +
    + <% end %>
    +
    +
    <%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
      <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> -
    \ No newline at end of file + +
    + + \ No newline at end of file diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index e7c5a7c5e..e5f5fc0ec 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -29,9 +29,9 @@ :class => "delete", :title => l(:button_delete)) %> <% end %> <% if reply_allow %> - <%= link_to l(:label_bid_respond_quote),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> - + <%#= link_to l(:label_bid_respond_quote),'', + {:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> + <%= link_to l(:label_bid_respond_quote),'javascript:;',{:nhname=>"reply_btn"} %> <% end %>
    diff --git a/app/views/courses/_join_private_course.html.erb b/app/views/courses/_join_private_course.html.erb index 788f47d2d..934a4eb33 100644 --- a/app/views/courses/_join_private_course.html.erb +++ b/app/views/courses/_join_private_course.html.erb @@ -32,7 +32,6 @@ <% if authorize_for('news', 'edit') %>
  • 关闭
  • <% end%> + <% if poll.polls_status == 1%> +
  • 导出
  • + <% elsif poll.polls_status == 2 || poll.polls_status == 3 %> +
  • <%= link_to "导出", export_poll_poll_path(poll.id,:format => "xls"), :class => "polls_de fr ml5"%>
  • + <% end%> + +
  • <%= format_date poll.created_at.to_date%>
  • <% else%> <% if poll.polls_status == 2%> diff --git a/app/views/poll/commit_poll.js.erb b/app/views/poll/commit_poll.js.erb index 8f68dae68..76e5e53df 100644 --- a/app/views/poll/commit_poll.js.erb +++ b/app/views/poll/commit_poll.js.erb @@ -1,6 +1,6 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'commit_alert',:locals => {:status => @status}) %>'); -showModal('ajax-modal', '250px'); -$('#ajax-modal').css('height','100px'); +showModal('ajax-modal', '270px'); +$('#ajax-modal').css('height','110px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); diff --git a/app/views/projects/_history.html.erb b/app/views/projects/_history.html.erb index 3633ed7b5..54dda7b28 100644 --- a/app/views/projects/_history.html.erb +++ b/app/views/projects/_history.html.erb @@ -9,7 +9,8 @@ <%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10', :target => "_blank" %> <%= format_time(journal.created_on) %>
    -

    <%= textilizable journal.notes%>

    + +

    <%=journal.notes.html_safe%>

    <% ids = 'project_respond_form_'+ journal.id.to_s%> @@ -20,8 +21,9 @@ :class => "delete", :title => l(:button_delete)) %> <% end %> <% if reply_allow %> - <%= link_to l(:label_bid_respond_quote),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> + <%#= link_to l(:label_bid_respond_quote),'', + {:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> + <%= link_to l(:label_bid_respond_quote),'javascript:;', {:nhname=>"reply_btn"} %> <% end %> diff --git a/app/views/projects/_join_project.html.erb b/app/views/projects/_join_project.html.erb index 1498830c5..c650035f8 100644 --- a/app/views/projects/_join_project.html.erb +++ b/app/views/projects/_join_project.html.erb @@ -21,7 +21,7 @@ .C_form{ margin:20px 0 0 60px;} .C_form ul li{ font-size:14px; color:#3f3a39; line-height:30px; padding-left: 60px;} .C_form ul li input{ margin-left:20px; border:0px; border:1px solid #e1e1e1; color:#898989; padding-left:5px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding: 0 !important; } - .C_form ul li.mB5{ color:#898989; font-size:12px; padding-left:150px;} + .C_form ul li.mB5{ color:#898989; font-size:12px; padding-left:140px;} .width190{ width:190px; height:26px; border-color:#e1e1e1;} .C_form a{ font-size:12px; color:#15bccf; float:left; display:block; height:40px; width:200px; margin-top:25px;} .C_form a:hover{ text-decoration:underline;} @@ -31,7 +31,6 @@ \ No newline at end of file diff --git a/app/views/projects/invite_members.html.erb b/app/views/projects/invite_members.html.erb index a6a13e2b7..6066404bc 100644 --- a/app/views/projects/invite_members.html.erb +++ b/app/views/projects/invite_members.html.erb @@ -19,7 +19,7 @@
    diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb index a0a960b6c..891952559 100644 --- a/app/views/repositories/_revisions.html.erb +++ b/app/views/repositories/_revisions.html.erb @@ -1,54 +1,53 @@ <% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %> <%= if show_revision_graph && revisions && revisions.any? - indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid| - url_for( - :controller => 'repositories', - :action => 'revision', - :id => project, - :repository_id => @repository.identifier_param, - :rev => scmid) - end - render :partial => 'revision_graph', - :locals => { - :commits => indexed_commits, - :space => graph_space - } -end %> + indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid| + url_for( + :controller => 'repositories', + :action => 'revision', + :id => project, + :repository_id => @repository.identifier_param, + :rev => scmid) + end + render :partial => 'revision_graph', + :locals => { + :commits => indexed_commits, + :space => graph_space + } + end %> <%= form_tag( - {:controller => 'repositories', :action => 'diff', :id => project, - :repository_id => @repository.identifier_param, :path => to_path_param(path)}, - :method => :get - ) do %> - - - - - - - - - - -<% show_diff = revisions.size > 1 %> -<% line_num = 1 %> -<% revisions.each do |changeset| %> - -<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %> -<%= content_tag(:td, :class => 'id', :style => id_style) do %> - <%= link_to_revision(changeset, @repository) %> -<% end %> - - - - - - -<% line_num += 1 %> -<% end %> - -
    #<%= l(:label_date) %><%= l(:field_author) %><%= l(:field_comments) %>
    <%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %><%= format_time(changeset.committed_on) %><%= h truncate(changeset.author.to_s, :length => 30) %><%= textilizable(truncate_at_line_break(changeset.comments)) %>
    -

    + {:controller => 'repositories', :action => 'diff', :id => project, + :repository_id => @repository.identifier_param, :path => to_path_param(path)}, + :method => :get + ) do %> + + + + + + + + + + + <% show_diff = revisions.size > 1 %> + <% line_num = 1 %> + <% revisions.each do |changeset| %> + + <% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %> + <%= content_tag(:td, :class => 'id', :style => id_style) do %> + <%= link_to_revision(changeset, @repository) %> + <% end %> + + + + + + + <% line_num += 1 %> + <% end %> + +
    #<%= l(:label_date) %><%= l(:field_author) %><%= l(:field_comments) %>
    <%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %><%= format_time(changeset.committed_on) %><%= h truncate(changeset.author.to_s, :length => 30) %><%= textilizable(truncate_at_line_break(changeset.comments)) %>
    +

    <%= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %> -

    - +

    <% end %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 1cb5942bf..474ac638f 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -5,9 +5,8 @@
    <%= render :partial => 'breadcrumbs', - :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> + :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> <%= render :partial => 'navigation' %> -
    @@ -25,18 +24,18 @@ link_to h(repo.name), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil}, - :class => 'repository' + (repo == @repository ? ' selected' : ''), - :class => "mb10 break_word c_orange" }.join(' | ').html_safe %>) + :class => 'repository' + (repo == @repository ? ' selected' : ''), + :class => "mb10 break_word c_orange" }.join(' | ').html_safe %>)

    -
    展开Git操作指南
    +
    展开Git操作指南

    项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。

    通过cmd命令提示符进入代码对应文件夹的根目录,假设当前用户的登录名为user,版本库名称为demo,需要操作的版本库分支为branch。 - 如果是首次提交代码,执行如下命令:

    + 如果是首次提交代码,执行如下命令:

    git init

    @@ -53,7 +52,7 @@

    git push -u origin branch:branch

    - +

    已经有本地库,还没有配置远程地址,打开命令行执行如下:

    @@ -68,7 +67,7 @@

    git push -u origin branch:branch

    - +

    已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:

    @@ -81,7 +80,7 @@

    git push origin branch_name

    - +

    从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:

    @@ -101,56 +100,59 @@

    李海提供

    - <% if !@entries.nil? && authorize_for('repositories', 'browse') %> - <%= render :partial => 'dir_list' %> - <% end %> - - <%= render_properties(@properties) %> - <% if authorize_for('repositories', 'revisions') %> - <% if @changesets && !@changesets.empty? %> -

    - <%= l(:label_latest_revision_plural) %> -

    - <%= render :partial => 'revisions', - :locals => {:project => @project, :path => @path, - :revisions => @changesets, :entry => nil} %> + +<% if !@entries.nil? && authorize_for('repositories', 'browse') %> + <%= render :partial => 'dir_list' %> +<% end %> +<%= render_properties(@properties) %> + + +<% if authorize_for('repositories', 'revisions') %> + <%# if @changesets && !@changesets.empty? %> +

    + <%= l(:label_latest_revision_plural) %> +

    + <%= render :partial => 'revisions', + :locals => {:project => @project, :path => @path, + :revisions => @changesets, :entry => nil} %> + <%# end %> + +

    + <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) + sep = '' %> + <% if @repository.supports_all_revisions? && @path.blank? %> + <%= link_to l(:label_view_all_revisions), {:action => 'revisions', :id => @project, + :repository_id => @repository.identifier_param}, + :class => "orange_u_btn" %> + <% sep = '|' %> <% end %> -

    - <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) - sep = '' %> - <% if @repository.supports_all_revisions? && @path.blank? %> - <%= link_to l(:label_view_all_revisions), {:action => 'revisions', :id => @project, - :repository_id => @repository.identifier_param}, - :class => "orange_u_btn" %> - <% sep = '|' %> - <% end %> - <% if @repository.supports_directory_revisions? && (has_branches || !@path.blank? || !@rev.blank?) %> - <%= sep %> - <%= link_to l(:label_view_revisions), - {:action => 'changes', - :path => to_path_param(@path), - :id => @project, - :repository_id => @repository.identifier_param, - :rev => @rev}, - :class => "orange_u_btn" %> - <% end %> -

    - <% if @repository.supports_all_revisions? %> - <% content_for :header_tags do %> - <%= auto_discovery_link_tag( - :atom, params.merge( - {:format => 'atom', :action => 'revisions', - :id => @project, :page => nil, :key => User.current.rss_key})) %> - <% end %> + <% if @repository.supports_directory_revisions? && (has_branches || !@path.blank? || !@rev.blank?) %> + <%= sep %> + <%= link_to l(:label_view_revisions), + {:action => 'changes', + :path => to_path_param(@path), + :id => @project, + :repository_id => @repository.identifier_param, + :rev => @rev}, + :class => "orange_u_btn" %> <% end %> - <% end %> +

    + <% if @repository.supports_all_revisions? %> + <% content_for :header_tags do %> + <%= auto_discovery_link_tag( + :atom, params.merge( + {:format => 'atom', :action => 'revisions', + :id => @project, :page => nil, :key => User.current.rss_key})) %> + <% end %> + <% end %> +<% end %> - -

    查看如何提交代码: - <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %> - <%= link_to('English', en_usage_path, :class => "c_blue") %> + +

    查看如何提交代码: + <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %> + <%= link_to('English', en_usage_path, :class => "c_blue") %> -

    +
    <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb index 4e9f337c0..dfe61d3db 100644 --- a/app/views/student_work/_show.html.erb +++ b/app/views/student_work/_show.html.erb @@ -61,7 +61,7 @@
    - <%@work.student_works_scores.order("created_at desc").each do |score|%> + <%@work.student_works_scores.order("updated_at desc").each do |score|%>
    <%= render :partial => 'student_work_score',:locals => {:score => score}%>
    diff --git a/app/views/student_work/_student_work_score.html.erb b/app/views/student_work/_student_work_score.html.erb index c6ff0adae..8d10853f8 100644 --- a/app/views/student_work/_student_work_score.html.erb +++ b/app/views/student_work/_student_work_score.html.erb @@ -8,7 +8,7 @@ <%= score.score%>分 回复 - <%=format_time score.created_at %> + <%=format_time score.updated_at %>

    diff --git a/app/views/student_work/_student_work_title.html.erb b/app/views/student_work/_student_work_title.html.erb index 8162ea971..6fb7e248b 100644 --- a/app/views/student_work/_student_work_title.html.erb +++ b/app/views/student_work/_student_work_title.html.erb @@ -1,5 +1,5 @@

  • - 学号 + 学号
  • 学生姓名 diff --git a/app/views/student_work/add_score.js.erb b/app/views/student_work/add_score.js.erb index 5e6c4fe6d..0ba275d5d 100644 --- a/app/views/student_work/add_score.js.erb +++ b/app/views/student_work/add_score.js.erb @@ -2,7 +2,7 @@ $("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :parti $('#score_<%= @work.id%>').peSlider({range: 'min'}); <% if @is_new%> - $("#score_list_<%= @work.id%>").prepend("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>"); + $("#score_list_<%= @work.id%>").prepend("
    <%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>
    "); <% else %> $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>"); <% end%> diff --git a/app/views/users/_history.html.erb b/app/views/users/_history.html.erb index 9b5744251..d69b6b25b 100644 --- a/app/views/users/_history.html.erb +++ b/app/views/users/_history.html.erb @@ -11,7 +11,8 @@ <%= link_to journal.user, user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%><%= format_time(journal.created_on) %>
    -

    <%= textilizable journal.notes%>

    + +

    <%=journal.notes.html_safe%>

  • <% ids = 'project_respond_form_'+ journal.id.to_s%> @@ -23,8 +24,9 @@ :class => "delete", :title => l(:button_delete)) %> <% end %> <% if reply_allow %> - <%= link_to l(:label_bid_respond_quote),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> + <%#= link_to l(:label_bid_respond_quote),'', + {:focus => 'project_respond',:nhname=>'reply_btn', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> + <%= link_to l(:label_bid_respond_quote),'javascript:;',{:nhname=>'reply_btn'} %> <% end %> diff --git a/app/views/users/_user_jours.html.erb b/app/views/users/_user_jours.html.erb index b5badf60c..ee8d14841 100644 --- a/app/views/users/_user_jours.html.erb +++ b/app/views/users/_user_jours.html.erb @@ -1,3 +1,17 @@ + +<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
    <% reply_allow = JournalsForMessage.create_by_user? User.current %> @@ -49,3 +63,169 @@ } + +
    + diff --git a/app/views/users/_user_show.html.erb b/app/views/users/_user_show.html.erb index 3bea6d420..8e3d27666 100644 --- a/app/views/users/_user_show.html.erb +++ b/app/views/users/_user_show.html.erb @@ -42,7 +42,7 @@ <%# memberships = user.memberships.all(:conditions => cond) %> <% user_courses = user_courses_list(user) %> <%= l(:label_x_course_contribute_to, :count => user_courses.count) %> - <%= ":" unless user_courses.empty? %> + <%#= ":" unless user_courses.empty? %> <% for course in user_courses %> <%# if course.name != nil %> <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.host_course} %><%= (user_courses.last == course) ? '' : ',' %> diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index d52f7cfe1..7c8dd7f64 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -22,7 +22,7 @@ <% end %>

    - <%= reply.notes %> + <%= reply.notes.html_safe %>

    <%= format_time reply.created_on %> @@ -33,8 +33,9 @@ :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %> <% end %> <% if reply_allow %> - <%= link_to l(:button_reply),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %> + <%#= link_to l(:button_reply),'', + {:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %> + <%= link_to l(:button_reply),'javascript:;',{:nhname=>"reply_btn"} %> <% end %>
    diff --git a/app/views/words/_new.html.erb b/app/views/words/_new.html.erb index 561c6a953..0c624ce3d 100644 --- a/app/views/words/_new.html.erb +++ b/app/views/words/_new.html.erb @@ -35,7 +35,7 @@ border: #d5dee9 1px solid; } -
    +
    <%= form_for('new_form', :remote => true, :method => :post, :url => {:controller => 'words', :action => 'create', @@ -51,10 +51,13 @@ <%= f.text_area 'user_message', :rows => 3, :cols => 65, :placeholder => "#{l(:label_leave_a_message)}", :style => "resize: none; width: 98%", - :class => 'noline'%> + :class => 'noline',:nhname=>'new_message_textarea'%> <%# end %> <%= f.text_field :reference_user_id, :style=>"display:none"%> - <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%> +

    +
    + <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-top: 5px;"%> + <%else %>
    <%= l(:label_user_login_tips) %> diff --git a/app/views/words/_new_respond.html.erb b/app/views/words/_new_respond.html.erb index 33c523c33..f140030a7 100644 --- a/app/views/words/_new_respond.html.erb +++ b/app/views/words/_new_respond.html.erb @@ -1,15 +1,19 @@ <%= form_tag(words_create_reply_path, :remote => true) do %> <%= text_area_tag 'user_notes', "", :class => 'noline', :style => "resize: none;", :rows => 4, - :placeholder => l(:label_feedback_respond_content), - :maxlength => 250 %> + :placeholder => l(:label_feedback_respond_content)#, + #:maxlength => 250 + %> +

    <%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %> <%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %> +
    <%= submit_tag l(:button_feedback_respond), :name => nil , :class => "enterprise", :style => "float: right; margin-top: 1px; margin-right: 4px;margin-bottom: 5px;"%> + <% end %> \ No newline at end of file diff --git a/app/views/words/_new_respond_course.html.erb b/app/views/words/_new_respond_course.html.erb index e705b7fd3..a939a55d4 100644 --- a/app/views/words/_new_respond_course.html.erb +++ b/app/views/words/_new_respond_course.html.erb @@ -1,15 +1,18 @@ <%= form_tag(words_create_reply_path, :remote => true) do %> <%= text_area_tag 'user_notes', "", :class => 'w520 h50 mb5', :style => "resize: none;overflow: hidden;",:rows => 4, - :placeholder => l(:label_feedback_respond_content), + :placeholder => l(:label_feedback_respond_content)#, - :maxlength => 250 %> + #:maxlength => 250 + %> +

    <%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %> <%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %> +
    <%= submit_tag l(:button_feedback_respond), :name => nil , :class => "reply_btn"%> - + <% end %> \ No newline at end of file diff --git a/app/views/words/_new_respond_project.html.erb b/app/views/words/_new_respond_project.html.erb index e705b7fd3..c3ff241b3 100644 --- a/app/views/words/_new_respond_project.html.erb +++ b/app/views/words/_new_respond_project.html.erb @@ -1,15 +1,18 @@ <%= form_tag(words_create_reply_path, :remote => true) do %> <%= text_area_tag 'user_notes', "", :class => 'w520 h50 mb5', :style => "resize: none;overflow: hidden;",:rows => 4, - :placeholder => l(:label_feedback_respond_content), - - :maxlength => 250 %> + :placeholder => l(:label_feedback_respond_content) + #,:maxlength => 250 + %> +

    <%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %> <%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %> +
    <%= submit_tag l(:button_feedback_respond), :name => nil , :class => "reply_btn"%> + <% end %> \ No newline at end of file diff --git a/app/views/words/create.js.erb b/app/views/words/create.js.erb index 4bf7fb244..16f26d5f7 100644 --- a/app/views/words/create.js.erb +++ b/app/views/words/create.js.erb @@ -3,4 +3,7 @@ $('#history').html('<%= escape_javascript(render(:partial => 'users/history',:lo $('#jour_count').html('<%= @obj_count%>') $('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>'); $('#new_form_user_message').val(""); +if($('#new_message_cancel_btn') != undefined && $('#new_message_cancel_btn').length!=0){ + $('#new_message_cancel_btn').click(); +} $('#new_form_reference_user_id').val(""); \ No newline at end of file diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index a023bc8cb..f83d3810c 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -219,7 +219,7 @@ zh: label_submit: 提交 button_project_tags_add: 增加 button_download: 下载 - button_more: "更多»" + button_more: "更多" button_delete: 删除 button_unfollow: 取消关注 button_follow: 关注 diff --git a/config/locales/mailers/zh.yml b/config/locales/mailers/zh.yml index 8a6aa5168..46666ee25 100644 --- a/config/locales/mailers/zh.yml +++ b/config/locales/mailers/zh.yml @@ -20,4 +20,4 @@ zh: mail_issue_sent_from: "来源:" mail_issue_from_project: "项目问题跟踪" mail_issue_attachments: "附件:" - mail_issue_reply: "我要回复" \ No newline at end of file + mail_issue_reply: "我要回复" diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index e01e2992c..42eea8dcc 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -395,7 +395,8 @@ zh: label_issue_score: issue得分 label_issue_number: issue的数量 - label_issue_journal_number: issue的留言数量 + label_issue_journal_number: issue的留言数量 + label_project_mail_feedback: 项目留言 label_news_score: 新闻得分 label_new_number: 新闻的数量 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 7653a0c4e..b327b1d5f 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -736,6 +736,7 @@ zh: label_date_to: 到 label_language_based: 根据用户的语言 + label_mail_policy: 邮件策略 label_send_test_email: 发送测试邮件 label_feeds_access_key: RSS存取键 label_missing_feeds_access_key: 缺少RSS存取键 @@ -782,6 +783,7 @@ zh: label_project_newother: "查看其他评论" label_project_newshare: "分享了" label_project_notice: "发布了通知:" + label_project_mail_notice: "发布了新闻:" label_project_issue: "发布了问题:" label_project_newadd: "添加了" label_project_unadd: "暂无项目,赶快去创建吧!" @@ -1504,6 +1506,7 @@ zh: label_news_number: 新闻的数量 label_wiki_number: wiki的数量 + label_wiki_mail_notification: 发布了wiki @@ -1936,6 +1939,7 @@ zh: label_poll_description: 问卷描述 label_poll_options: 选项 label_poll_subtotal: 小计 + label_poll_question_num: "第%{num}题" label_poll_proportion: 比例 label_poll_valid_commit: 本题有效填写人次 label_poll_result: 问卷调查_问卷统计 diff --git a/config/routes.rb b/config/routes.rb index d2c21f6ea..c92c732d2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -70,6 +70,7 @@ RedmineApp::Application.routes.draw do get 'republish_poll' get 'poll_result' get 'close_poll' + get 'export_poll' end collection do delete 'delete_poll_question' diff --git a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js index e58e4b2be..fe27e92c2 100644 --- a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js +++ b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js @@ -5054,8 +5054,7 @@ KEditor.prototype = { } }); statusbar.removeClass('statusbar').addClass('ke-statusbar') - .append('') - .append(''); + .append(''); if (self._fullscreenResizeHandler) { K(window).unbind('resize', self._fullscreenResizeHandler); self._fullscreenResizeHandler = null; diff --git a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/themes/default/default.css b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/themes/default/default.css index 428b6c8b5..0d322283a 100644 --- a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/themes/default/default.css +++ b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/themes/default/default.css @@ -421,6 +421,7 @@ overflow: hidden; margin: 0; padding: 0; + max-width: 100%; } /* toolbar */ .ke-toolbar { diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 176e00ec8..b2c13c3f7 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -1,3 +1,10 @@ +//function dump_obj(myObject) { +// var s = ""; +// for (var property in myObject) { +// s = s + "\n "+property +": " + myObject[property] ; +// } +// alert(s); +//} /******************************************************************************* * KindEditor - WYSIWYG HTML Editor for Internet * Copyright (C) 2006-2013 kindsoft.net @@ -4150,6 +4157,7 @@ function KUploadButton(options) { } _extend(KUploadButton, { init : function(options) { + //dump_obj(options); var self = this, button = K(options.button), fieldName = options.fieldName || 'file', @@ -4180,6 +4188,7 @@ _extend(KUploadButton, { button.hide(); button.before(div); self.div = div; + if(options.ops!=undefined)options.ops.up_file_div = div;//options.ops是KindEditor.create()的options参数 self.button = button; self.iframe = options.target ? K('iframe[name="' + target + '"]') : K('iframe', div); self.form = options.form ? K(options.form) : K('form', div); @@ -4981,13 +4990,13 @@ KEditor.prototype = { 'emoticons', 'source','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', '|', 'formatblock', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', - 'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link', "less", + 'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'media', "less", '/', 'undo', 'redo', '|', 'preview', 'print', 'template', 'justifyfull', 'insertunorderedlist', 'indent', 'outdent', 'subscript', - 'superscript', 'clearhtml', 'quickformat', 'selectall', 'fontname', + 'superscript', 'clearhtml', 'quickformat', /* 'selectall',*/ 'fontname', 'strikethrough', 'lineheight', 'hr', 'pagebreak', - 'anchor' , 'unlink' + 'anchor' , 'link','unlink' ] K.each(fullItems, function(i, name) { if (name == '|') { @@ -5093,8 +5102,7 @@ KEditor.prototype = { } }); statusbar.removeClass('statusbar').addClass('ke-statusbar') - .append('') - .append(''); + .append(''); if (self._fullscreenResizeHandler) { K(window).unbind('resize', self._fullscreenResizeHandler); self._fullscreenResizeHandler = null; @@ -5602,14 +5610,18 @@ _plugin('core', function(K) { inputObj.setAttribute('type', 'button'); inputObj.setAttribute('style', 'visibility:hidden'); document.body.appendChild(inputObj); - window.uploadButton = K.uploadbutton({ - button: inputObj, + + //window.uploadButton = K.uploadbutton({ + self.uploadButton = K.uploadbutton({ + ops:self, //self 是KindEditor.create()的options参数 + button: inputObj, fieldName:'imgFile', url:K.addParam('/kindeditor/upload', 'dir=image'), afterUpload : function(data) { if (data.error === 0) { var url = K.formatUrl(data.url, 'absolute'); - self.exec('insertimage', url, 'image','','','1','left'); + //self.exec('insertimage', url, 'image','','','1','left'); + self.insertHtml(''); var asset_id = data.asset_id; if ( asset_id != "" && parent.document.getElementById('asset_id') != null ) { parent.document.getElementById('asset_id').value += asset_id.toString(); @@ -5625,8 +5637,8 @@ _plugin('core', function(K) { alert('error: ' + str); } }); - uploadButton.fileBox.change(function(e) { - uploadButton.submit(); + self.uploadButton.fileBox.change(function(e) { + self.uploadButton.submit(); }); if (self.fullscreenShortcut) { @@ -5663,7 +5675,7 @@ _plugin('core', function(K) { }); }); self.clickToolbar('imagedirectupload', function() { - $('.ke-upload-file').focus().trigger('click'); + $('.ke-upload-file',this.up_file_div).trigger('click'); }); self.clickToolbar('formatblock', function() { diff --git a/public/assets/kindeditor/themes/default/default.css b/public/assets/kindeditor/themes/default/default.css index 5de213f37..c5a84c186 100644 --- a/public/assets/kindeditor/themes/default/default.css +++ b/public/assets/kindeditor/themes/default/default.css @@ -432,6 +432,7 @@ } /* container */ .ke-container { + max-width: 100%; display: block; border: 1px solid #CCCCCC; background-color: #FFF; diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 4c0cae670..8f87767ed 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -353,10 +353,26 @@ function show_more_msg() function news_show_more_des(id) { $('#news_description_' + id).toggleClass("news_description_none"); + if($("#news_description_" + id).hasClass("news_description_none")) + { + $("#news_foot_" + id).html("[收起]"); + } + else + { + $("#news_foot_" + id).html("[展开]"); + } } function bid_show_more_des(id) { $("#bid_description_" + id).toggleClass("news_description_none"); + if($("#bid_description_" + id).hasClass("news_description_none")) + { + $("#bid_show_more_des_button" + id).html("[收起]"); + } + else + { + $("#bid_show_more_des_button" + id).html("[展开]"); + } } //课程作业结束时间倒计时 diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 18f249414..98c148372 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -265,6 +265,11 @@ function submitFocus(obj) { $(obj).focus(); } +function submitComment() +{ + $("#add_comment_form").submit(); +} + //当项目描述长度小于112px时,不显示更多按钮 $(function () { // alert($("#course_description_content").height()); @@ -485,4 +490,4 @@ function judgeprojectname(){ name:{required : "请填写项目名称!",remote:'您已新建过同名项目,请修改项目名称!'} } }); -} +} diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index edb70075b..769136f2d 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -30,10 +30,6 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;} .box_h3{ color:#15bccf; text-align:center; font-size:16px;} .box_p{ color:#404040; margin-bottom:5px;} .fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;} -/*.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}*/ -/*.icon_addm:hover{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }*/ -/*.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}*/ -/*.icon_removem:hover{background:url(../images/img_floatbox.png) -22px -61px no-repeat;}*/ a.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;} a:hover.btn_free{ background:#d63502;} /*成员邀请*/ @@ -174,7 +170,7 @@ a:hover.work_edit{color: #fff; background: #64bdd9;} .wzan a{ display: block;} a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;} a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;} -.msg_box{ width:670px; height:225px; border-bottom:1px dashed #CCC; padding-top:10px;} +.msg_box{ width:670px; border-bottom:1px dashed #CCC; padding-top:10px;} .msg_box h4{ } .msg_box textarea{width:658px;height:90px;padding:5px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 0px; color:#666; font-size:12px; } diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index f1b5023bd..353ec3937 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -127,7 +127,7 @@ a:hover.btn_de{ background:#ff5d31;} a.btn_pu{ border:1px solid #3cb761; color:#3cb761; } a:hover.btn_pu{ background:#3cb761;} .pollsbtn_grey{ border:1px solid #b1b1b1; color:#b1b1b1; padding:0px 9px; height:19px; padding-top:3px; } -.polls_title_w { width:330px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} +.polls_title_w { width:300px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} .polls_title_st { max-width:530px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} .polls_de_grey{ color:#b1b1b1; margin-top:3px;} .ml5{ margin-left:5px;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 59431b3ad..0ed497127 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -439,3 +439,5 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} img{max-width: 100%;} .attachments {clear: both;} .is_public_checkbox{margin-left: 15px;margin-right: 10px;} +.author_name{color: #3ca5c6 !important;} +.ke-container-default{max-width: 100%;}