Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
055360a03c
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
|
@ -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}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<% end %>
|
||||
<% if options[:author] %>
|
||||
<span class="author" title="<%= attachment.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) %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<% is_float ||= false %>
|
||||
<% for attachment in attachments %>
|
||||
<div style="float:left;">
|
||||
<p style="height:14px;line-height:10px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%if is_float%>
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<% end%>
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
<!-- fq --> <!-- modified by bai -->
|
||||
<%= error_messages_for 'bid' %>
|
||||
<!--[form:project]-->
|
||||
<p><%= l(:label_fork_form_new_description) %></p>
|
||||
|
||||
<!-- modified by bai -->
|
||||
<p style="margin-left:-68px;padding-right: 20px;"><strong><%= l(:label_choose_course) %><span class="required"> * </span></strong><%= select_tag 'course', course_options_for_select(@courses) %></p>
|
||||
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :value => @bid.name %></p>
|
||||
<!-- end -->
|
||||
|
||||
<p style="margin-left:-10px;padding-right: 20px;">
|
||||
<%= 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 %></p>
|
||||
<!-- <p><%#= select_tag 'bid_reward_type', "<option value = '0'>#{l(:label_choose_reward)}</option><option value = '1'>#{l(:label_money)}</option><option value = '3'>#{l(:label_bids_credit)}</option><option value = '2'>#{l(:label_reward_1)}</option>".html_safe,
|
||||
:onChange => "show('bid_reward_type', 'bid_budget', '"+l(:label_bids_reward_what)+"','"+l(:label_bids_new_money)+"','"+l(:label_bids_new_credit)+"','"+l(:label_bids_new_content)+"')" %>
|
||||
<%#= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
||||
</p> -->
|
||||
<p><%= f.text_field :deadline, :value => nil,:required => true, :size => 60, :style => "width:150px;" , :readonly => true %><%= calendar_for('bid_deadline')%>
|
||||
<!--
|
||||
<p><%#= f.select :homework_type, homework_type_option %>
|
||||
</p>
|
||||
-->
|
||||
<p><%= f.select :is_evaluation, is_evaluation_option %>
|
||||
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
||||
<p><%= render :partial => 'attachments/form', :locals => {:container => @homework} %></p>
|
||||
</fieldset>
|
|
@ -1,36 +0,0 @@
|
|||
<!-- huang -->
|
||||
<script type="text/javascript" language="javascript">
|
||||
function show(id, id_t, label_reward, label_money, label_credit, label_content) {
|
||||
var text = $('#' + id);
|
||||
var text_t = $('#' + id_t);
|
||||
if (text.val() == 0) {
|
||||
text_t.attr("placeholder", label_reward);
|
||||
}
|
||||
if (text.val() == 1) {
|
||||
text_t.attr("placeholder", label_money);
|
||||
}
|
||||
if (text.val() == 3) {
|
||||
text_t.attr("placeholder", label_credit);
|
||||
}
|
||||
if (text.val() == 2) {
|
||||
text_t.attr("placeholder", label_content);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
</script>
|
||||
<%= error_messages_for 'bid' %>
|
||||
<!--[form:project]-->
|
||||
<p style="width:500px;"><%= l(:label_bids_form_contest_new_description) %></p>
|
||||
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %></p>
|
||||
|
||||
<p style="margin-left:-10px;padding-right: 20px;"><%= 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)}" %></p>
|
||||
|
||||
<p style="margin-left:-10px;"><%= f.text_field :password, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
|
||||
|
||||
<p>
|
||||
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
||||
|
||||
<!-- 设置奖项设置的打开 关闭开关-->
|
||||
</p>
|
||||
<!-- <em class="info" style="margin-left:95px;"><%= l(:text_contest_reward) %></em> -->
|
||||
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :readonly => true, :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%></p>
|
|
@ -1,30 +0,0 @@
|
|||
<div class="inf_user_image">
|
||||
<% for user in @bid.watcher_users %>
|
||||
<ul class="list_watch"><li>
|
||||
<table width="660px" border="0" align="center">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(user), :class => "avatar") %></td>
|
||||
<td><table width="580px" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580px" ><p class="font_description">
|
||||
<% 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 %>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></li></ul>
|
||||
<% end %>
|
||||
</div>
|
|
@ -253,7 +253,7 @@
|
|||
};
|
||||
params.get_ref_str_call=function(btn){
|
||||
var div = btn.parent('div');
|
||||
var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'</blockquote>';
|
||||
var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'<div class="cl"></div></blockquote>';
|
||||
return str;
|
||||
}
|
||||
nh_init_board(params);
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<div nhname="quote_show" id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<div class="cl"></div>
|
||||
<% unless replying %>
|
||||
<label class="fl ml3" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
<% end %>
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
};
|
||||
params.get_ref_str_call=function(btn){
|
||||
var div = btn.parent('div');
|
||||
var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'</blockquote>';
|
||||
var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'<div class="cl"></div></blockquote>';
|
||||
return str;
|
||||
}
|
||||
nh_init_board(params);
|
||||
|
|
|
@ -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');//标记为已经初始化
|
||||
|
|
|
@ -1,31 +1,210 @@
|
|||
<style type="text/css">
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:600px;}
|
||||
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
||||
<div class="msg_box" id='leave-message'>
|
||||
<div class="msg_box fl" id='leave-message' nhname="new_message">
|
||||
<%# reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<h4><%= l(:label_leave_message) %></h4>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% 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}%>
|
||||
<a href="javascript:void(0)" class="grey_btn fr ml10 mt10" onclick="KindEditor.instances[0].html('');">取 消</a>
|
||||
<a href="javascript:void(0)" onclick='leave_message_editor.sync();$("#leave_message_form").submit();' class="blue_btn fr mt10">
|
||||
<%= l(:button_leave_meassge)%>
|
||||
</a>
|
||||
<% end %>
|
||||
<textarea cols="40" nhname="new_message_textarea" maxlength="250" name="new_form[course_message]" placeholder="请在此留下你的意见和建议!" rows="20" style="display: none;"></textarea>
|
||||
<p nhname="contentmsg"></p>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<a href="javascript:void(0)" class="grey_btn fr ml10 mt10" nhname="cancel_btn">取 消</a>
|
||||
<a href="javascript:void(0)" onclick='$("#leave_message_form").submit();' class="blue_btn fr mt10">
|
||||
<%= l(:button_leave_meassge)%>
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
||||
<div id="history">
|
||||
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
|
||||
</div>
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</ul>
|
||||
</ul>
|
||||
<div style="display:none;"><a href="#" id="nhjump"></a></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
function init_editor(params){
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
// var flag = false;
|
||||
// if(params.form.attr('data-remote') != undefined ){
|
||||
// flag = true
|
||||
// }
|
||||
// params.form[0].onsubmit = function(){
|
||||
// if(flag){
|
||||
// $(this).removeAttr('data-remote');//不这么搞return false没用 花擦花擦
|
||||
// }
|
||||
// var is_checked = nh_check_field({
|
||||
// issubmit:true,
|
||||
// content:params.editor,
|
||||
// contentmsg:params.contentmsg,
|
||||
// textarea:params.textarea
|
||||
// });
|
||||
// if(is_checked){
|
||||
// if(flag){
|
||||
// alert('add')
|
||||
// $(this).attr('data-remote','true');
|
||||
// }
|
||||
// alert('ok')
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
// return true; //这个涛哥的firefox不能提交
|
||||
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
|
||||
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
|
||||
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
// $("#nhjump").attr('href','#'+params.div_form.attr('id'));
|
||||
// $("#nhjump")[0].click();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
|
||||
$("div[nhname='new_message']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
$("a[nhname='cancel_btn']",params.div_form).click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -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 %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<script type="text/javascript">
|
||||
function submit_form(obj)
|
||||
{
|
||||
hideModal(obj);
|
||||
$("#new-watcher-form").submit();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%
|
||||
id = "finish_course_#{course.id}"
|
||||
display = (course.teacher.id == User.current.id || User.current.admin?)
|
||||
display = (User.current.allowed_to?(:as_teacher,course) || User.current.admin?)
|
||||
%>
|
||||
|
||||
<% if display #如果课程已结束%>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<% if @state %>
|
||||
<% if @state == 0 %>
|
||||
alert("加入成功");
|
||||
hideModal("#popbox02");
|
||||
hideModal($("#popbox"));
|
||||
<% elsif @state == 1 %>
|
||||
alert("密码错误");
|
||||
<% elsif @state == 2 %>
|
||||
|
|
|
@ -17,17 +17,17 @@
|
|||
<h2><%= @member_score.user.name %> 历次作业积分</h2>
|
||||
<ul class="tscore_box">
|
||||
<li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li>
|
||||
<% @member_score.student_homework_score[0].each do |homework_score| %>
|
||||
<% @member_score.student_work_score.each do |homework_score| %>
|
||||
<li>
|
||||
<span class="c_grey02 w280">
|
||||
<%= homework_score.name %>
|
||||
</span>
|
||||
<span class="c_red w70">
|
||||
<%= format("%0.2f",homework_score[:score].nil? ? 0 : homework_score[:score]) %>
|
||||
<%= format("%0.2f",homework_score.final_score.nil? ? 0 : homework_score.final_score) %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><span class="c_blue03 w280">作业积分(总得分)</span><span class="c_red w70"><%= @member_score.student_homework_score[1] %></span></li>
|
||||
<li><span class="c_blue03 w280">作业积分(平均分)</span><span class="c_red w70"><%= @member_score.student_work_score_avg %></span></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -47,9 +47,10 @@
|
|||
<br />
|
||||
<p class="mt5 break_word"><%= e.event_description.html_safe %>
|
||||
<br />
|
||||
<div class="cl"></div>
|
||||
<%= l :label_activity_time %> : <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %>
|
||||
</p>
|
||||
<%= link_to_attachments_course(e) if e.is_a?(News) %>
|
||||
<%= link_to_attachments_course(e) if e.class.to_s == "News" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--课程动态 end-->
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<% if file.is_public? || User.current.member_of_course?(course) %>
|
||||
<div class="re_con_box" id="container_files_<%= file.id %>">
|
||||
<div class="">
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s,:class => "c_dblue f_14 f_b f_l hiddent" %>
|
||||
<%= link_to truncate(file.filename,length: 35, omission: '...'), download_named_attachment_path(file.id, file.filename, preview: true),:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
||||
<%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<% else %>
|
||||
<%= link_to("选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
|
||||
<% end %>
|
||||
<%= link_to '下载',download_named_attachment_path(file.id, file.filename, force: true),class: 'f_l re_open' %>
|
||||
<%= link_to_attachment file, text: '下载', class: 'f_l re_open' %>
|
||||
<% else %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<% project_attachments.each do |file| %>
|
||||
<div class="re_con_box">
|
||||
<div class="">
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<%= link_to truncate(file.filename,length: 35, omission: '...'), download_named_attachment_path(file.id, file.filename, preview: true),:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
<% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %>
|
||||
<%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<% else %>
|
||||
<%= link_to(l(:label_slected_to_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
<% end %>
|
||||
<%= link_to '下载',download_named_attachment_path(file.id, file.filename, force: true),class: 'f_l re_open' %>
|
||||
<%= link_to_attachment file, text: '下载', class: 'f_l re_open' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -4,19 +4,21 @@
|
|||
<span class="c_red">*</span>
|
||||
<%= l(:field_name)%>:
|
||||
</label>
|
||||
<input type="text" name="homework_common[name]" id="homework_name" class="w548 h26 fl" maxlength="<%= Bid::NAME_LENGTH_LIMIT%>" onkeyup="regex_homework_name();" value="<%= homework.name%>" >
|
||||
<input type="text" name="homework_common[name]" id="homework_name" class="w548 h26 fl" maxlength="255" onkeyup="regex_homework_name();" value="<%= homework.name%>" >
|
||||
<p id="homework_name_span" class="c_red ml110"></p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li >
|
||||
<label class="label02 "> <%= l(:field_quote)%>: </label>
|
||||
<!--<textarea name="" placeholder="请在此填入作业的要求及评分依据" class=" w548 h150 mb10 fl" ></textarea>-->
|
||||
<% if edit_mode %>
|
||||
<%= f.kindeditor :description,:width=>'83%',:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
|
||||
<% else %>
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<%= f.kindeditor :description,:width=>'83%',:editor_id => 'homework_description_editor' %>
|
||||
<% end %>
|
||||
<div style="width: 83%;float: left;">
|
||||
<% if edit_mode %>
|
||||
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
|
||||
<% else %>
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<%= f.kindeditor :description,:editor_id => 'homework_description_editor' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="mt10">
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
<%= homework.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_foot c_red" id="bid_show_more_des_button<%= homework.id%>" onclick="bid_show_more_des(<%= homework.id%>);" style="cursor:pointer;display: none;">
|
||||
<%= l(:button_more)%>...
|
||||
<span class="g-arr-down"></span>
|
||||
|
||||
<div class="news_foot currentDd" id="bid_show_more_des_button<%= homework.id%>" onclick="bid_show_more_des(<%= homework.id%>);" style="cursor:pointer;display: none;">
|
||||
[展开]
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -20,19 +20,6 @@
|
|||
<li id="current_user_li">
|
||||
<%= link_to "#{User.current.login}<span class='pic_triangle'></span>".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, target:"_blank", :class => "uses_name"%>
|
||||
<ul id="user_sub_menu" style="right: 0px;display: none;">
|
||||
<% unless User.current.projects.empty? %>
|
||||
<li id="my_projects_li">
|
||||
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
|
||||
<ul id="my_projects_ul" >
|
||||
<% User.current.projects.each do |project| %>
|
||||
<li title="<%=project.name%>">
|
||||
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if @show_course == 1 && User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) %>
|
||||
<% user_course = get_user_course User.current%>
|
||||
<% unless user_course.empty? %>
|
||||
|
@ -48,6 +35,19 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% unless User.current.projects.empty? %>
|
||||
<li id="my_projects_li">
|
||||
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
|
||||
<ul id="my_projects_ul" >
|
||||
<% User.current.projects.each do |project| %>
|
||||
<li title="<%=project.name%>">
|
||||
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.host_user}%>
|
||||
</li>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</div>
|
||||
<div class="search fl">
|
||||
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get, :class => "search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :placeholder => l(:label_course_name), :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>
|
||||
<input class="search_text fl" id="name" name="name" onkeyup="regexName('搜索条件不能为空');" placeholder="课程名称" type="text">
|
||||
<a href="javascript:void(0)" onclick="submitSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
|
|
|
@ -107,7 +107,9 @@
|
|||
<!--邀请加入-->
|
||||
<div class="subNavBox">
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<div class="subNav currentDd currentDt subNav_jiantou" id="expand_tools_expand_invit" nhtype="toggle4cookie" data-id="expand_invit" data-target="#navContent_invit"><%= l(:label_invite)%></div>
|
||||
<div class="subNav currentDd currentDt subNav_jiantou" id="expand_tools_expand_invit" nhtype="toggle4cookie" data-id="expand_invit" data-target="#navContent_invit" data-val="expand">
|
||||
<%= l(:label_invite)%>
|
||||
</div>
|
||||
<ul class="navContent " style="display:block" id="navContent_invit">
|
||||
<li><%= link_to l(:label_invite_new_user), :controller=>"projects", :action=>"invite_members_by_mail", :id => @project %></li>
|
||||
<% if User.current.allowed_to?(:manage_members, @project) %>
|
||||
|
|
|
@ -3,65 +3,64 @@
|
|||
<%= @subject %>
|
||||
</h4>
|
||||
<% if @attachments.first || @course_news.first || @bids.first ||
|
||||
@course_journal_messages.first|| @course_messages.first %>
|
||||
@course_journal_messages.first|| @course_messages.first || @attachments.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h2>
|
||||
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h3>
|
||||
<% unless @course_news.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_news) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_news.count %>)</span>
|
||||
</h4>
|
||||
</span>
|
||||
<% @course_news.each do |course_new|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice) %></span>
|
||||
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_new.created_on) %></span>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(course_new.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程通知 end-->
|
||||
<% end %>
|
||||
|
||||
<!--课程作业-->
|
||||
<% unless @bids.empty? %>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;"><%= l(:label_homework_overview) %><span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @bids.count %>)</span></h4>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;">
|
||||
<%= l(:label_homework_overview) %>
|
||||
</span>
|
||||
<% unless @bids.first.nil?%>
|
||||
<% @bids.each do |bid| %>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(bid.course.name,length: 30,omission: '...'), course_url(bid.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to bid.user, user_activities_url(bid.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_homework) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_homework) %></span>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(bid.created_at) %></span>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(bid.created_at) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -72,31 +71,30 @@
|
|||
|
||||
<!-- 课程留言 -->
|
||||
<% unless @course_journal_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:view_course_journals_for_messages) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
</span>
|
||||
|
||||
<% @course_journal_messages.each do |course_journal_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||
|
||||
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
|
||||
<%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_journal_message.created_on) %></span>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(course_journal_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
@ -105,26 +103,25 @@
|
|||
|
||||
<!-- 课程讨论区 -->
|
||||
<% unless @course_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:view_borad_course) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
</span>
|
||||
<% @course_messages.each do |course_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_messages) %></span>
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_message.created_on) %></span>
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(course_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
@ -133,30 +130,29 @@
|
|||
|
||||
<!-- 课件 -->
|
||||
<% unless @attachments.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @attachments.count %>)</span>
|
||||
</h4>
|
||||
</span>
|
||||
<% @attachments.each do |attachment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_file_upload) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_file_upload) %></span>
|
||||
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(attachment.created_on) %></span>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(attachment.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
@ -165,34 +161,30 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
<!--项目相关-->
|
||||
<% if @issues.first || @project_messages.first %>
|
||||
<% if @issues.first || @project_messages.first || @wiki_contents.first || @project_news.first || @project_journal_messages.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_project_overview_new)%></h2>
|
||||
<h3 class="wmail_h2" style="color:#15BCCF; "><%= l(:label_project_overview_new)%></h3>
|
||||
<% unless @issues.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_issue_tracking) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @issues.count %>)</span>
|
||||
</h4>
|
||||
</span>
|
||||
<% @issues.each do |issue|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_issue) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue) %></span>
|
||||
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(issue.created_on) %></span>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issue.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
@ -202,31 +194,29 @@
|
|||
|
||||
<!-- 讨论区 -->
|
||||
<% unless @project_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:project_moule_boards_show) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
</span>
|
||||
<% @project_messages.each do |project_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_messages) %></span>
|
||||
|
||||
<%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_message.created_on) %></span>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(project_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
@ -234,50 +224,109 @@
|
|||
</ul><!--项目论坛 end-->
|
||||
<% end %>
|
||||
|
||||
<!--项目wiki-->
|
||||
<% unless @wiki_contents.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_wiki) %>
|
||||
</span>
|
||||
<% @wiki_contents.each do |wikicontent|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<% unless wikicontent.page.nil? %>
|
||||
<%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to wikicontent.author, user_activities_url(wikicontent.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_wiki_mail_notification) %></span>
|
||||
<% unless wikicontent.page.nil? %>
|
||||
<%= link_to truncate(wikicontent.text.html_safe, length: 30,omission: '...'), project_wiki_url(wikicontent.page.wiki,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(wikicontent.updated_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 项目wikiend -->
|
||||
<% end %>
|
||||
|
||||
<!--项目新闻-->
|
||||
<% unless @project_news.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_project_news) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_news.count %>)</span>
|
||||
</h4>
|
||||
</span>
|
||||
<% @project_news.each do |project_new|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_mail_notice) %></span>
|
||||
|
||||
<%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_new.created_on) %></span>
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(project_new.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 项目新闻end -->
|
||||
<% end %>
|
||||
|
||||
<!--项目留言-->
|
||||
<% unless @project_journal_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_project_mail_feedback) %>
|
||||
</span>
|
||||
|
||||
<% @project_journal_messages.each do |project_journal_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to project_journal_message.user, user_activities_url(project_journal_message.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||
|
||||
<%= link_to truncate(project_journal_message.notes.html_safe,length: 30,omission: '...'), project_feedback_url(project_journal_message.project,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(project_journal_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!--项目留言 end-->
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %><!-- 项目动态end -->
|
||||
|
||||
<!-- 用户留言 -->
|
||||
<% unless @user_journal_messages.first.nil? %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h2>
|
||||
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h3>
|
||||
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_message) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @user_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
</span>
|
||||
|
||||
<% @user_journal_messages.each do |user_journal_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
|
@ -285,14 +334,14 @@
|
|||
|
||||
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_show_your_message) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_show_your_message) %></span>
|
||||
|
||||
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(user_journal_message.created_on) %></span></li>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(user_journal_message.created_on) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
@ -303,13 +352,13 @@
|
|||
<% end %>
|
||||
<% if @forums.first || @memos.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h2>
|
||||
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h3>
|
||||
<% unless @forums.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_forum) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @forums.count %>)</span>
|
||||
</h4>
|
||||
<span class="wmail_num" style="color:#666; margin-left:5px; font-weight:normal;">(<%= @forums.count %>)</span>
|
||||
</span>
|
||||
|
||||
<% @forums.each do |forum|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
|
@ -317,14 +366,14 @@
|
|||
|
||||
<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_forum_new) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_forum_new) %></span>
|
||||
|
||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(forum.created_at) %></span></li>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(forum.created_at) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
@ -332,11 +381,10 @@
|
|||
</ul><!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
<% unless @memos.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_message_forum) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @memos.count %>)</span>
|
||||
</h4>
|
||||
</span>
|
||||
|
||||
<% @memos.each do |memo|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
|
@ -344,14 +392,14 @@
|
|||
|
||||
<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %></span>
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %></span>
|
||||
|
||||
<%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id)),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(memo.created_at) %></span></li>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(memo.created_at) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
@ -361,6 +409,7 @@
|
|||
</div><!--贴吧动态 end-->
|
||||
<% end %>
|
||||
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
|
||||
<span style="color:#666;"><%= l(:label_mail_policy) %>:</span>
|
||||
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
|
||||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= l(:label_course_overview)%>
|
||||
<% unless @course_news.first.nil? %>
|
||||
<%= l(:label_course_news) %>
|
||||
(<%= @course_news.count %>)
|
||||
|
||||
|
||||
|
||||
<% @course_news.each do |course_new|%>
|
||||
|
@ -15,27 +15,27 @@
|
|||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value)%>
|
||||
]
|
||||
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value)
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_project_notice) %>
|
||||
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
%> <%= format_time(course_new.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% unless @bids.empty? %>
|
||||
<%= l(:label_homework_overview) %><%= @bids.count %>
|
||||
<%= l(:label_homework_overview) %>
|
||||
<% unless @bids.first.nil?%>
|
||||
<% @bids.each do |bid| %>
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(bid.course.name,length: 30,omission: '...'),course_url(bid.course, :token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
|
@ -44,8 +44,8 @@
|
|||
<%= l(:label_course_homework) %>
|
||||
|
||||
<%= link_to truncate(bid.name, length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(bid.created_at) %>
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
|||
|
||||
<% unless @course_journal_messages.first.nil? %>
|
||||
|
||||
<%= l(:view_course_journals_for_messages) %> (<%= @course_journal_messages.count %>)
|
||||
<%= l(:view_course_journals_for_messages) %>
|
||||
|
||||
|
||||
<% @course_journal_messages.each do |course_journal_message|%>
|
||||
|
@ -66,17 +66,17 @@
|
|||
[
|
||||
|
||||
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value)
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_send_course_journals_for_messages) %>
|
||||
|
||||
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(course_journal_message.created_on) %>
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
|||
<% unless @course_messages.first.nil? %>
|
||||
|
||||
<%= l(:view_borad_course) %>
|
||||
(<%= @course_journal_messages.count %>)
|
||||
|
||||
|
||||
|
||||
<% @course_messages.each do |course_message|%>
|
||||
|
@ -97,7 +97,7 @@
|
|||
[
|
||||
|
||||
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course, :token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
|
@ -106,8 +106,8 @@
|
|||
<%= l(:label_send_course_messages) %>
|
||||
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(course_message.created_on) %>
|
||||
|
||||
|
@ -119,14 +119,14 @@
|
|||
<% unless @attachments.first.nil? %>
|
||||
|
||||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
(<%= @attachments.count %>)
|
||||
|
||||
|
||||
|
||||
<% @attachments.each do |attachment|%>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
|
@ -135,8 +135,8 @@
|
|||
<%= l(:label_course_file_upload) %>
|
||||
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(attachment.created_on) %>
|
||||
</li>
|
||||
|
@ -146,19 +146,19 @@
|
|||
<% end %>
|
||||
<% end %><!--课程动态 end-->
|
||||
|
||||
<% @issues.first || @project_messages.first %>
|
||||
<% @issues.first || @project_messages.first || @wiki_contents.first || @project_news.first || @project_journal_messages.first %>
|
||||
<%= l(:label_project_overview_new)%>
|
||||
<% unless @issues.first.nil? %>
|
||||
|
||||
<%= l(:label_issue_tracking) %>
|
||||
(<%= @issues.count %>)
|
||||
|
||||
|
||||
<% @issues.each do |issue|%>
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
|
@ -167,8 +167,8 @@
|
|||
<%= l(:label_project_issue) %>
|
||||
|
||||
<%= link_to truncate(issue. subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(issue.created_on) %>
|
||||
<% end %>
|
||||
|
@ -179,13 +179,13 @@
|
|||
<% unless @project_messages.first.nil? %>
|
||||
|
||||
<%= l(:project_moule_boards_show) %>
|
||||
(<%= @project_messages.count %>)
|
||||
|
||||
|
||||
<% @project_messages.each do |project_message|%>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
|
@ -194,12 +194,74 @@
|
|||
<%= l(:label_send_course_messages) %>
|
||||
|
||||
<%= link_to truncate(project_message. subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(project_message.created_on) %>
|
||||
<% end %>
|
||||
|
||||
<% unless @wiki_contents.first.nil? %>
|
||||
|
||||
<%= l(:label_wiki) %>
|
||||
|
||||
<% @wiki_contents.each do |wikicontent|%>
|
||||
▪[
|
||||
<% unless wikicontent.page.nil? %>
|
||||
<%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project, :token => @token.value)
|
||||
%>
|
||||
<% end %>
|
||||
]
|
||||
<%= link_to wikicontent.author, user_activities_url(wikicontent.author,:token => @token.value) %>
|
||||
<%= l(:label_project_notice) %>
|
||||
<% unless wikicontent.page.nil? %>
|
||||
<%= link_to truncate(wikicontent.text.html_safe, length: 30,omission: '...'), project_wiki_url(wikicontent.page.wiki,:token => @token.value) %>
|
||||
<% end %>
|
||||
<%= format_time(wikicontent.updated_on) %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<!--项目新闻-->
|
||||
<% unless @project_news.first.nil? %>
|
||||
|
||||
<%= l(:label_project_news) %>
|
||||
|
||||
<% @project_news.each do |project_new|%>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value)
|
||||
%>
|
||||
]
|
||||
<%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_project_notice) %>
|
||||
|
||||
<%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value)
|
||||
%>
|
||||
<%= format_time(project_new.created_on) %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<!--项目留言-->
|
||||
<% unless @project_journal_messages.first.nil? %>
|
||||
<%= l(:label_project_mail_feedback) %>
|
||||
|
||||
<% @project_journal_messages.each do |project_journal_message|%>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project, :token => @token.value)
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to project_journal_message.user, user_activities_url(project_journal_message.user,:token => @token.value) %>
|
||||
<%= l(:label_send_course_journals_for_messages) %>
|
||||
|
||||
<%= link_to truncate(project_journal_message.notes.html_safe,length: 30,omission: '...'), project_feedback_url(project_journal_message.project,:token => @token.value)
|
||||
%>
|
||||
<%= format_time(project_journal_message.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
@ -215,13 +277,13 @@
|
|||
▪
|
||||
|
||||
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= l(:label_show_your_message) %>
|
||||
|
||||
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'), feedback_url(@user,:token => @token.value)
|
||||
|
||||
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(user_journal_message.created_on) %>
|
||||
|
||||
|
@ -234,7 +296,7 @@
|
|||
<% unless @forums.first.nil? %>
|
||||
|
||||
<%= l(:label_user_forum) %>
|
||||
(<%= @forums.count %>)
|
||||
|
||||
|
||||
<% @forums.each do |forum|%>
|
||||
▪
|
||||
|
@ -253,7 +315,7 @@
|
|||
<% unless @memos.first.nil? %>
|
||||
|
||||
<%= l(:label_user_message_forum) %>
|
||||
(<%= @memos.count %>)
|
||||
|
||||
|
||||
<% @memos.each do |memo|%>
|
||||
▪
|
||||
|
|
|
@ -8,11 +8,15 @@
|
|||
<% if is_new %>
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<label class="fl" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
<%= f.kindeditor :description,:width=>'91%',:editor_id=>'news_description_editor' %>
|
||||
<div class="fl" style="width: 91%">
|
||||
<%= f.kindeditor :description,:editor_id=>'news_description_editor' %>
|
||||
</div>
|
||||
<p id="description_notice_span" class="ml55"></p>
|
||||
<% else %>
|
||||
<label class="fl" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
<%= f.kindeditor :description,:width=>'91%',:editor_id=>'news_description_editor',:owner_id => @news.id,:owner_type => OwnerTypeHelper::NEWS %>
|
||||
<div class="fl" style="width: 91%">
|
||||
<%= f.kindeditor :description,:editor_id=>'news_description_editor',:owner_id => @news.id,:owner_type => OwnerTypeHelper::NEWS %>
|
||||
</div>
|
||||
<p id="description_notice_span" class="ml55"></p>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -44,12 +44,13 @@
|
|||
<%= news.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_foot c_red" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>">
|
||||
<%= l(:button_more)%>...
|
||||
<span class="g-arr-down"></span>
|
||||
<div class="news_foot currentDd" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>">
|
||||
[展开]
|
||||
</div>
|
||||
<span class="fl"><%= l(:label_create_time)%>:<%= format_time(news.created_on)%></span>
|
||||
<%= link_to_attachments_course news %>
|
||||
<div class="cl"></div>
|
||||
<%#= render :partial => 'student_work/work_attachments', :locals => {:attachments => news.attachments} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--problem_main end-->
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
|
||||
<% if @news.commentable? %>
|
||||
<div class="msg_box">
|
||||
<div class="msg_box fl">
|
||||
<h4><%= l(:label_comment_add) %></h4>
|
||||
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form") do %>
|
||||
<div class="box" id="news_comment">
|
||||
|
@ -43,7 +43,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% comments = @comments.reverse %>
|
||||
<% comments.each do |comment| %>
|
||||
<% next if comment.new_record? %>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<%= link_to l(:button_create), "javascript:void(0)", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %>
|
||||
<%= link_to l(:button_cancel), project_news_index_path(@project), :onclick => '$("#add-news").hide()', :class => 'blue_btn grey_btn fl c_white' %>
|
||||
<% else %>
|
||||
<%= link_to l(:button_save), "javascript:void(0)", :onclick => "submitNews();",:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white' %>
|
||||
<%= link_to l(:button_save), "javascript:void(0)", :onclick => "submitNews();",:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white'%>
|
||||
<%= link_to l(:button_cancel), news_path(@news), :class => 'blue_btn grey_btn fl c_white' %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,64 +1,6 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_news) %></h2>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function regexTitle()
|
||||
{
|
||||
var name = $("#news_title").val();
|
||||
if(name.length ==0)
|
||||
{
|
||||
$("#title_notice_span").text("<%= l(:label_title_blank)%>");
|
||||
$("#title_notice_span").css('color','#ff0000');
|
||||
$("#title_notice_span").focus();
|
||||
return false;
|
||||
}
|
||||
else if(name.length <= 60)
|
||||
{
|
||||
$("#title_notice_span").text("<%= l(:label_field_correct)%>");
|
||||
$("#title_notice_span").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#title_notice_span").text("<%= l(:label_title_long)%>");
|
||||
$("#title_notice_span").css('color','#ff0000');
|
||||
$("#title_notice_span").focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function submitComment()
|
||||
{
|
||||
$("#add_comment_form").submit();
|
||||
}
|
||||
|
||||
function regexDescription()
|
||||
{
|
||||
var name = $("#news_description").val();
|
||||
if(name.length ==0)
|
||||
{
|
||||
$("#description_notice_span").text("<%= l(:label_descripition_blank)%>");
|
||||
$("#description_notice_span").css('color','#ff0000');
|
||||
$("#description_notice_span").focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#description_notice_span").text("<%= l(:label_field_correct)%>");
|
||||
$("#description_notice_span").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function submitNews()
|
||||
{
|
||||
if(regexTitle() && regexDescription())
|
||||
{
|
||||
$("#news-form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<% if authorize_for('news', 'edit') %>
|
||||
<div id="edit-news" style="display:none;">
|
||||
|
|
|
@ -37,6 +37,13 @@
|
|||
<li class="polls_de_grey fr ml5">关闭</li>
|
||||
<% end%>
|
||||
|
||||
<% if poll.polls_status == 1%>
|
||||
<li class="polls_de_grey fr ml5">导出</li>
|
||||
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
|
||||
<li><%= link_to "导出", export_poll_poll_path(poll.id,:format => "xls"), :class => "polls_de fr ml5"%></li>
|
||||
<% end%>
|
||||
|
||||
|
||||
<li class="polls_date fr"><%= format_date poll.created_at.to_date%></li>
|
||||
<% else%>
|
||||
<% if poll.polls_status == 2%>
|
||||
|
|
|
@ -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("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='hidden_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<span><%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10', :target => "_blank" %>
|
||||
</span><span class="c_grey fr"><%= format_time(journal.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
<p><%= textilizable journal.notes%></p>
|
||||
<!--<p><%#= textilizable journal.notes%></p>-->
|
||||
<p><%=journal.notes.html_safe%>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% 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 %>
|
||||
</span>
|
||||
|
|
|
@ -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 @@
|
|||
<script type="text/javascript">
|
||||
function submit_form(obj)
|
||||
{
|
||||
hideModal(obj);
|
||||
$("#new-watcher-form").submit();
|
||||
// alert("申请成功");
|
||||
}
|
||||
|
@ -52,25 +51,25 @@
|
|||
</div>
|
||||
<div class="C_form">
|
||||
<%= form_tag({:controller => 'applied_project',
|
||||
:action => 'applied_join_project'},
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-watcher-form') do %>
|
||||
:action => 'applied_join_project'},
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-watcher-form') do %>
|
||||
<ul>
|
||||
<li style="padding-top: 15px;">
|
||||
<span class="tips"><%= l('project.join.id.label')%></span>
|
||||
<input type="hidden" name="project_join" value="1">
|
||||
<input type="hidden" name="user_id" value="<%= User.current.id%>">
|
||||
<input type="hidden" name="user_id" value="<%= User.current.id %>">
|
||||
<input class=" width190" name="project_id" id="project_id" type="text" value="" >
|
||||
<input type="text" style="display: none"/>
|
||||
</li>
|
||||
<li class="mB5" style="width: 260px"><%= l('project.join.id.tips')%></li>
|
||||
<li>
|
||||
<a href="#" class="btn" style="margin-left: 50px;" onclick="submit_form(this);">
|
||||
<%= l(:label_apply_project) %>
|
||||
<%= l(:label_apply_project) %>
|
||||
</a>
|
||||
<a href="#" class="btn" style="margin-left: 20px;" onclick="hideModal(this);">
|
||||
<%= l(:button_cancel)%>
|
||||
<%= l(:button_cancel) %>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,4 +1,18 @@
|
|||
<div class="msg_box" id='leave-message'>
|
||||
<style type="text/css">
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:600px;}
|
||||
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
||||
<div class="msg_box" id='leave-message' nhname='new_message' style="height:auto;">
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<h4><%= l(:label_user_response) %></h4>
|
||||
<% if !User.current.logged?%>
|
||||
|
@ -12,8 +26,10 @@
|
|||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}" %>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr" %>
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
|
||||
<p nhname="contentmsg"></p>
|
||||
<div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
@ -24,3 +40,160 @@
|
|||
</div>
|
||||
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
|
||||
|
||||
<div style="display:none;"><a href="#" id="nhjump"></a></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
function init_editor(params){
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
// var flag = false;
|
||||
// if(params.form.attr('data-remote') != undefined ){
|
||||
// flag = true
|
||||
// }
|
||||
// params.form[0].onsubmit = function(){
|
||||
// if(flag){
|
||||
// $(this).removeAttr('data-remote');//不这么搞return false没用 花擦花擦
|
||||
// }
|
||||
// var is_checked = nh_check_field({
|
||||
// issubmit:true,
|
||||
// content:params.editor,
|
||||
// contentmsg:params.contentmsg,
|
||||
// textarea:params.textarea
|
||||
// });
|
||||
// if(is_checked){
|
||||
// if(flag){
|
||||
// alert('add')
|
||||
// $(this).attr('data-remote','true');
|
||||
// }
|
||||
// alert('ok')
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
// return true; //这个涛哥的firefox不能提交
|
||||
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
|
||||
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
|
||||
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
// $("#nhjump").attr('href','#'+params.div_form.attr('id'));
|
||||
// $("#nhjump")[0].click();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
|
||||
$("div[nhname='new_message']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
// $("a[nhname='cancel_btn']",params.div_form).click(function(){
|
||||
// nh_reset_form(params);
|
||||
// });
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -19,7 +19,7 @@
|
|||
<div class="invi_search">
|
||||
<input hidden="hidden" value="true" name="flag">
|
||||
<input id="principal_search" class="invi_search_input fl" type="text" placeholder=<%= l(:label_invite_trustie_user_tips) %>>
|
||||
<a class="invi_search_btn fl" onclick="observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js',:flag => true) }')">搜索</a>
|
||||
<a class="invi_search_btn fl" onclick="observeSearchfield('principal_search', null, '<%= escape_javascript autocomplete_project_memberships_path(@project, :format => 'js',:flag => true)%> ')">搜索</a>
|
||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js',:flag => true) }')" %>
|
||||
<div class="cl"></div>
|
||||
<div id="principals_for_new_member">
|
||||
|
@ -48,7 +48,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<div class="cl mb10"></div>
|
||||
<a href="#" class="btn_free" onclick="$('#new_membership').submit();">
|
||||
<a href="javascript:void(0)" class="btn_free" onclick="submit_invite_members()">
|
||||
<%= l(:label_invite_members)%>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -67,37 +67,39 @@
|
|||
var text=$(label).text();
|
||||
$(label).attr("title",text);
|
||||
}
|
||||
|
||||
function nh_show_err_message(msg){
|
||||
$("#RSide>.flash").remove();
|
||||
$("#RSide").prepend('<div class="flash error" id="flash_error">'+msg+'</div>');
|
||||
}
|
||||
$('#new_membership').submit(function(){
|
||||
var user_ischeck=false;
|
||||
$("input[name='membership[user_ids][]']").each(function(){
|
||||
if($(this).prop('checked')){
|
||||
user_ischeck=true;
|
||||
}
|
||||
});
|
||||
var role_ischeck=false;
|
||||
$("input[name='membership[role_ids][]']").each(function(){
|
||||
if($(this).prop('checked')){
|
||||
role_ischeck=true;
|
||||
}
|
||||
});
|
||||
if(user_ischeck==false && role_ischeck==false){
|
||||
nh_show_err_message('请选择用户和角色!');
|
||||
return false;
|
||||
}
|
||||
if(user_ischeck==false){
|
||||
nh_show_err_message('请选择用户!');
|
||||
return false;
|
||||
}
|
||||
if(role_ischeck==false){
|
||||
nh_show_err_message('请选择角色!');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
function nh_show_err_message(msg){
|
||||
$("#RSide>.flash").remove();
|
||||
$("#RSide").prepend('<div class="flash error" id="flash_error">'+msg+'</div>');
|
||||
}
|
||||
|
||||
function submit_invite_members()
|
||||
{
|
||||
var user_ischeck=false;
|
||||
$("input[name='membership[user_ids][]']").each(function(){
|
||||
if($(this).prop('checked')){
|
||||
user_ischeck=true;
|
||||
}
|
||||
});
|
||||
var role_ischeck=false;
|
||||
$("input[name='membership[role_ids][]']").each(function(){
|
||||
if($(this).prop('checked')){
|
||||
role_ischeck=true;
|
||||
}
|
||||
});
|
||||
if(user_ischeck==false && role_ischeck==false){
|
||||
nh_show_err_message('请选择用户和角色!');
|
||||
return false;
|
||||
}
|
||||
if(user_ischeck==false){
|
||||
nh_show_err_message('请选择用户!');
|
||||
return false;
|
||||
}
|
||||
if(role_ischeck==false){
|
||||
nh_show_err_message('请选择角色!');
|
||||
return false;
|
||||
}
|
||||
$('#new_membership').submit();
|
||||
}
|
||||
</script>
|
|
@ -70,6 +70,7 @@
|
|||
:class => "problem_tit fl fb " %>
|
||||
<br />
|
||||
<p class="mt5 break_word"><%= textAreailizable act,:content %><br />
|
||||
<div class="cl"></div>
|
||||
<%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -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 %>
|
||||
<table class="list changesets">
|
||||
<thead><tr>
|
||||
<th>#</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><%= l(:label_date) %></th>
|
||||
<th><%= l(:field_author) %></th>
|
||||
<th><%= l(:field_comments) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% show_diff = revisions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% revisions.each do |changeset| %>
|
||||
<tr class="changeset <%= cycle 'odd', 'even' %>">
|
||||
<% 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 %>
|
||||
<td class="checkbox"><%= 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) %></td>
|
||||
<td class="checkbox"><%= 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) %></td>
|
||||
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
||||
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
|
||||
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="padding-top: 10px;">
|
||||
{:controller => 'repositories', :action => 'diff', :id => project,
|
||||
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
||||
:method => :get
|
||||
) do %>
|
||||
<table class="list changesets">
|
||||
<thead><tr>
|
||||
<th>#</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><%= l(:label_date) %></th>
|
||||
<th><%= l(:field_author) %></th>
|
||||
<th><%= l(:field_comments) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% show_diff = revisions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% revisions.each do |changeset| %>
|
||||
<tr class="changeset <%= cycle 'odd', 'even' %>">
|
||||
<% 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 %>
|
||||
<td class="checkbox"><%= 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) %></td>
|
||||
<td class="checkbox"><%= 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) %></td>
|
||||
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
||||
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
|
||||
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="padding-top: 10px;">
|
||||
<%= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
|
||||
</p>
|
||||
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<div class="repository_con" style="line-height:1.9;">
|
||||
<div class="repositorytitle" style="float:left;">
|
||||
<%= render :partial => 'breadcrumbs',
|
||||
:locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
||||
:locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
||||
<%= render :partial => 'navigation' %>
|
||||
|
||||
</div>
|
||||
<!--contextual end-->
|
||||
<div class="cl"></div>
|
||||
|
@ -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 %>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="repos_more"><a id="showgithelp" value="show_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">展开Git操作指南</a></div>
|
||||
<div class="repos_more"><a href="#" id="showgithelp" value="show_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">展开Git操作指南</a></div>
|
||||
<div id="repos_git_more">
|
||||
<br>
|
||||
<div class=" c_dark f14">
|
||||
<p>项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。</p>
|
||||
<p>通过cmd命令提示符进入代码对应文件夹的根目录,假设当前用户的登录名为user,版本库名称为demo,需要操作的版本库分支为branch。
|
||||
如果是首次提交代码,执行如下命令:</p>
|
||||
如果是首次提交代码,执行如下命令:</p>
|
||||
</div>
|
||||
<div class="repos_explain">
|
||||
<p>git init</p>
|
||||
|
@ -53,7 +52,7 @@
|
|||
|
||||
<p>git push -u origin branch:branch</p>
|
||||
</div>
|
||||
<!--repos_explain end-->
|
||||
<!--repos_explain end-->
|
||||
<div class="c_dark f14">
|
||||
<p>已经有本地库,还没有配置远程地址,打开命令行执行如下:</p>
|
||||
</div>
|
||||
|
@ -68,7 +67,7 @@
|
|||
|
||||
<p>git push -u origin branch:branch</p>
|
||||
</div>
|
||||
<!--repos_explain end-->
|
||||
<!--repos_explain end-->
|
||||
<div class="c_dark f14">
|
||||
<p>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</p>
|
||||
</div>
|
||||
|
@ -81,7 +80,7 @@
|
|||
|
||||
<p>git push origin branch_name</p>
|
||||
</div>
|
||||
<!--repos_explain end-->
|
||||
<!--repos_explain end-->
|
||||
<div class="c_dark f14">
|
||||
<p>从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:</p>
|
||||
</div>
|
||||
|
@ -101,56 +100,59 @@
|
|||
<p><a href="/users/646" class="c_orange">李海</a>提供</p>
|
||||
</div>
|
||||
</div>
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
<!-- 代码库显示 -->
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
<% if authorize_for('repositories', 'revisions') %>
|
||||
<% if @changesets && !@changesets.empty? %>
|
||||
<h3>
|
||||
<%= l(:label_latest_revision_plural) %>
|
||||
</h3>
|
||||
<%= render :partial => 'revisions',
|
||||
:locals => {:project => @project, :path => @path,
|
||||
:revisions => @changesets, :entry => nil} %>
|
||||
<!-- 代码修订 -->
|
||||
<% if authorize_for('repositories', 'revisions') %>
|
||||
<%# if @changesets && !@changesets.empty? %>
|
||||
<h3>
|
||||
<%= l(:label_latest_revision_plural) %>
|
||||
</h3>
|
||||
<%= render :partial => 'revisions',
|
||||
:locals => {:project => @project, :path => @path,
|
||||
:revisions => @changesets, :entry => nil} %>
|
||||
<%# end %>
|
||||
|
||||
<p style="padding-top: 10px;">
|
||||
<% 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 %>
|
||||
<p style="padding-top: 10px;">
|
||||
<% 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 %>
|
||||
</p>
|
||||
<% 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 %>
|
||||
</p>
|
||||
<% 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 %>
|
||||
|
||||
<!-- added by bai -->
|
||||
<p class="fb c_dark mt10">查看如何提交代码:
|
||||
<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %>
|
||||
<%= link_to('English', en_usage_path, :class => "c_blue") %>
|
||||
<!-- added by bai -->
|
||||
<p class="fb c_dark mt10">查看如何提交代码:
|
||||
<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %>
|
||||
<%= link_to('English', en_usage_path, :class => "c_blue") %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</ul>
|
||||
|
||||
<div class="ping_box mt10" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%@work.student_works_scores.order("created_at desc").each do |score|%>
|
||||
<%@work.student_works_scores.order("updated_at desc").each do |score|%>
|
||||
<div id="work_score_<%= score.id%>">
|
||||
<%= render :partial => 'student_work_score',:locals => {:score => score}%>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<a href="javascript:void(0);" class="c_orange fl" ><%= score.score%>分</a>
|
||||
<a href="javascript:void(0);" class="fr c_purple mr5" onclick="$('#add_score_reply_<%= score.id%>').slideToggle();">回复</a>
|
||||
<span class=" fr c_grey mr20">
|
||||
<%=format_time score.created_at %>
|
||||
<%=format_time score.updated_at %>
|
||||
</span>
|
||||
<div class="cl mb5"></div>
|
||||
<p class="break_word">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<li class="hwork_num ">
|
||||
<a href="javascript:void(0);" class=" f14 f_b c_dark fl" >学号</a>
|
||||
<span class="c_dark f14 fb fl">学号</span>
|
||||
</li>
|
||||
<li class=" hwork_name f14 fb c_dark">
|
||||
学生姓名
|
||||
|
|
|
@ -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("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %></div>");
|
||||
<% else %>
|
||||
$("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>");
|
||||
<% end%>
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||
<span><%= link_to journal.user, user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= format_time(journal.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
<p><%= textilizable journal.notes%></p>
|
||||
<!--<p><%#= textilizable journal.notes%></p>-->
|
||||
<p><%=journal.notes.html_safe%></p>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% 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 %>
|
||||
</span>
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
<style type="text/css">
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:600px;}
|
||||
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
||||
<div class="dis">
|
||||
<div class="msg_box" id='leave-message'>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
@ -49,3 +63,169 @@
|
|||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div style="display:none;"><a href="#" id="nhjump"></a></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
function init_editor(params){
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
// var flag = false;
|
||||
// if(params.form.attr('data-remote') != undefined ){
|
||||
// flag = true
|
||||
// }
|
||||
// params.form[0].onsubmit = function(){
|
||||
// if(flag){
|
||||
// $(this).removeAttr('data-remote');//不这么搞return false没用 花擦花擦
|
||||
// }
|
||||
// var is_checked = nh_check_field({
|
||||
// issubmit:true,
|
||||
// content:params.editor,
|
||||
// contentmsg:params.contentmsg,
|
||||
// textarea:params.textarea
|
||||
// });
|
||||
// if(is_checked){
|
||||
// if(flag){
|
||||
// alert('add')
|
||||
// $(this).attr('data-remote','true');
|
||||
// }
|
||||
// alert('ok')
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
// return true; //这个涛哥的firefox不能提交
|
||||
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
|
||||
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
|
||||
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
if($(this).parent('span')==undefined || $(this).parent('span').length==0){
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
}else{
|
||||
params.container = $(this).parent('span').parent('div').parent('div');
|
||||
}
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
}
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
// $("#nhjump").attr('href','#'+params.div_form.attr('id'));
|
||||
// $("#nhjump")[0].click();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
|
||||
$("div[nhname='new_message']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("#new_message_cancel_btn");
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
// $("a[nhname='cancel_btn']",params.div_form).click(function(){
|
||||
// nh_reset_form(params);
|
||||
// });
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -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) ? '' : ',' %>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= reply.notes %>
|
||||
<%= reply.notes.html_safe %>
|
||||
</p>
|
||||
<span class="c_grey fl">
|
||||
<%= 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 %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
border: #d5dee9 1px solid;
|
||||
}
|
||||
</style>
|
||||
<div style="width: 80%; margin-left:10%;">
|
||||
<div style="width: 80%; margin-left:10%;" nhname='new_message'>
|
||||
<%= 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;"%>
|
||||
<p nhname="contentmsg"></p>
|
||||
<div style="padding-top:5px;float:left;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-top: 5px;"%>
|
||||
<a href="javascript:;" id="new_message_cancel_btn" style="display:none;"></a>
|
||||
<%else %>
|
||||
<div style="font-size: 14px;margin:10px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
|
|
|
@ -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
|
||||
%>
|
||||
<p nhname="contentmsg"></p>
|
||||
|
||||
<%= 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 %>
|
||||
<div class="fl" style="padding-top:5px;float:left;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_feedback_respond), :name => nil ,
|
||||
:class => "enterprise",
|
||||
:style => "float: right; margin-top: 1px; margin-right: 4px;margin-bottom: 5px;"%>
|
||||
<input nhname="cancel_btn" type="button" style="display:none;"/>
|
||||
|
||||
<% end %>
|
|
@ -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
|
||||
%>
|
||||
<p nhname="contentmsg"></p>
|
||||
<%= 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 %>
|
||||
|
||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_feedback_respond), :name => nil ,
|
||||
:class => "reply_btn"%>
|
||||
|
||||
<input nhname="cancel_btn" type="button" style="display:none;"/>
|
||||
<% end %>
|
|
@ -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
|
||||
%>
|
||||
<p nhname="contentmsg"></p>
|
||||
<%= 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 %>
|
||||
|
||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_feedback_respond), :name => nil ,
|
||||
:class => "reply_btn"%>
|
||||
<input nhname="cancel_btn" type="button" style="display:none;"/>
|
||||
|
||||
<% end %>
|
|
@ -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("");
|
|
@ -219,7 +219,7 @@ zh:
|
|||
label_submit: 提交
|
||||
button_project_tags_add: 增加
|
||||
button_download: 下载
|
||||
button_more: "更多»"
|
||||
button_more: "更多"
|
||||
button_delete: 删除
|
||||
button_unfollow: 取消关注
|
||||
button_follow: 关注
|
||||
|
|
|
@ -20,4 +20,4 @@ zh:
|
|||
mail_issue_sent_from: "来源:"
|
||||
mail_issue_from_project: "项目问题跟踪"
|
||||
mail_issue_attachments: "附件:"
|
||||
mail_issue_reply: "我要回复"
|
||||
mail_issue_reply: "我要回复"
|
||||
|
|
|
@ -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: 新闻的数量
|
||||
|
|
|
@ -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: 问卷调查_问卷统计
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -5054,8 +5054,7 @@ KEditor.prototype = {
|
|||
}
|
||||
});
|
||||
statusbar.removeClass('statusbar').addClass('ke-statusbar')
|
||||
.append('<span class="ke-inline-block ke-statusbar-center-icon"></span>')
|
||||
.append('<span class="ke-inline-block ke-statusbar-right-icon"></span>');
|
||||
.append('<span class="ke-inline-block ke-statusbar-center-icon"></span>');
|
||||
if (self._fullscreenResizeHandler) {
|
||||
K(window).unbind('resize', self._fullscreenResizeHandler);
|
||||
self._fullscreenResizeHandler = null;
|
||||
|
|
|
@ -421,6 +421,7 @@
|
|||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
/* toolbar */
|
||||
.ke-toolbar {
|
||||
|
|
|
@ -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('<span class="ke-inline-block ke-statusbar-center-icon"></span>')
|
||||
.append('<span class="ke-inline-block ke-statusbar-right-icon"></span>');
|
||||
.append('<span class="ke-inline-block ke-statusbar-center-icon"></span>');
|
||||
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('<img src="'+url+'"/>');
|
||||
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() {
|
||||
|
|
|
@ -432,6 +432,7 @@
|
|||
}
|
||||
/* container */
|
||||
.ke-container {
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #FFF;
|
||||
|
|
|
@ -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("[展开]");
|
||||
}
|
||||
}
|
||||
|
||||
//课程作业结束时间倒计时
|
||||
|
|
|
@ -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:'您已新建过同名项目,请修改项目名称!'}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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%;}
|
||||
|
|
Loading…
Reference in New Issue