Merge branch 'develop' into hjq_beidou

This commit is contained in:
huang 2016-06-06 14:23:19 +08:00
commit 89288c7861
88 changed files with 869 additions and 433 deletions

2
.gitignore vendored
View File

@ -30,6 +30,4 @@ vendor/cache
/public/files
/tags
/config/initializers/gitlab_config.rb
/config/wechat.yml
/config/menu.yml
1234567

View File

@ -1,4 +1,4 @@
source 'https://rubygems.org/'
source 'https://ruby.taobao.org/'
### <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>bundle config mirror.https://rubygems.org https://gems.ruby-china.org <20>л<EFBFBD><D0BB><EFBFBD>ruby-chinaԴ
unless RUBY_PLATFORM =~ /w32/

View File

@ -13,34 +13,18 @@ module Mobile
end
post do
user = UserWechat.find_by_openid(params[:openid]).user
=begin
shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id)
shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
page = params[:page] ? params[:page] : 0
user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
user_course_ids = (user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")"
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
project_types = "('Message','Issue','ProjectCreateInfo')"
principal_types = "JournalsForMessage"
blog_ids = "("+user.blog.id.to_s+","+((User.watched_by(user.id).count == 0 )? '0' :User.watched_by(user.id).map{|u| u.blog.id}.join(','))+")"
activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{user.id}) " +
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc')
=end
shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id)
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
page = params[:page] ? params[:page] : 0
user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.map{|project| project.id}-shield_project_ids).join(",") + ")"
user_course_ids = (user.courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.map{|course| course.id}-shield_course_ids).join(",") + ")"
user_project_ids = (user.projects.where("status = 1").map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.where("status = 1").map{|project| project.id}-shield_project_ids).join(",") + ")"
user_course_ids = (user.courses.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
project_types = "('Message','Issue','Project')"
principal_types = "JournalsForMessage"
watched_user_ids = User.watched_by(user.id).count == 0 ? " " : ("," + User.watched_by(user.id).map{|u| u.id.to_s }.join(','))
user_ids = "(" + user.id.to_s + watched_user_ids + ")"
watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}").map { |blog| blog.id}.join(",")
watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}").count == 0 ? " " :Blog.select("id").where("author_id in #{user_ids}").map { |blog| blog.id}.join(",")
blog_ids = "(" + watched_user_blog_ids + ")"
activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +

View File

@ -98,6 +98,7 @@ module Mobile
end
expose :act_type #缺陷/作业/讨论区/留言等类型
expose :act_id
expose :id
expose :container_type #课程/项目/博客/个人
expose :author, using: Mobile::Entities::User do |a, opt| #用户信息
if a.is_a? ::UserActivity

View File

@ -304,7 +304,7 @@ class CoursesController < ApplicationController
@render_file = 'new_member_list'
@score_sort_by = "desc"
@sort_type = "score"
@sort_type = params[:sort_type] ? params[:sort_type] : "score"
@canShowCode = User.current.allowed_to?(:as_teacher,@course) && params[:role] != '1'
@role = params[:role].nil? ? '2':params[:role]
@is_remote = true
@ -319,7 +319,7 @@ class CoursesController < ApplicationController
if @course.open_student == 1 || User.current.member_of_course?(@course)
@subPage_title = l :label_student_list
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
@all_members = student_homework_score(0,page, 10,@score_sort_by)
@all_members = student_homework_score(0,page, 10,@score_sort_by,@sort_type)
@members = @all_members
else
render_403

View File

@ -304,7 +304,7 @@ class MessagesController < ApplicationController
@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
@temp = Message.new
@temp.content = "<blockquote>#{ll(Setting.default_language, :text_user_wrote, @message.author)} <br/>#{@message.content.html_safe}</blockquote>".html_safe
@temp.content = "<blockquote>#{ll(Setting.default_language, :text_user_wrote, @message.author.show_name)} <br/>#{@message.content.html_safe}</blockquote>".html_safe
end
def preview

View File

@ -563,13 +563,23 @@ class OrganizationsController < ApplicationController
# 设置为名师
def set_excellent_teacher
@ex_teacher = User.find(params[:user])
params[:type] == "student" ? @ex_teacher.update_column(:excellent_student, 1) : @ex_teacher.update_column(:excellent_teacher, 1)
@ex_teacher.update_column(:excellent_teacher, 1)
end
# 取消名师
def reset_excellent_teacher
@ex_teacher = User.find(params[:user])
params[:type] == "student" ? @ex_teacher.update_column(:excellent_student, 0) : @ex_teacher.update_column(:excellent_teacher, 0)
@ex_teacher.update_column(:excellent_teacher, 0)
end
def set_excellent_student
@ex_student = User.find(params[:user])
@ex_student.update_column(:excellent_student, 1)
end
def reset_excellent_student
@ex_student = User.find(params[:user])
@ex_student.update_column(:excellent_student, 0)
end
def hide_org_subfield

View File

@ -390,7 +390,7 @@ class StudentWorkController < ApplicationController
student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')'
end
#开放作品 || 老师 || 超级管理员 || 禁用匿评&&作业截止&&已提交作品 显示所有列表
if @homework.is_open == 1 || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
if (@homework.is_open == 1 && @course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
if @order == 'lastname'
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).where("users.id in #{student_in_group}").order("CONVERT(lastname USING gbk) COLLATE gbk_chinese_ci #{@b_sort}, login #{@b_sort}"),@name
elsif @order == 'student_id'
@ -456,7 +456,7 @@ class StudentWorkController < ApplicationController
@student_work_count = (search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name).count
else
if @homework.is_open == 1 || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
if (@homework.is_open == 1 &&@course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.where(:user_id => User.current.id).empty?)
if @order == 'lastname'
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,student_works.work_score as score").joins(:user).order("CONVERT(lastname USING gbk) COLLATE gbk_chinese_ci #{@b_sort}, login #{@b_sort}"),@name
elsif @order == 'student_id'

View File

@ -1,7 +1,7 @@
class SubDocumentCommentsController < ApplicationController
before_filter :find_subdomain_and_subfield, :only => [:new, :create, :show, :index, :destroy, :edit]
before_filter :find_subfield_content, :only => [:show, :index]
before_filter :authorize_allowed, :only => [:create, :add_reply]
before_filter :authorize_allowed, :only => [:create]
helper :attachments,:organizations
layout 'base_sub_domain'

View File

@ -570,7 +570,7 @@ class UsersController < ApplicationController
end
if !params[:search].nil?
search = "%#{params[:search].to_s.strip.downcase}%"
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id} and #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search).select { |course| @user.allowed_to?(:as_teacher,course)}
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id} and (#{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p)",:p=>search).select { |course| @user.allowed_to?(:as_teacher,course)}
else
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id}").select { |course| @user.allowed_to?(:as_teacher,course)}
end

View File

@ -154,12 +154,7 @@ class WechatsController < ActionController::Base
end
end
### controller method
module Controllers
def get_open_id
begin
@ -167,7 +162,6 @@ class WechatsController < ActionController::Base
code = params[:code] || session[:wechat_code]
openid = get_openid_from_code(code)
raise "无法获取到微信openid" unless openid
render :json => {status:0, openid: openid}
rescue Exception=>e
@ -194,6 +188,8 @@ class WechatsController < ActionController::Base
openid: openid,
user: user
)
ws = WechatService.new
ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.login, format_time(Time.now))
render :json => {status:0, msg: "绑定成功"}
rescue Exception=>e
render :json => {status: -1, msg: e.message}
@ -202,9 +198,25 @@ class WechatsController < ActionController::Base
def login
session[:wechat_code] = params[:code] if params[:code]
openid = get_openid_from_code(params[:code])
@wechat_user = user_binded?(openid)
render 'wechats/login', layout: 'base_wechat'
end
def user_activities
session[:wechat_code] = params[:code] if params[:code]
code = params[:code] || session[:wechat_code]
openid = get_openid_from_code(code)
@wechat_user = user_binded?(openid)
unless @wechat_user
redirect_to login_wechat_path
return
end
render 'wechats/user_activities', layout: nil
end
private
def get_openid_from_code(code)
openid = session[:wechat_openid]
@ -226,37 +238,8 @@ class WechatsController < ActionController::Base
uw = UserWechat.where(openid: openid).first
end
def user_activity(user)
@user = user
shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id)
shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id)
@page = params[:page] ? params[:page].to_i + 1 : 0
user_project_ids = (@user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
user_course_ids = (@user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")"
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
project_types = "('Message','Issue','Project')"
principal_types = "JournalsForMessage"
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
@user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
end
def process_activity(user_activity)
act= user_activity.act
case user_activity.container_type.to_s
when 'Course'
when 'Project'
case user_activity.act_type.to_s
when 'Issue'
[act.project.name.to_s+" | 项目问题", act.subject.to_s, url_to_avatar(act.author),"http://wechat.trustie.net/app.html#/issue/#{act.id}"]
end
end
end
end

View File

@ -10,14 +10,14 @@ class ZipdownController < ApplicationController
#勿删 before_filter :authorize, :only => [:assort,:download_user_homework]
SAVE_FOLDER = "#{Rails.root}/files"
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
MAX_PATH = 50
#统一下载功能
def download
if User.current.logged?
begin
if params[:base64file]
file = Base64.decode64(params[:base64file])
file = file.sub('*', '+')
file = decode64(params[:base64file])
send_file "#{OUTPUT_FOLDER}/#{file}", :filename => filename_for_content_disposition(file), :type => detect_content_type(file)
else
send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => filename_for_content_disposition(params[:filename]), :type => detect_content_type(params[:file])
@ -125,7 +125,11 @@ class ZipdownController < ApplicationController
end
def encode64(str)
Base64.encode64(str).sub('+', '*')
Base64.urlsafe_encode64(str)
end
def decode64(str)
Base64.urlsafe_decode64(str)
end
def zip_homework_common homework_common
@ -242,6 +246,12 @@ class ZipdownController < ApplicationController
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[])
rename_zipfile = zip_name_refer ||= "#{Time.now.to_i.to_s}.zip"
# 文件名过长
if rename_zipfile.size > MAX_PATH
rename_zipfile = rename_zipfile[0,rename_zipfile.size-4][0,MAX_PATH-4] + rename_zipfile[-4,4]
end
zipfile_name = "#{output_path}/#{rename_zipfile}"
Dir.mkdir(File.dirname(zipfile_name)) unless File.exist?(File.dirname(zipfile_name))

View File

@ -182,7 +182,7 @@ module ApiHelper
timeIntoFormat = 0
updateAtValue = ""
if timePassed < 0
updateAtValue = "时间有问题"
updateAtValue = "刚刚"
elsif timePassed < ONE_MINUTE
updateAtValue = "1分钟前"
elsif timePassed < ONE_HOUR

View File

@ -181,7 +181,7 @@ module OrganizationsHelper
if User.current.admin?
@organization.org_subfields.order("priority")
else
@organization.org_subfields.select { |os| (os.field_type != "Comptec" && os.field_type != "Compstu") }.sort_by {|os| os.priority}
@organization.org_subfields.select { |os| (os.field_type != "Comptec" && os.field_type != "Compstu" && os.field_type != "Comppro" && os.field_type != "Compcou" && os.field_type != "Compact") }.sort_by {|os| os.priority}
end
end

View File

@ -21,7 +21,7 @@ class BlogComment < ActiveRecord::Base
after_save :add_user_activity
after_update :update_activity
after_create :update_parent_time, :blog_wechat_message
after_create :update_parent_time
before_destroy :destroy_user_activity
scope :like, lambda {|arg|
@ -77,16 +77,16 @@ class BlogComment < ActiveRecord::Base
end
#博客回复微信模板消息
def blog_wechat_message
ws = WechatService.new
if self.parent_id.nil?
self.author.watcher_users.each do |watcher|
content = strip_html self.author.try(:realname) + " 发表了博客:" + self.title.html_safe, 200
ws.message_update_template watcher.id, "blog_comment", self.id, "#{l(:label_new_blog_template)}", content, format_time(self.created_at)
end
else
content = strip_html self.content.html_safe, 200
ws.comment_template self.parent.author_id, "blog_comment", self.parent_id, "#{l(:label_blog_comment_template)}", self.author.try(:realname), format_time(self.created_at), content
end
end
# def blog_wechat_message
# ws = WechatService.new
# if self.parent_id.nil?
# self.author.watcher_users.each do |watcher|
# content = strip_html self.author.try(:realname) + " 发表了博客:" + self.title.html_safe, 200
# ws.message_update_template watcher.id, "blog_comment", self.id, "#{l(:label_new_blog_template)}", content, format_time(self.created_at)
# end
# else
# content = strip_html self.content.html_safe, 200
# ws.comment_template self.parent.author_id, "blog_comment", self.parent_id, "#{l(:label_blog_comment_template)}", self.author.try(:realname), format_time(self.created_at), content
# end
# end
end

View File

@ -41,15 +41,15 @@ class Comment < ActiveRecord::Base
after_destroy :down_course_score
def act_as_system_message
ws = WechatService.new
#ws = WechatService.new
if self.commented.course
if self.author_id != self.commented.author_id
self.course_messages << CourseMessage.new(:user_id => self.commented.author_id, :course_id => self.commented.course.id, :viewed => false)
count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.commented.author_id} and shield_type='Course' and shield_id=#{self.commented.course.id}").count
if count == 0
content = strip_html self.comments.html_safe, 200
ws.comment_template self.commented.author_id, "course_notice", self.id, "#{l(:label_notice_comment_template)}", self.author.try(:realname), format_time(self.created_on), content
end
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.commented.author_id} and shield_type='Course' and shield_id=#{self.commented.course.id}").count
# if count == 0
# content = strip_html self.comments.html_safe, 200
# ws.comment_template self.commented.author_id, "course_notice", self.id, "#{l(:label_notice_comment_template)}", self.author.try(:realname), format_time(self.created_on), content
# end
end
else # 项目相关
if self.author_id != self.commented.author_id

View File

@ -30,7 +30,7 @@ class HomeworkCommon < ActiveRecord::Base
:author => :author,
:url => Proc.new {|o| {:controller => 'student_work', :action => 'index', :homework => o.id}}
after_create :act_as_activity, :send_mail,:act_as_course_message
after_update :update_activity, :wechat_message
after_update :update_activity
after_save :act_as_course_activity
after_destroy :delete_kindeditor_assets
@ -63,7 +63,7 @@ class HomeworkCommon < ActiveRecord::Base
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count
if count == 0
ws = WechatService.new
ws.homework_template(m.user_id, "homework", self.id, "#{l(:label_new_homework_template)}", self.course.name, self.name.html_safe, self.end_time.to_s + " 23:59:59")
ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name}#{l(:label_new_homework_template)}", self.course.name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。")
end
# end
end
@ -108,15 +108,15 @@ class HomeworkCommon < ActiveRecord::Base
end
#修改作业后发送微信模板消息
def wechat_message
self.course.members.each do |member|
count = ShieldWechatMessage.where("container_type='User' and container_id=#{member.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count
if count == 0
ws = WechatService.new
ws.homework_template(member.user_id, "homework", self.id, "#{l(:label_update_homework_template)}", self.course.name, self.name.html_safe, self.end_time.to_s + " 23:59:59")
end
end
end
# def wechat_message
# self.course.members.each do |member|
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{member.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count
# if count == 0
# ws = WechatService.new
# ws.homework_template(member.user_id, "homework", self.id, "#{l(:label_update_homework_template)}", self.course.name, self.name.html_safe, self.end_time.to_s + " 23:59:59")
# end
# end
# end
delegate :language_name, :language, :to => :homework_detail_programing

View File

@ -160,27 +160,27 @@ class Issue < ActiveRecord::Base
unless self.author_id == self.assigned_to_id
self.forge_messages << ForgeMessage.new(:user_id => self.assigned_to_id, :project_id => self.project_id, :viewed => false)
end
self.project.members.each do |m|
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Project' and shield_id=#{self.project_id}").count
if m.user_id != self.author_id && count == 0
ws = WechatService.new
str = " 有新缺陷了: "
case self.tracker_id
when 1
str = " 有新缺陷了: "
when 2
str = " 有新功能了: "
when 3
str = " 有新支持了: "
when 4
str = " 有新任务了: "
when 5
str = " 有新周报了: "
end
content = strip_html self.project.name + str + self.subject.html_safe, 200
ws.message_update_template m.user_id, "issues", self.id, "#{l(:label_new_issue_template)}", content, format_time(self.created_on)
end
end
# self.project.members.each do |m|
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Project' and shield_id=#{self.project_id}").count
# if m.user_id != self.author_id && count == 0
# ws = WechatService.new
# str = " 有新缺陷了: "
# case self.tracker_id
# when 1
# str = " 有新缺陷了: "
# when 2
# str = " 有新功能了: "
# when 3
# str = " 有新支持了: "
# when 4
# str = " 有新任务了: "
# when 5
# str = " 有新周报了: "
# end
# content = strip_html self.project.name + str + self.subject.html_safe, 200
# ws.message_update_template m.user_id, "issues", self.id, "#{l(:label_new_issue_template)}", content, format_time(self.created_on)
# end
# end
if self.tracker_id == 5
self.project.members.each do |m|
if m.roles.first.to_s.include?("Manager") && m.user_id != self.author_id && m.user_id != self.assigned_to_id

View File

@ -55,7 +55,6 @@ class Journal < ActiveRecord::Base
# fq
after_save :act_as_activity,:be_user_score, :act_as_forge_message, act_as_at_message(:notes, :user_id)
after_create :issue_wechat_message
# end
#after_destroy :down_user_score
#before_save :be_user_score
@ -238,11 +237,11 @@ class Journal < ActiveRecord::Base
end
#缺陷回复微信模板消息
def issue_wechat_message
if !self.notes.nil? && self.notes.gsub(' ','') != ''
ws = WechatService.new
content = strip_html self.notes.html_safe, 200
ws.comment_template self.issue.author_id, "issues", self.journalized_id, "#{l(:label_issue_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
end
end
# def issue_wechat_message
# if !self.notes.nil? && self.notes.gsub(' ','') != ''
# ws = WechatService.new
# content = strip_html self.notes.html_safe, 200
# ws.comment_template self.issue.author_id, "issues", self.journalized_id, "#{l(:label_issue_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
# end
# end
end

View File

@ -259,24 +259,24 @@ class JournalsForMessage < ActiveRecord::Base
if self.m_parent_id.nil?
if self.user_id != self.jour.user_id
self.course_messages << CourseMessage.new(:user_id => self.jour.user_id,:course_id => self.jour.course.id, :viewed => false)
count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.jour.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count
if count == 0
ws = WechatService.new
#content = truncate(strip_tags(self.notes.to_s), length: 200)
content = strip_html self.notes.html_safe, 200
ws.comment_template self.jour.user_id, "homework", self.jour_id, "#{l(:label_homework_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
end
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.jour.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count
# if count == 0
# ws = WechatService.new
# #content = truncate(strip_tags(self.notes.to_s), length: 200)
# content = strip_html self.notes.html_safe, 200
# ws.comment_template self.jour.user_id, "homework", self.jour_id, "#{l(:label_homework_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
# end
end
else
if self.user_id != self.parent.user_id
self.course_messages << CourseMessage.new(:user_id => self.parent.user_id,:course_id => self.jour.course.id, :viewed => false)
count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.parent.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count
if count == 0
ws = WechatService.new
#content = truncate(strip_tags(self.notes.to_s), length: 200)
content = strip_html self.notes.html_safe, 200
ws.comment_template self.parent.user_id, "homework", self.jour_id, "#{l(:label_new_second_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
end
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.parent.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count
# if count == 0
# ws = WechatService.new
# #content = truncate(strip_tags(self.notes.to_s), length: 200)
# content = strip_html self.notes.html_safe, 200
# ws.comment_template self.parent.user_id, "homework", self.jour_id, "#{l(:label_new_second_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
# end
end
end
end
@ -293,7 +293,7 @@ class JournalsForMessage < ActiveRecord::Base
if self.user_id != self.jour_id # 过滤自己给自己的留言消息
receivers << self.jour
content = strip_html self.notes, 200
ws.message_update_template self.jour_id, "journal_for_message", self.id, "#{l(:label_new_journals_template)}", content, format_time(self.created_on)
ws.journal_notice self.jour_id, "journal_for_message", self.id, "#{l(:label_new_journals_template)}", self.user.show_name, format_time(self.created_on),content
end
else # 留言回复
reply_to = User.find(self.reply_id)
@ -303,8 +303,8 @@ class JournalsForMessage < ActiveRecord::Base
if self.user_id != self.parent.jour_id && self.reply_id != self.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
receivers << self.parent.jour
end
content = strip_html self.notes, 200
ws.comment_template self.reply_id, "journal_for_message", self.parent.id, "#{l(:label_journals_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
#content = strip_html self.notes, 200
#ws.comment_template self.reply_id, "journal_for_message", self.parent.id, "#{l(:label_journals_comment_template)}", self.user.try(:realname), format_time(self.created_on), content
end
receivers.each do |r|
self.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => self.id, :journals_for_message_type => "Principal", :viewed => false)

View File

@ -258,28 +258,28 @@ class Message < ActiveRecord::Base
# 主贴项目成员都能收到
# 回帖:帖子的发布人收到
def act_as_system_message
ws = WechatService.new
#ws = WechatService.new
if self.course
if self.parent_id.nil? # 主贴
self.course.members.includes(:user).each do |m|
if self.author.allowed_to?(:as_teacher, self.course) && m.user_id != self.author_id # 老师 自己的帖子不给自己发送消息
#self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.board.course_id, :viewed => false)
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course.id}").count
if count == 0
content = strip_html self.subject, 200
ws.topic_publish_template m.user_id, "course_discussion", self.id, "#{l(:label_course_topic_template)}", content, self.author.try(:realname), format_time(self.created_on)
end
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course.id}").count
# if count == 0
# content = strip_html self.subject, 200
# ws.topic_publish_template m.user_id, "course_discussion", self.id, "#{l(:label_course_topic_template)}", content, self.author.try(:realname), format_time(self.created_on)
# end
end
end
else # 回帖
parent_author_id = Message.find(self.parent_id).author_id
if parent_author_id != self.author_id # 只针对主贴回复,回复自己的帖子不发消息
self.course_messages << CourseMessage.new(:user_id => parent_author_id, :course_id => self.board.course_id, :viewed => false)
count = ShieldWechatMessage.where("container_type='User' and container_id=#{parent_author_id} and shield_type='Course' and shield_id=#{self.board.course_id}").count
if count == 0
content = strip_html self.content.html_safe, 200
ws.comment_template parent_author_id, "course_discussion", self.parent_id, "#{l(:label_topic_comment_template)}", self.author.try(:realname), format_time(self.created_on), content
end
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{parent_author_id} and shield_type='Course' and shield_id=#{self.board.course_id}").count
# if count == 0
# content = strip_html self.content.html_safe, 200
# ws.comment_template parent_author_id, "course_discussion", self.parent_id, "#{l(:label_topic_comment_template)}", self.author.try(:realname), format_time(self.created_on), content
# end
end
end
elsif self.project # 项目相关
@ -287,22 +287,22 @@ class Message < ActiveRecord::Base
self.project.members.includes(:user).each do |m|
if m.user_id != self.author_id
#self.forge_messages << ForgeMessage.new(:user_id => m.user_id, :project_id => self.board.project_id, :viewed => false)
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Project' and shield_id=#{self.project.id}").count
if count == 0
content = strip_html self.subject, 200
ws.topic_publish_template m.user_id, "project_discussion", self.id, "#{l(:label_project_topic_template)}", content, self.author.try(:realname), format_time(self.created_on)
end
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Project' and shield_id=#{self.project.id}").count
# if count == 0
# content = strip_html self.subject, 200
# ws.topic_publish_template m.user_id, "project_discussion", self.id, "#{l(:label_project_topic_template)}", content, self.author.try(:realname), format_time(self.created_on)
# end
end
end
else # 回帖
parent_author_id = Message.find(self.parent_id).author_id
if parent_author_id != self.author_id # 只针对主贴回复,回复自己的帖子不发消息
self.forge_messages << ForgeMessage.new(:user_id => parent_author_id, :project_id => self.board.project_id, :viewed => false)
count = ShieldWechatMessage.where("container_type='User' and container_id=#{parent_author_id} and shield_type='Project' and shield_id=#{self.board.project_id}").count
if count == 0
content = strip_html self.content.html_safe, 200
ws.comment_template parent_author_id, "project_discussion", self.parent_id, "#{l(:label_topic_comment_template)}", self.author.try(:realname), format_time(self.created_on), content
end
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{parent_author_id} and shield_type='Project' and shield_id=#{self.board.project_id}").count
# if count == 0
# content = strip_html self.content.html_safe, 200
# ws.comment_template parent_author_id, "project_discussion", self.parent_id, "#{l(:label_topic_comment_template)}", self.author.try(:realname), format_time(self.created_on), content
# end
end
end
end

View File

@ -174,7 +174,7 @@ class News < ActiveRecord::Base
if count == 0
ws = WechatService.new
content = strip_html self.author.try(:realname) + " 发布了通知:" + self.title.html_safe, 200
ws.message_update_template m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", content, format_time(self.created_on)
ws.class_notice m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", self.course.name, self.author.show_name, format_time(self.created_on), content, "点击查看通知详情"
end
end
end

View File

@ -110,4 +110,144 @@ class WechatService
Rails.logger.info "send over. #{req}"
end
end
def two_keys_template(openid, template_id, type, id, first, key1, key2, remark="")
data = {
touser:openid,
template_id:template_id,
url:"#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}",
topcolor:"#FF0000",
data:{
first: {
value:first,
color:"#707070"
},
keyword1:{
value:key1,
color:"#707070"
},
keyword2:{
value:key2,
color:"#707070"
},
remark:{
value:remark,
color:"#707070"
}
}
}
data
end
def four_keys_template(openid, template_id, type, id, first, key1, key2, key3, key4, remark="")
data = {
touser:openid,
template_id:template_id,
url:"#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}",
topcolor:"#FF0000",
data:{
first: {
value:first,
color:"#707070"
},
keyword1:{
value:key1,
color:"#707070"
},
keyword2:{
value:key2,
color:"#707070"
},
keyword3:{
value:key3,
color:"#707070"
},
keyword4:{
value:key4,
color:"#707070"
},
remark:{
value:remark,
color:"#707070"
}
}
}
data
end
def binding_succ_notice(user_id, first, key1, key2)
uw = UserWechat.where(user_id: user_id).first
unless uw.nil?
data = {
touser:uw.openid,
template_id:Wechat.config.binding_succ_notice,
url:"#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities",
topcolor:"#FF0000",
data:{
first: {
value:first,
color:"#707070"
},
keyword1:{
value:key1,
color:"#707070"
},
keyword2:{
value:key2,
color:"#707070"
},
remark:{
value:"绑定成功后可使用微信查看Trustie平台最新动态",
color:"#707070"
}
}
}
begin
req = Wechat.api.template_message_send Wechat::Message.to(uw.openid).template(data)
rescue Exception => e
Rails.logger.error "[homework] ===> #{e}"
end
Rails.logger.info "send over. #{req}"
end
end
def journal_notice(user_id, type, id, first, key1, key2, remark="")
uw = UserWechat.where(user_id: user_id).first
unless uw.nil?
data = two_keys_template uw.openid,Wechat.config.journal_notice, type, id, first, key1, key2, remark
begin
req = Wechat.api.template_message_send Wechat::Message.to(uw.openid).template(data)
rescue Exception => e
Rails.logger.error "[homework] ===> #{e}"
end
Rails.logger.info "send over. #{req}"
end
end
def homework_message_notice(user_id, type, id, first, key1, key2, remark="")
uw = UserWechat.where(user_id: user_id).first
unless uw.nil?
data = two_keys_template uw.openid,Wechat.config.homework_message_notice, type, id, first, key1, key2, remark
begin
req = Wechat.api.template_message_send Wechat::Message.to(uw.openid).template(data)
rescue Exception => e
Rails.logger.error "[homework] ===> #{e}"
end
Rails.logger.info "send over. #{req}"
end
end
def class_notice(user_id, type, id, first, key1, key2, key3, key4, remark="")
uw = UserWechat.where(user_id: user_id).first
unless uw.nil?
data = four_keys_template uw.openid,Wechat.config.class_notice, type, id, first, key1, key2, key3, key4, remark
begin
req = Wechat.api.template_message_send Wechat::Message.to(uw.openid).template(data)
rescue Exception => e
Rails.logger.error "[homework] ===> #{e}"
end
Rails.logger.info "send over. #{req}"
end
end
end

View File

@ -1,6 +1,11 @@
<% unless contributor_course_scor(course.id).count == 0 %>
<ul class="rankList">
<h4>课程活跃度
<h4>
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
<%= link_to "课程活跃度", course_member_path(course, :role => 2, :sort_type => 'act_score'), :class => '' %>
<% else %>
课程活跃度
<% end %>
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor: pointer; position:relative;">积分规则</a>
</h4>
<div class="numIntro undis" style="cursor:pointer;">

View File

@ -1,7 +1,12 @@
<% hero_homework_scores = hero_homework_score(course, "desc") %>
<% unless hero_homework_scores.map(&:score).detect{|s| s.to_i != 0}.nil? %>
<ul class="rankList">
<h4><span>课程英雄榜</span>
<h4>
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
<%= link_to "课程英雄榜", course_member_path(course, :role => 2), :class => '' %>
<% else %>
<span>课程英雄榜</span>
<% end %>
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor:pointer;">积分规则</a></h4>
<div style="cursor:pointer;" class="numIntro undis">
<div class="hero-degree-rule">积分规则<br/>

View File

@ -9,7 +9,7 @@
<div class="ping_distop f14">
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
<span>
<%= link_to "#{journal.user.show_name}(#{journal.user.login})", user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%>
<%= link_to journal.user.show_name, user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%>
</span>
<span class="c_grey fr f14">
<%= format_time(journal.created_on) %>

View File

@ -26,7 +26,7 @@
<li class="ml10" style="padding-right: 15px;"><span class="fontGrey6 fb">学号</span></li>
<li style="padding-right: 55px; margin-left: 160px;"><span class="fontGrey6 fb">分班</span></li>
<li class="st_list_score ml10">
<%= link_to '作业积分', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml25'%>
<%= link_to '英雄榜', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml35'%>
<% if @sort_type == "score" && @score_sort_by == 'desc' %>
<a id="pic" href="javascript:" class= "st_down"></a>
<% elsif @sort_type == "score" && @score_sort_by == 'asc' %>
@ -51,17 +51,9 @@
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %>
</a>
<ul>
<% if @canShowCode %>
<li>
<% if member.user.show_name == ''%>
<%= link_to("#{l(:label_bidding_user_studentname)}<span >#{member.user.name}</span>".html_safe,user_path(member.user)) %>
<% else%>
<%= link_to("#{l(:label_bidding_user_studentname)}<span >#{member.user.show_name}</span>".html_safe,user_path(member.user)) %>
<%end%>
</li>
<% else %>
<li><%= link_to("#{l(:label_bidding_user_studentname)}<span >#{member.user.name}</span>".html_safe, user_path(member.user)) %></li>
<% end %>
<li>
<%= link_to("#{l(:label_bidding_user_studentname)}<span >#{member.user.show_name}</span>".html_safe,user_path(member.user)) %>
</li>
<br/>
<% unless member.user.user_extensions.student_id == ''%>
<li><%= link_to("#{l(:label_bidding_user_studentcode)}<span >#{member.user.user_extensions.student_id}</span>".html_safe,user_path(member.user)) %></li>

View File

@ -1,10 +1,20 @@
<div id="popbox02">
<div class="ni_con">
<% if @homework.is_open == 0 %>
<% if @homework.is_open == 0 && @homework.course.is_public == 1 %>
<h2>公开作品</h2>
<p>
本次作业的所有作品将对Trustie平台所有注册用户开放请问是否确定公开作品
</p>
<% elsif @homework.is_open == 0 && @homework.course.is_public == 0 %>
<h2>公开作品</h2>
<p>
该作业是私有课程的作业,公开作品后本次作业的所有作品将对课程内的所有学生开放,请问是否确定公开作品?
</p>
<% elsif @homework.is_open == 1 && @homework.course.is_public == 0 %>
<h2>取消公开作品</h2>
<p>
您将取消“公开作品”的功能,该私有作业的作品将只在作业截止后对已提交作品的学生开放,请问是否确定?
</p>
<% else %>
<h2>取消公开作品</h2>
<p>

View File

@ -157,9 +157,9 @@
</div>
</div>
<div class="lg-foot" id="lg-foot" onclick="show_more_msg();">
<%= l(:label_expend_information)%>
<label id="expend_more_information" value="show_more"><%= l(:label_expend_information)%></label>
<span class="g-arr-down">
<img src="/images/jiantou.jpg" width="12" height="6" />
<img id="arrow" src="/images/jiantou.jpg" width="12" height="6" />
</span>
</div>
</div><!--项目简介 end-->

View File

@ -14,7 +14,7 @@
<%= javascript_include_tag 'attachments' %>
<%#= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<%#= yield :header_tags -%>
<!-- MathJax的配置 -->
<script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
@ -62,15 +62,66 @@
<div class="sn-header">
<div class="sn-row sn-bg-white">
<div class="sn-logo">
<%= render :partial => 'org_avater_swap', :org_logo_attchment => @org_logo_attchment %>
<% if @org_logo_attchment.blank? || !User.current.logged? %>
<img src="/images/org_new_style/logo.jpg" width="367" height="63" class="sn-mt13 sn-fl" alt=""/>
<% else %>
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" width="367" height="63" class="sn-mt13 sn-fl" alt="">
<% end %>
<% if User.current.admin_of_org?(@organization) %>
<a href="#" class="sn-logo-add" title="点击替换LOGO" onclick="org_new_files_upload();"></a>
<% end %>
<!--<a href="javascript:void(0);" class="sn-search-button sn-mt28"></a>-->
<!--<input type="text" class="sn-search-input sn-mt28" placeholder="搜索" />-->
<%= render :partial => 'organizations/org_logined_header' %>
</div>
</div>
<!--导航-->
<div class="sn-row sn-bg-blue sn-p-relative">
<%= render :partial => "org_field_menu", :locals => {:subfield_content => @subfield_content} %>
<ul class="sn-nav">
<% @subfield_content.each do |field| %>
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'activity' %>
<li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
<%= link_to "首页", organization_path(@organization), :class => "sn-link-white" %>
</li>
<% end %>
<% else %>
<% if field.field_type == "Post" && field.hide == 0 %>
<li class="nav-element">
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
<%= link_to field.name, show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "sn-link-white", :target => "_blank" %>
<% else %>
<%= link_to field.name, show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "sn-link-white", :target => "_blank" %>
<% end %>
<% else %>
<%= link_to field.name, organization_path(@organization, :org_subfield_id => field.id), :class => "sn-link-white", :target => "_blank" %>
<% end %>
</li>
<!--二级目录-->
<div class="sn-row sn-subnav-position sn-grey-opacity" style="display:none;">
<ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;">
<% field.sub_domains.each do |subdomain| %>
<li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey", :target => "_blank" %></li>
<li class="sn-subnav-slice">|</li>
<% end %>
</ul>
</div>
<% elsif field.field_type == "Resource" && field.hide == 0 %>
<li class="nav-element">
<%= link_to field.name, org_subfield_files_path(field), :class => "sn-link-white", :target => "_blank" %>
</li>
<% end %>
<% end %>
<% end %>
<% if User.current.admin_of_org?(@organization) %>
<li class="nav-element">
<a href="<%= setting_organization_path(@organization) %>" class="sn-link-white" target ="_blank">配置</a>
</li>
<% end %>
</ul>
</div>
</div>
</header>
@ -79,13 +130,56 @@
<%# over %>
<!--内容开始-->
<div class="sn-content">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div class="sn-content-left fl sn-mt15">
<% @subfield_content.each do |field| %>
<% if field.status.to_i == 1 %>
<%= render :partial => 'organizations/org_subfield_leftT', :locals => {:field => field} %>
<% elsif field.status.to_i == 3 %>
<%#= render :partial => 'organizations/org_subfield_leftM', :locals => {:field => field} %>
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
<%= render :partial => 'organizations/org_subfield_leftM1', :locals => {:field => field} %>
<%= render :partial => 'organizations/org_subfield_leftM2', :locals => {:field => field} %>
<div class="cl"></div>
</div>
<% elsif field.status.to_i == 4 %>
<%= render :partial => 'organizations/org_subfield_leftMD', :locals => {:field => field} %>
<% elsif field.status.to_i == 5 %>
<%= render :partial => 'organizations/org_subfield_leftD', :locals => {:field => field} %>
<% end %>
<% end %>
</div>
<!--右侧-->
<div class="sn-content-right fr sn-mt15">
<% @subfield_content.each do |field| %>
<% if field.status.to_i == 6 %>
<%= render :partial => 'organizations/org_subfield_rightT', :locals => {:field => field} %>
<% elsif field.status.to_i == 7 %>
<%= render :partial => 'organizations/org_subfield_rightM', :locals => {:field => field} %>
<% elsif field.status.to_i == 8 %>
<%= render :partial => 'organizations/org_subfield_rightD', :locals => {:field => field} %>
<% elsif field.status.to_i == 23 %>
<%= render :partial => 'organizations/org_subfield_rightM2', :locals => {:field => field} %>
<% end %>
<% end %>
</div>
<div class="cl"></div>
</div>
<!--内容结束-->
<footer>
<%= render :partial => "org2_footer" %>
<!--footer-->
<div class="sn-row sn-bg-grey2">
<div class="sn-footer">
<ul class="sn-footer-link">
<li class="sn-mr50"><a href="<%= about_us_path %>" class="sn-link-white sn-f18">关于我们</a></li>
<li class="sn-mr50"><a href="<%= agreement_path %>" class="sn-link-white sn-f18">服务协议</a></li>
<li class="sn-mr50"><a href="http://forge.trustie.net/forums/1/memos/1168" class="sn-link-white sn-f18">帮助中心</a></li>
</ul>
<div class="sn-contact">联系人:魏小姐 | 电 话0731-84761282 | 传 真0731-84761268 | 邮 箱office@gnssopenlab.org</div>
<div class="sn-address">地 址湖南省长沙市开福区东风路89号观园大厦23层<br />
卫星导航仿真与测试开放实验室</div>
</div>
</div>
</footer>
<!--页面底部-->

View File

@ -104,10 +104,11 @@
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<% if @topic.author.id == User.current.id %>
<li>
<%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'postOptionLink') if @message.editable_by?(User.current) %>
</li>
<% if @topic.author.id == User.current.id %>
<li>
<%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic},:method => :post,
:data => {:confirm => l(:text_are_you_sure)},

View File

@ -14,10 +14,6 @@
<p id="e_tip" class="c_grey"></p>
<p id="e_tips" class="c_grey"></p>
<div class="cl"></div>
<div class="f14 fontGrey2">置顶显示&nbsp;:
<input type="checkbox" id="is_public" name="org_document_comment[status]" class="ml3" />(仅限模式二)
</div>
<div class="cl"></div>
<div class="mt10">
<div class="fl" id="topic_attachments">
<%= render :partial => 'org_document_comments/attachment', :locals => {:container => nil} %>

View File

@ -36,7 +36,7 @@
$('#doc_title_hint').hide();
}
</script>
<div class="resources" nhname="new_topic_form">
<div class="resources" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>;" nhname="new_topic_form">
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id), :id => 'new_org_document_form' do |f| %>
<div>
<input class="postDetailInput fl" maxlength="250" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" placeholder="请输入文章标题" />

View File

@ -5,7 +5,7 @@
showNormalImage('message_description_<%= @document.id %>');
});
</script>
<div class="resources" id="organization_document_<%= @document.id %>">
<div class="resources" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>;" id="organization_document_<%= @document.id %>">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(User.find(@document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(@document.creator_id) %>
@ -124,7 +124,7 @@
</div>
<div class="cl"></div>
<%# end %>
<% if User.current.logged?%>
<%# if User.current.logged?%>
<div class="talkWrapMsg" nhname="about_talk_reply">
<em class="talkWrapArrow"></em>
<div class="cl"></div>
@ -137,7 +137,7 @@
<div class="cl"></div>
</div>
</div>
<% end %>
<%# end %>
</div>
</div>

View File

@ -21,10 +21,10 @@
<li><a href="<%= register_url_without_domain %>" target="_blank" class=" ">注册</a></li>
</ul>
<% end %>
<div class="por_search fr">
<input type="text" class="pro_input_search fl" value="00000" />
<a href="javascript:void(0);" class="por_search_btn fl"></a>
</div>
<!--<div class="por_search fr">-->
<!--<input type="text" class="pro_input_search fl" value="00000" />-->
<!--<a href="javascript:void(0);" class="por_search_btn fl"></a>-->
<!--</div>-->
</div>
</div>
<div class="cl"></div>

View File

@ -9,7 +9,7 @@
<ul class="por_hotbar_left fl">
<% if acts.count > 1 %>
<% acts[1..2].each do |activity| %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<li>
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
@ -57,7 +57,7 @@
<% if acts.count > 3 %>
<% activity = acts[3] %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<li>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
@ -106,7 +106,7 @@
<%# if acts.count > 3 %>
<% activity = acts.first %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<div class="por_hotbar_right fl">
<% if get_image_path_from_content(document.content).nil? %>
@ -114,7 +114,7 @@
<% else %>
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
<% end %>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title link-black_r', :target => "_blank", :title => document.title %>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %></p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
</div>
@ -131,7 +131,7 @@
<% else %>
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_url_in_org(message.board.id, message.id), :target => "_blank" %>
<% end %>
<%= link_to title, board_message_url_in_org(message.board.id, message.id), :class => 'por_hot_title link-black_r', :target => "_blank", :title => title %>
<%= link_to title, board_message_url_in_org(message.board.id, message.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span><%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %></p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
</div>
@ -142,7 +142,7 @@
<% else %>
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(content)}", :width => "299", :height => "246"), board_message_path(message.board.id, message.id), :target => "_blank" %>
<% end %>
<%= link_to title, board_message_path(message.board.id, message.id), :class => 'por_hot_title link-black_r', :target => "_blank", :title => title %>
<%= link_to title, board_message_path(message.board.id, message.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span><%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %></p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
</div>
@ -157,7 +157,7 @@
<% else %>
<%= link_to image_tag("/files/uploads/image#{path}", :width => "299", :height => "246"), news_path(news), :target => "_blank" %>
<% end %>
<%= link_to news.title, news_path(news), :class => 'por_hot_title link-black_r', :target => "_blank", :title => news.title %>
<%= link_to news.title, news_path(news), :class => 'por_hot_title_r link-black', :target => "_blank", :title => news.title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(news.created_on) %></span><%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %></p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
</div>

View File

@ -30,7 +30,7 @@
<% else %>
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "140", :height => "100"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"fl" %>
<% end %>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.content, :maxheight => 80, :maxwordsnum => 56, :maxwidth => 0, :cl => "por_course_txt fl"} %>
<span class=" por_course_time"><%= time_from_now activity.updated_on %></span>
</div>
<% elsif act.org_act_type == "News" %>
@ -131,7 +131,7 @@
<%= render :partial => 'organizations/link_subfield_more', :locals => {:field => field} %>
</h2>
<% org_acts.first(4).each do |activity| %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<% org_subfield_id = params[:org_subfield_id] %>
<% iamge_path = get_image_path_from_content(document.content) %>

View File

@ -9,7 +9,7 @@
<div class="por_post_left fl">
<div class="por_post_leftbar ">
<% activity = acts.first %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<% if get_image_path_from_content(document.content).nil? %>
<%= link_to image_tag("/images/default_blank/mo-3.jpg", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
@ -70,52 +70,51 @@
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 40, :maxwordsnum => 60, :maxwidth => 0, :cl => "por_post_txt"} %>
<% end %>
<% end %>
<% unless acts[1..5].nil? %>
<% acts[1..5].each do |activity| %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% document = activity.org_act %>
<ul class="por_post_list">
<li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
</ul>
<% else activity.container_type == 'OrgSubfield' %>
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
<% message = Message.find(activity.org_act_id) %>
<% if message.board.org_subfield_id %>
<ul class="por_post_list">
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
<% else %>
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
<% end %>
</ul>
<% else %>
<ul class="por_post_list">
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_path(message.board,message), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
<% else %>
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_path(message.board, message), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
<% end %>
</ul>
<% end %>
<% end %>
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
<% news = News.find(activity.org_act_id) %>
<% iamge_path = get_image_path_from_content(news.description) %>
<ul class="por_post_list">
<li><%= link_to "<span class='post_icons_grey fl'></span>#{news.title}".html_safe, news_path(news), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
</ul>
<% end %>
<% end %>
<% end %>
<% end %>
</div>
<% unless acts[1..5].nil? %>
<% acts[1..5].each do |activity| %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<ul class="por_post_list">
<li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
</ul>
<% else activity.container_type == 'OrgSubfield' %>
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
<% message = Message.find(activity.org_act_id) %>
<% if message.board.org_subfield_id %>
<ul class="por_post_list">
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
<% else %>
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_url_in_org(message.board.id, message.id), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
<% end %>
</ul>
<% else %>
<ul class="por_post_list">
<% if message.parent_id.nil? %> <!--+"(帖子标题)"-->
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.subject}".html_safe, board_message_path(message.board,message), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
<% else %>
<li><%= link_to "<span class='post_icons_grey fl'></span>#{message.parent.subject}".html_safe, board_message_path(message.board, message), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
<% end %>
</ul>
<% end %>
<% end %>
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
<% news = News.find(activity.org_act_id) %>
<% iamge_path = get_image_path_from_content(news.description) %>
<ul class="por_post_list">
<li><%= link_to "<span class='post_icons_grey fl'></span>#{news.title}".html_safe, news_path(news), class: 'por_hidden_w390 link-black', :target => "_blank" %></li>
</ul>
<% end %>
<% end %>
<% end %>
<% end %>
</div>
<% unless acts[6..19].nil? %>
<div class="fl">
<ul class="por_post_right por_post_list">
<% acts[6..19].each do |activity| %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
<% else activity.container_type == 'OrgSubfield' %>

View File

@ -3,20 +3,22 @@
<% if containers.blank? %>
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
<% else %>
<% container = containers.first %>
<li class="por_project_li">
<%= link_to "<span class='post_icons_grey fl'></span>#{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 link-black fl", :title => container.name, :target => "_blank" %>
<p class="fr por_time">活跃度<a class="ml5" ><%= static_project_score(container.project_score) %></a></p>
<div class="cl"></div>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => container.id, :content=> container.description, :maxheight => 40, :maxwordsnum => 48, :maxwidth => 0, :cl => "por_project_p"} %>
</li>
<ul>
<% container = containers.first %>
<li class="por_project_li">
<%= link_to "<span class='post_icons_grey fl'></span>#{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 link-black fl", :title => container.name, :target => "_blank" %>
<p class="fr por_time">活跃度<a class="ml5" ><%= static_project_score(container.project_score) %></a></p>
<div class="cl"></div>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => container.id, :content=> container.description, :maxheight => 40, :maxwordsnum => 55, :maxwidth => 0, :cl => "por_project_p"} %>
</li>
<% containers[1..4].each do |container| %>
<li>
<%= link_to "<span class='post_icons_grey fl'></span>#{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 link-black fl", :title => container.name, :target => "_blank" %>
<p class="fr por_time">活跃度<a class="ml5" ><%= static_project_score(container.project_score) %></a></p>
<div class="cl"></div>
</li>
<% end %>
<% containers[1..4].each do |container| %>
<li>
<%= link_to "<span class='post_icons_grey fl'></span>#{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 link-black fl", :title => container.name, :target => "_blank" %>
<p class="fr por_time">活跃度<a class="ml5" ><%= static_project_score(container.project_score) %></a></p>
<div class="cl"></div>
</li>
<% end %>
</ul>
<% end %>
</div><!--por_projects end-->

View File

@ -31,8 +31,9 @@
<% end %>
</li>
<% if ( (User.current.id == member.organization.creator_id || User.current.admin_of_org?(member.organization) ) && member.user_id != member.organization.creator_id )%>
<a href="javascript:void(0);" style="color: #0781B4;margin-left: 30px;float: left" onclick="$(this).parent().height(70);$('#org-member-<%= member.id%>-roles-form').show();">编辑</a>
<a href="javascript:void(0);" style="color: #0781B4;margin-left: 30px;float: left" onclick="$(this).parent().height();$('#org-member-<%= member.id%>-roles-form').show();">编辑</a>
<%= link_to '删除', Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,:method=>'delete',:style=>'color: #0781B4;margin-left: 30px;float: left',:confirm=>'您确定要删除么?', :remote => true %><% end %>
<div class="cl"></div>
</ul>
<div class="cl"></div>
<% end %>

View File

@ -33,12 +33,12 @@
function hide(content, id){
if (content.text() == '设为学霸')
$.ajax({
url: "/organizations/set_excellent_teacher?user=" + id + "&type=student",
url: "/organizations/set_excellent_student?user=" + id ,
type: "post"
});
else
$.ajax({
url: "/organizations/reset_excellent_teacher?user=" + id + "&type=student",
url: "/organizations/reset_excellent_student?user=" + id ,
type: "post"
});
}

View File

@ -115,17 +115,21 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %>
</div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= act.id %>' style="display:none;">
<%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
<input type="hidden" name="org_activity_id" value="<%= act.id %>"/>
<div nhname='toolbar_container_<%= act.id %>'></div>
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="org_content"></textarea>
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
<% if User.current.logged? %>
<div nhname='new_message_<%= act.id %>' style="display:none;">
<%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
<input type="hidden" name="org_activity_id" value="<%= act.id %>"/>
<div nhname='toolbar_container_<%= act.id %>'></div>
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="org_content"></textarea>
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= act.id %>'></p>
<% end %>
</div>
<div class="cl"></div>
<p nhname='contentmsg_<%= act.id %>'></p>
<% end %>
</div>
<% else %>
<%= render :partial => "users/show_unlogged" %>
<% end %>
</div>
<div class="cl"></div>
</div>

View File

@ -0,0 +1 @@
$("#hide_<%= @ex_student.id %>").text("设为学霸");

View File

@ -1 +1 @@
$("#hide_<%= @ex_teacher.id %>").text(<%= params[:type]== "student" ? "设为学霸" : "设为名师"%>);
$("#hide_<%= @ex_teacher.id %>").text("设为名师");

View File

@ -0,0 +1 @@
$("#hide_<%= @ex_student.id %>").text("取消设置");

View File

@ -6,7 +6,7 @@
<div class="ping_discon" style="width: 610px;">
<div class="ping_distop f14">
<!-- <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), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %>
<span><%= link_to journal.user.show_name, user_path(journal.user), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %>
</span><span class="c_grey fr f14"><%= format_time(journal.created_on) %></span>
<div class="cl"></div>
<!--<p><%#= textilizable journal.notes%></p>-->

View File

@ -30,6 +30,11 @@
<input id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
<div class="cl"></div>
</li>
<li >
<label class="label02">隐藏代码库&nbsp;&nbsp;</label>
<input id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
<div class="cl"></div>
</li>
</ul>
<a href="javascript:void(0)" class="blue_btn ml110" onclick="submit_edit_project(<%= @project.id %>);" >保存</a>
<% end %>

View File

@ -29,13 +29,16 @@
<!--CONTENT LIST-->
</div>
<% unless @project.gpid.nil? || @project.project_score.changeset_num == 0 || @project.rep_statics.blank? %>
<div class="resources mt10">
<div class="homepagePostBrief">
<%= render :partial => "rep_static" %>
<div class="cl"></div>
</div>
</div>
<%# 时间紧,权限待优化 %>
<% unless @project.hidden_repo && !User.current.member_of?(@project) && !User.current.admin? %>
<% unless @project.gpid.nil? || @project.project_score.changeset_num == 0 || @project.rep_statics.blank? %>
<div class="resources mt10">
<div class="homepagePostBrief">
<%= render :partial => "rep_static" %>
<div class="cl"></div>
</div>
</div>
<% end %>
<% end %>
<%= render :partial => "project_activities", :locals => {:forge_acts => @events_pages, :page => 0, :type => @type} %>

View File

@ -36,7 +36,7 @@
$('#doc_title_hint').hide();
}
</script>
<div class="resources" nhname="new_topic_form">
<div class="resources" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>;" nhname="new_topic_form">
<%= form_tag org_subfield_sub_domain_sub_document_comments_path(:org_subfield_id => @org_subfield.id, :sub_domain_id => @subdomain.id), :id => 'new_sub_document_form' do |f| %>
<div>
<input class="postDetailInput fl" maxlength="250" name="sub_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#sub_document_editor').show();" placeholder="请输入文章标题" />

View File

@ -8,7 +8,7 @@
showNormalImage('message_description_<%= @document.id %>');
});
</script>
<div class="resources" id="organization_document_<%= @document.id %>">
<div class="resources" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>;" id="organization_document_<%= @document.id %>">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(User.find(@document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(@document.creator_id) %>
@ -138,7 +138,7 @@
</div>
<div class="cl"></div>
<%# end %>
<% if User.current.logged?%>
<%# if User.current.logged?%>
<div class="talkWrapMsg" nhname="about_talk_reply">
<em class="talkWrapArrow"></em>
<div class="cl"></div>
@ -151,7 +151,7 @@
<div class="cl"></div>
</div>
</div>
<% end %>
<%# end %>
</div>
</div>

View File

@ -66,11 +66,7 @@
<div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
</span>
</div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
@ -108,11 +104,7 @@
<% end %>
<%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
</span>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">

View File

View File

@ -1,4 +1,22 @@
<% if @wechat_user %>
<div class="page">
<div class="weui_msg">
<div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
<div class="weui_text_area">
<h2 class="weui_msg_title">操作成功</h2>
<p class="weui_msg_desc">您已经绑定过微信了,用户名: (<%= @wechat_user.user.login %>)</p>
</div>
<div class="weui_opr_area">
<p class="weui_btn_area">
<a onclick="WeixinJSBridge.call('closeWindow');" class="weui_btn weui_btn_primary">确定</a>
</p>
</div>
</div>
</div>
<% else %>
<div class="loginIn">
<div>
<p class="weui_cells_title wechat-error">
@ -62,4 +80,7 @@
})
});
</script>
</script>
<% end %>

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html ng-app="wechat">
<head>
<title>最新动态</title>
<meta charset='utf-8' />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="apple-mobile-web-app-capable" content="no">
<meta content='True' name='HandheldFriendly' />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<link type="text/css" rel="stylesheet" href="/stylesheets/weui/weixin.css" />
<script type="text/javascript">
window.g_openid = '<%= @wechat_user.openid %>';
</script>
</head>
<body>
<div ng-view>
</div>
<script src="/javascripts/wechat/angular.js"></script>
<script src="/javascripts/wechat/angular-route.js"></script>
<script src="/javascripts/wechat/angular-sanitize.min.js"></script>
<script src="/javascripts/wechat/angular-cookies.js"></script>
<script src="/javascripts/jquery-1.3.2.js"></script>
<script src="/javascripts/wechat/app.js"></script>
</body>
</html>

View File

@ -13,10 +13,10 @@
</div>
<div class="recall_con f14">
<% id = 'project_respond_form_'+ reply.id.to_s %>
<%= link_to "#{reply.user.show_name}(#{reply.user.login})", user_path(reply.user) %>
<%= link_to reply.user.show_name, user_path(reply.user) %>
<%= l(:label_reply_to)%>
<% if show_name %>
<%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %>
<%= link_to parent_jour.user.show_name, user_path(parent_jour.user) %>
<% else %>
<%= l(:label_anonymous) %>
<% end %>

View File

@ -358,7 +358,7 @@ zh:
# 意见反馈
#
label_feedback: 意见反馈
label_feedback_tips: "请在此提问平台问题,或直接加入师姐答疑群,谢谢!"
label_feedback_tips: "请在此发布平台问题和建议,或直接加入答疑群,谢谢!"
label_technical_support: "QQ 在线支持:"
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
label_feedback_value: "该帖来自用户反馈:)"

View File

@ -2128,7 +2128,7 @@ zh:
label_resource_belongs_project: 所属项目
#微信模板消息
label_new_homework_template: 的课程有新作业了
label_new_homework_template: 有新作业了
label_update_homework_template: 您的作业已被修改
label_course_topic_template: 课程问答区有新帖子发布了
label_topic_comment_template: 您的帖子有新回复了

View File

@ -2,7 +2,7 @@ button:
-
type: "view"
name: "最新动态"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.course.trustie.net/assets/wechat/app.html#/activities?response_type=code&scope=snsapi_base&state=123#wechat_redirect"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.course.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
-
type: "click"
name: "意见反馈"

View File

@ -1245,6 +1245,7 @@ RedmineApp::Application.routes.draw do
resource :wechat, only:[:show, :create] do
collection do
get :login
get :user_activities
post :bind
post :get_open_id
end

View File

@ -11,6 +11,12 @@ default: &default
encoding_aes_key: "QyocNOkRmrT5HzBpCG54EVPUQjk86nJapXNVDQm6Yy6"
jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket"
#template
binding_succ_notice: "n4KLwcWNrIMYkKxWL2hUwzunm5RTT54EbWem2MIUapU"
journal_notice: "XpHHYkqSGkwuF9vHthRdmPQLvCFRQ4_NbRBP12T7ciE"
homework_message_notice: "Kom0TsYYKsNKCS6luweYVRo9z-mH0wRPr24b1clGCPQ"
class_notice: "8LVu33l6bP-56SDomVgHn-yJc57YpCwwJ81rAJgRONk"
production:
<<: *default

View File

@ -1,4 +1,4 @@
source 'https://rubygems.org'
source 'https://ruby.taobao.org/'
gemspec

View File

@ -1,4 +1,4 @@
source 'https://rubygems.org'
source 'https://ruby.taobao.org/'
# Specify your gem's dependencies in gitlab.gemspec
gemspec

View File

@ -1,4 +1,4 @@
source 'https://rubygems.org/'
source 'https://ruby.taobao.org/'
gemspec

View File

@ -1,4 +1,4 @@
source 'https://rubygems.org'
source 'https://ruby.taobao.org/'
gemspec

View File

@ -1,4 +1,4 @@
source "https://rubygems.org"
source "https://ruby.taobao.org/"
gemspec

View File

@ -1,4 +1,4 @@
source 'https://rubygems.org'
source 'https://ruby.taobao.org/'
gemspec

View File

@ -1,4 +1,4 @@
source 'https://rubygems.org/'
source 'https://ruby.taobao.org/'
gem 'rich', '1.4.6'
gem 'kaminari'

View File

@ -83,7 +83,8 @@ function _inString(val, str, delimiter) {
}
function _addUnit(val, unit) {
unit = unit || 'px';
return val && /^\d+$/.test(val) ? val + unit : val;
//return val && /^\d+$/.test(val) ? val + unit : val;
return val && /^-?\d+(?:\.\d+)?$/.test(val) ? val + unit : val;
}
function _removeUnit(val) {
var match;
@ -304,7 +305,7 @@ K.options = {
img : ['id', 'class', 'src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'],
'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [
'id', 'class', 'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background',
'.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left'
'.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left', '.margin', '.border', '.padding'
],
pre : ['id', 'class'],
hr : ['id', 'class', '.page-break-after'],
@ -597,7 +598,7 @@ function _ready(fn) {
}
_bind(window, 'load', readyFunc);
}
if (_IE) {
if (window.attachEvent) {
window.attachEvent('onunload', function() {
_each(_eventData, function(key, events) {
if (events.el) {
@ -2531,6 +2532,7 @@ K.START_TO_START = _START_TO_START;
K.START_TO_END = _START_TO_END;
K.END_TO_END = _END_TO_END;
K.END_TO_START = _END_TO_START;
function _nativeCommand(doc, key, val) {
try {
doc.execCommand(key, false, val);
@ -3361,6 +3363,10 @@ function _drag(options) {
});
}
clickEl.mousedown(function(e) {
//新加的
if(e.button !== 0 && e.button !== 1) {
return;
}
e.stopPropagation();
var self = clickEl.get(),
x = _removeUnit(moveEl.css('left')),
@ -3681,13 +3687,20 @@ _extend(KEdit, KWidget, {
if (isDocumentDomain) {
doc.domain = document.domain;
}
doc.write(_getInitHtml(themesPath, bodyClass, cssPath, cssData));
doc.close();
self.win = self.iframe[0].contentWindow;
self.doc = doc;
var cmd = _cmd(doc);
self.afterChange(function(e) {
cmd.selection();
// if (e.which == 8) {
// var range = cmd.range
// var bookmark = range.createBookmark();
// cmd.doc.body.innerHTML = cmd.doc.body.innerHTML.replace(/<p>\s*<\/p>/g,"");
// range.moveToBookmark(bookmark);
// }
cmd.selection();
});
if (_WEBKIT) {
K(doc).click(function(e) {
@ -3824,9 +3837,20 @@ _extend(KEdit, KWidget, {
if (!self.designMode) {
val = self.html();
self.designMode = true;
self.html(val);
//self.html(val);
//self.textarea.hide();
//self.iframe.show();
//新加
self.textarea.hide();
self.iframe.show();
self.html(val);
var iframe = self.iframe;
var height = _removeUnit(self.height);
iframe.height(height - 2);
iframe.show();
setTimeout(function() {
iframe.height(height);
}, 0);
}
} else {
if (self.designMode) {
@ -3958,7 +3982,7 @@ _extend(KToolbar, KWidget, {
}else if(!$("#full",container).is(':hidden')){
pdiv = $("#full",container);
}
return (this._itemMap[name] = K('span.ke-icon-' + name, pdiv).parent());
return (this._itemMap[name] = K('span.ke-icon-' + name, this.div).parent());
},
select : function(name) {
_selectToolbar.call(this, name, function(knode) {
@ -4864,6 +4888,11 @@ KEditor.prototype = {
},
loadPlugin : function(name, fn) {
var self = this;
//新加
var _pluginStatus = this._pluginStatus;
if (!_pluginStatus) {
_pluginStatus = this._pluginStatus = {};
}
if (_plugins[name]) {
if (!_isFunction(_plugins[name])) {
setTimeout(function() {
@ -4871,7 +4900,12 @@ KEditor.prototype = {
}, 100);
return self;
}
_plugins[name].call(self, KindEditor);
//_plugins[name].call(self, KindEditor);
//新加
if(!_pluginStatus[name]) {
_plugins[name].call(self, KindEditor);
_pluginStatus[name] = 'inited';
}
if (fn) {
fn.call(self);
}
@ -5510,6 +5544,11 @@ function _create(expr, options) {
_each(_plugins, function(name, fn) {
if (_isFunction(fn)) {
fn.call(editor, KindEditor);
//新加
if (!editor._pluginStatus) {
editor._pluginStatus = {};
}
editor._pluginStatus[name] = 'inited';
}
});
return editor.create();
@ -5772,13 +5811,14 @@ _plugin('core', function(K) {
click : function() {
self.select().exec('formatblock', '<' + key + '>').hideMenu();
//by yk利用html的特性使h1 h2 h3 h4标签之间不能相互包含 并将空的标签去掉
if (key != "p"){
// if (key != "p"){
var val = self.select().html();
self.select().html(val);
self.cmd.doc.body.innerHTML = self.cmd.doc.body.innerHTML.replace(/<p>\s*<\/p>/g,"");
val = self.select().html().replace(/(<h1>\s*<\/h1>)|(<h2>\s*<\/h2>)|(<h3>\s*<\/h3>)|(<h4>\s*<\/h4>)/g,"");
self.select().html(val);
self.select();
}
// }
}
});
});
@ -6059,6 +6099,9 @@ _plugin('core', function(K) {
} else {
cmd.range.selectNodeContents(div[0]);
cmd.select();
//新加
div[0].tabIndex = -1;
div[0].focus();
}
setTimeout(function() {
movePastedData();

View File

@ -27,9 +27,19 @@ KindEditor.plugin('autoheight', function(K) {
var edit = self.edit;
var body = edit.doc.body;
edit.iframe.height(minHeight);
//最高418 超过用滚动条
self.resize(null, Math.max(
(K.IE ? body.scrollHeight : body.offsetHeight)
(K.IE ? body.scrollHeight : body.offsetHeight) > 385 ? 385+33 : (K.IE ? body.scrollHeight : body.offsetHeight)
+ 33, minHeight));
if( self.height == "418px" ){
edit.iframe[0].scroll = 'yes';
body.style.overflowY = 'auto';
}
else{
hideScroll();
}
}
function init() {

View File

@ -42,6 +42,9 @@ KindEditor.plugin('code', function(K) {
yesBtn : {
name : self.lang('yes'),
click : function(e) {
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){
self.edit.html('');
}
var type = K('.ke-code-type', dialog.div).val(),
code = textarea.val(),
cls = type === '' ? '' : ' lang-' + type,

View File

@ -46,7 +46,7 @@
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;}
span.at {color:#269ac9;}
span.at a{color:#269ac9;text-decoration: none;}
@ -54,5 +54,5 @@ span.at a{color:#269ac9;text-decoration: none;}
.ke-content ol li{list-style-type: decimal;}
.ke-content ul li{list-style-type: disc;}
.ke-content ol,.ke-content ul,.ke-content h1,.ke-content h2,.ke-content h3,.ke-content h4{margin-top:0;margin-bottom: 0;}
.ke-content a{color: #15bccf;}
.ke-content a{color: #136ec2;}
.ke-content a:link,.ke-content a:visited{text-decoration:none;}

View File

@ -8,7 +8,7 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/homework/'+ ($(this).attr('dataID'))">
<div class="mb5" dataID = "{{act.act_id}}" ng-click="goDetail('homework',act.act_id, act.id)" id="act_{{act.id}}">
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
<div class="post-title hidden mb5">
<a herf="javascript:void(0);">
@ -18,7 +18,7 @@
<div class="post-title hidden">
<a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
<div class="cl"></div>
<div class="post-title mt5 mb5 hidden"><a ng-href="#/homework/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
<div class="post-title mt5 mb5 hidden"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
<div class="post-content c-grey3">
<div class="post-all-content mb5" ng-bind-html="act.description|safeHtml"></div>
<span class="mr15 f13 c-grey2">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f13 c-grey2">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br />
@ -29,8 +29,8 @@
</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f12 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-href="#/homework/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<a ng-if="!act.reply_count" ng-click="goDetail('homework',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-click="goDetail('homework',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
@ -44,12 +44,12 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/course_notice/'+ ($(this).attr('dataID'))">
<div class="mb5" dataID = "{{act.act_id}}" ng-click="goDetail('course_notice',act.act_id, act.id)" id="act_{{act.id}}">
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
<div class="post-title hidden"><a herf="javascript:void(0);" class="f13 c-grey2">{{act.course_project_name}}</a></div>
<div class="cl"></div>
<div class="post-title hidden mt5 mb5"><a ng-href="#/course_notice/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
<div class="post-title hidden mt5 mb5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
<div class="post-content c-grey3">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
</div>
@ -58,8 +58,8 @@
</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-href="#/course_notice/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<a ng-if="!act.reply_count" ng-click="goDetail('course_notice',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-click="goDetail('course_notice',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
@ -73,12 +73,12 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/course_discussion/'+ ($(this).attr('dataID'))">
<div class="mb5" dataID = "{{act.act_id}}" ng-click="goDetail('course_discussion',act.act_id, act.id)" id="act_{{act.id}}">
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
<div class="post-title hidden mb5"><a herf="javascript:void(0);" class="mr10">{{act.author.realname}}</a></div>
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
<div class="cl"></div>
<div class="post-title hidden mt5 mb5"><a ng-href="#/course_discussion/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
<div class="post-title hidden mt5 mb5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
<div class="post-content c-grey3">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
</div>
@ -87,8 +87,8 @@
</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-href="#/course_discussion/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<a ng-if="!act.reply_count" ng-click="goDetail('course_discussion',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-click="goDetail('course_discussion',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
@ -118,12 +118,12 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/issues/'+ ($(this).attr('dataID'))">
<div class="mb5" dataID = "{{act.act_id}}" ng-click="goDetail('issues',act.act_id, act.id)" id="act_{{act.id}}">
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
<div class="cl"></div>
<div class="post-title hidden mt5 mb5"><a ng-href="#/issues/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
<div class="post-title hidden mt5 mb5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
<div class="post-content c-grey3">
<div class="post-all-content mb5" ng-bind-html="act.description|safeHtml"></div>
<span class="mr15 f13 c-grey2">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15 f13 c-grey2">优先级:{{act.issue_detail.issue_priority}}</span> <br />
@ -134,8 +134,8 @@
</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-href="#/issues/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<a ng-if="!act.reply_count" ng-click="goDetail('issues',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-click="goDetail('issues',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
@ -150,12 +150,12 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/project_discussion/'+ ($(this).attr('dataID'))">
<div class="mb5" dataID = "{{act.act_id}}" ng-click="goDetail('project_discussion',act.act_id, act.id)" id="act_{{act.id}}">
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
<div class="post-title hidden"><a herf="javascript:void(0);" class="f12 c-grey2">{{act.course_project_name}}</a></div>
<div class="cl"></div>
<div class="post-title hidden mt5 mb5"><a ng-href="#/project_discussion/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
<div class="post-title hidden mt5 mb5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
<div class="post-content c-grey3">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
</div>
@ -164,8 +164,8 @@
</div>
<span class="c-grey f12 fl mr15 mt2">{{act.activity_type_name}}</span>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<a ng-if="!act.reply_count" ng-click="goDetail('project_discussion',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-click="goDetail('project_discussion',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
@ -175,7 +175,7 @@
</div>
</div>
<div ng-if="act.act_type=='ProjectCreateInfo'">
<div ng-if="act.act_type=='Project'">
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
@ -194,7 +194,7 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/journal_for_message/'+ ($(this).attr('dataID'))">
<div class="mb5" dataID = "{{act.act_id}}" ng-click="goDetail('journal_for_message',act.act_id, act.id)" id="act_{{act.id}}">
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
<div class="post-title mb5 hidden"><a herf="javascript:void(0);" class="mr10">{{act.author.realname}}</a></div>
<div class="post-title hidden"><span class="f12 c-grey">留言</span></div>
@ -207,8 +207,8 @@
<div class="cl"></div>
</div>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-href="#/journal_for_message/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<a ng-if="!act.reply_count" ng-click="goDetail('journal_for_message',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-click="goDetail('journal_for_message',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
@ -223,12 +223,12 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="mb5" dataID = "{{act.act_id}}" onclick="javascript:window.location.href='#/blog_comment/'+ ($(this).attr('dataID'))">
<div class="mb5" dataID = "{{act.act_id}}" ng-click="goDetail('blog_comment',act.act_id, act.id)" id="act_{{act.id}}">
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="40" height="40" class="border-radius" /></div>
<div class="post-title hidden mb5"><a herf="javascript:void(0);">{{act.author.realname}}</a></div>
<div class="post-title hidden"><span class="f12 c-grey">博客</span></div>
<div class="cl"></div>
<div class="post-title hidden mt5 mb5"><a ng-href="#/blog_comment/{{act.act_id}}" class="c-grey3 f15 fb">{{act.subject|safeHtml}}</a></div>
<div class="post-title hidden mt5 mb5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
<div class="post-content c-grey3">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
</div>
@ -236,8 +236,8 @@
<div class="cl"></div>
</div>
<span class="c-grey f13 fl mt2">{{act.latest_update}}</span>
<a ng-if="!act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-href="#/blog_comment/{{act.act_id}}" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<a ng-if="!act.reply_count" ng-click="goDetail('blog_comment',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="act.reply_count" ng-click="goDetail('blog_comment',act.act_id, act.id)" class="c-grey2 fr f12"><img src="/images/wechat/w_reply.png" height="15" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
<div class="c-grey fr f12 mr25" ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;"></span></div>
<div class="c-grey fr f12 mr25" ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
<div class="c-grey fr f12 mr25" ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" height="15" /><span style="vertical-align:top;">{{act.praise_count}}</span></div>
@ -249,8 +249,8 @@
</div>
<div ng-if="(count + page * 10) < all_count">
<div id="more_activities" class="more-events mt10" ng-click="loadActData(current_page+1);">更多</div>
<div ng-if="has_more">
<div id="more_activities" class="more-events mt10" ng-click="loadActData(page+1);">更多</div>
</div>
</div>

View File

@ -1,5 +1,6 @@
<!-- 模板1开始可以使用scripttype设置为text/html来存放模板片段并且用id标示 -->
<div loading-spinner></div>
<div ng-if="blog.act_type == 'BlogComment'">
<div class="post-container">
<div class="post-wrapper">
@ -7,9 +8,7 @@
<div class="post-title mb5"><span class="c-grey3 f15 fb">{{blog.title}}</span></div>
<div class="post-title"><a herf="javascript:void(0);" class="mr10">{{blog.user.realname}}</a>发表博客</div>
<div class="cl"></div>
<div class="post-content" style="height:auto;">
<div class="post-all-content c-grey3 mt10" ng-bind-html="blog.content|safeHtml"></div>
</div>
<div class="f13 c-grey3 mt10" ng-bind-html="blog.content|safeHtml"></div>
<div class="cl"></div>
<span class="c-grey f13 mt10 fl">{{blog.created_at}}</span>
<div class="cl"></div>
@ -40,7 +39,8 @@
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addBlogReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addBlogReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -1,5 +1,6 @@
<!-- 模板1开始可以使用scripttype设置为text/html来存放模板片段并且用id标示 -->
<div loading-spinner></div>
<div ng-if="discussion.act_type == 'Message'">
<div class="post-container">
<div loading-spinner></div>
@ -14,9 +15,7 @@
<td class="text-nowrap v-top">&nbsp;&nbsp;&nbsp;源:</td>
<td>{{discussion.course_project_name}}&nbsp;&nbsp;|&nbsp;&nbsp;课程问答区</td>
</tr></table>
<div class="post-content c-grey3 mt10" style="height:auto;">
<div class="post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
</div>
<div class="f13 c-grey3 mt10" ng-bind-html="discussion.content|safeHtml"></div>
<div class="cl"></div>
<span class="c-grey f13 mt10 fl">{{discussion.created_on}}</span>
<div class="cl"></div>
@ -47,7 +46,8 @@
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -1,5 +1,6 @@
<!-- 模板1开始可以使用scripttype设置为text/html来存放模板片段并且用id标示 -->
<div loading-spinner></div>
<div ng-if="news.act_type == 'News'">
<div class="post-container">
<div class="post-wrapper">
@ -13,9 +14,7 @@
<td class="text-nowrap v-top">&nbsp;&nbsp;&nbsp;源:</td>
<td>{{news.course_name}}&nbsp;&nbsp;|&nbsp;&nbsp;课程通知</td>
</tr></table>
<div class="post-content c-grey3 mt10" style="height:auto;">
<div class="post-all-content" ng-bind-html="news.description|safeHtml"></div>
</div>
<div class="f13 c-grey3 mt10" ng-bind-html="news.description|safeHtml"></div>
<div class="cl"></div>
<span class="c-grey f13 mt10 fl">{{news.created_on}}</span>
<div class="cl"></div>
@ -46,7 +45,8 @@
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addNoticeReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addNoticeReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -1,5 +1,6 @@
<!-- 模板1开始可以使用scripttype设置为text/html来存放模板片段并且用id标示 -->
<div loading-spinner></div>
<div ng-if="homework.act_type == 'HomeworkCommon'">
<div class="post-container">
<div class="post-wrapper">
@ -15,13 +16,11 @@
<td class="text-nowrap v-top">&nbsp;&nbsp;&nbsp;源:</td>
<td>{{homework.course_name}}&nbsp;&nbsp;|&nbsp;&nbsp;课程作业</td>
</tr></table>
<div class="post-content c-grey3 mt10" style="height:auto;">
<div class="post-all-content mb10" ng-bind-html="homework.description|safeHtml"></div>
<span class="c-grey">迟交扣分:{{homework.late_penalty}}分</span><br/>
<span ng-if="!homework.anonymous_comment" class="c-grey">缺评扣分:{{homework.absence_penalty}}分/作品<br /></span>
<span ng-if="!homework.anonymous_comment" class="c-grey">匿评开启时间:{{homework.evaluation_start}}<br /></span>
<span ng-if="!homework.anonymous_comment" class="c-grey">匿评关闭时间:{{homework.evaluation_end}}</span>
</div>
<div class="f13 c-grey3 mt10 mb10" ng-bind-html="homework.description|safeHtml"></div>
<span class="c-grey f13">迟交扣分:{{homework.late_penalty}}分</span><br/>
<span ng-if="!homework.anonymous_comment" class="c-grey f13">缺评扣分:{{homework.absence_penalty}}分/作品<br /></span>
<span ng-if="!homework.anonymous_comment" class="c-grey f13">匿评开启时间:{{homework.evaluation_start}}<br /></span>
<span ng-if="!homework.anonymous_comment" class="c-grey f13">匿评关闭时间:{{homework.evaluation_end}}</span>
<div class="cl"></div>
<span class="c-grey f13 mt10 fl">{{homework.publish_time}}</span>
<div class="cl"></div>
@ -52,7 +51,8 @@
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment"></textarea>
</div>
<button ng-click="addHomeworkReply(formData)" ng-disabled="formData.disabled" value="回复" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addHomeworkReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -1,5 +1,6 @@
<!-- 模板1开始可以使用scripttype设置为text/html来存放模板片段并且用id标示 -->
<div loading-spinner></div>
<div ng-if="issue.act_type == 'Issue'">
<div class="post-container">
<div class="post-wrapper">
@ -13,13 +14,11 @@
<td class="text-nowrap v-top">&nbsp;&nbsp;&nbsp;源:</td>
<td>{{issue.project_name}}&nbsp;&nbsp;|&nbsp;&nbsp;项目问题</td>
</tr></table>
<div class="post-content" style="height:auto;">
<div class="post-all-content c-grey3 mt10 mb10" ng-bind-html="issue.description|safeHtml"></div>
<span class="c-grey">&nbsp;&nbsp;&nbsp;态:{{issue.issue_status}}<br>
优先级:{{issue.issue_priority}}<br />
指派给:{{issue.issue_assigned_to}}<br />
完成度:{{issue.done_ratio}}%</span>
</div>
<div class="f13 c-grey3 mt10 mb10" ng-bind-html="issue.description|safeHtml"></div>
<span class="c-grey f13">&nbsp;&nbsp;&nbsp;态:{{issue.issue_status}}<br>
优先级:{{issue.issue_priority}}<br />
指派给:{{issue.issue_assigned_to}}<br />
完成度:{{issue.done_ratio}}%</span>
<div class="cl"></div>
<span class="c-grey f13 mt10 fl">{{issue.created_on}}</span>
<div class="cl"></div>
@ -50,8 +49,9 @@
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addIssueReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>
<button ng-click="addIssueReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
<!-- 模板1开始可以使用scripttype设置为text/html来存放模板片段并且用id标示 -->
<div loading-spinner></div>
<div ng-if="message.act_type == 'JournalsForMessage'">
<div class="post-container">
<div class="post-wrapper">
@ -6,9 +7,7 @@
<div class="post-title mb5"><a herf="javascript:void(0);" class="mr10">{{message.user.realname}}</a><span style="vertical-align:top;">给您留言了</span><br /></div>
<div class="post-title">{{message.created_on}}</div>
<div class="cl"></div>
<div class="post-content c-grey2 mt10" style="height:auto;">
<div class="post-all-content" ng-bind-html="message.notes|safeHtml"></div>
</div>
<div class="f13 c-grey3 mt10" ng-bind-html="message.notes|safeHtml"></div>
<div class="cl"></div>
</div>
<div class="post-interactive border-bottom">
@ -38,7 +37,8 @@
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addJournalReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addJournalReply(formData)" ng-hide="formData.disabled" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -1,5 +1,6 @@
<!-- 模板1开始可以使用scripttype设置为text/html来存放模板片段并且用id标示 -->
<div loading-spinner></div>
<div ng-if="discussion.act_type == 'Message'">
<div class="post-container">
<div class="post-wrapper">
@ -13,9 +14,7 @@
<td class="text-nowrap v-top">&nbsp;&nbsp;&nbsp;源:</td>
<td>{{discussion.course_project_name}}&nbsp;&nbsp;|&nbsp;&nbsp;项目讨论区</td>
</tr></table>
<div class="post-content c-grey3 mt10" style="height:auto;">
<div class="post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
</div>
<div class="f13 c-grey3 mt10" ng-bind-html="discussion.content|safeHtml"></div>
<div class="cl"></div>
<span class="c-grey f13 mt10 fl">{{discussion.created_on}}</span>
<div class="cl"></div>
@ -46,7 +45,8 @@
<textarea class="copy-input"></textarea>
<textarea input-auto type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" /></textarea>
</div>
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addDiscussionReply(formData)" ng-disabled="formData.disabled" ng-hide="formData.disabled" class="post-reply-submit fr mt10">回复</button>
<button ng-disabled="formData.disabled" ng-hide="!formData.disabled" class="post-reply-submit bg-grey fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -1353,15 +1353,15 @@ function autoUrl(id){
$("#"+id+" p,#"+ id +" span,#"+id+" em,#"+id+" h1,#"+id+" h2,#"+id+" h3,#"+id+" h4,#"+id+" strong,#"+id+" b,#"+id+" font,#"+id+" i").each(function(){
if ($(this).children().length == 0){
var html = $(this).text();
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|cn)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[A-Za-z0-9_\-\.~]+)*(\?[A-Za-z0-9+_\-\.%=&]*)?(\/([A-Za-z0-9_\-\.]*)(\?[A-Za-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
//没有://的都加上http://
var reStr = full;
if (full.length > 0){
if (full.indexOf("://") >= 0){
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
reStr = "<a style='color:#136ec2' target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
}
else{
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
reStr = "<a style='color:#136ec2' target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
}
}
return reStr ;
@ -1372,15 +1372,15 @@ function autoUrl(id){
}
else{
var html = $("#"+id).text();
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|cn)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[A-Za-z0-9_\-\.~]+)*(\?[A-Za-z0-9+_\-\.%=&]*)?(\/([A-Za-z0-9_\-\.]*)(\?[A-Za-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
//没有://的都加上http://
var reStr = full;
if (full.length > 0){
if (full.indexOf("://") >= 0){
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
reStr = "<a style='color:#136ec2' target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
}
else{
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
reStr = "<a style='color:#136ec2' target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
}
}
return reStr ;

View File

@ -475,6 +475,19 @@ function submitMemberSerch(content)
function show_more_msg()
{
$("#course_description").toggleClass("course_description_none");
var information = $("#expend_more_information");
var arrow = $("#arrow");
var val = information.attr("value");
if (val == "show_more") {
$("#expend_more_information").text("收起描述信息");
information.attr("value", "hide_more");
arrow.attr("src", "/images/jiantouup.jpg")
}
else {
$("#expend_more_information").text("展开更多信息");
information.attr("value", "show_more");
arrow.attr("src", "/images/jiantou.jpg")
}
}
//作业描述显示更多信息
function news_show_more_des(id)
@ -891,7 +904,11 @@ function regexDeadLine()
//新建、修改课程明码显示
$(function(){
$("#psw_btn").click(function() {
alert("密码: "+$("#course_course_password").val());
if($("#new_course_course_password").length > 0) {
alert("密码: "+$("#new_course_course_password").val());
} else if($("#edit_course_course_password").length > 0){
alert("密码: "+$("#edit_course_course_password").val());
}
});
});

View File

@ -7,9 +7,14 @@ if(debug===true){
apiUrl = 'https://www.trustie.net/api/v1/';
}
app.factory('auth', function($http,$routeParams, $cookies, $q){
var _openid = '';
if(typeof g_openid !== 'undefined'){
_openid = g_openid;
}
if(debug===true){
_openid = "1";
}
@ -62,16 +67,44 @@ app.factory('rms', function(){
return {save: save, get: get};
});
app.controller('ActivityController',function($scope, $http, auth, rms, common){
app.controller('ActivityController',function($anchorScroll, $location,$scope, $http, auth, rms, common){
$scope.replaceUrl = function(url){
return url;
};
console.log("ActivityController load");
$scope.activities = rms.get("activities") || [];
$scope.page = 0;
$scope.activities = rms.get("activities") || [];
var savePageConfig = function(){
rms.save('current_page', $scope.current_page);
rms.save('has_more', $scope.has_more);
rms.save('activities', $scope.activities);
}
var loadPageConfig = function(){
var current_page = rms.get('current_page');
var has_more = rms.get('has_more');
var activities = rms.get('activities');
if(typeof current_page !== 'undefined'){
$scope.page = current_page;
}
if(typeof has_more !== 'undefined'){
$scope.has_more = has_more;
}
}
var loadActData = function(page){
if (page <= 0 && $scope.activities.length >0){ //应该是返回过来的
loadPageConfig();
var yOffset = rms.get("yoffset");
$location.hash(yOffset);
return;
}
$scope.page = page;
$http({
method: 'POST',
@ -86,10 +119,12 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
} else {
$scope.activities = response.data.data;
}
$scope.current_page = response.data.page;
$scope.all_count = response.data.all_count;
$scope.count = response.data.count;
$scope.has_more = (response.data.count + response.data.page * 10) < response.data.all_count;
console.log(response.data);
rms.save('current_page', $scope.page);
rms.save('has_more', $scope.has_more);
rms.save('activities', $scope.activities);
}, function errorCallback(response) {
});
@ -105,6 +140,12 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
$scope.loadActData = loadActData;
//跳到详情页
$scope.goDetail = function(type, act_id,id){
rms.save("yoffset",'act_'+id);
$location.path('/'+type+'/'+act_id);
}
$scope.addPraise = function(act){
common.addCommonPraise(act);
};
@ -113,6 +154,8 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
common.decreaseCommonPraise(act);
};
});
app.factory('common', function($http, auth, $routeParams){
@ -480,37 +523,39 @@ app.directive('loadingSpinner', function ($http) {
});
app.config(['$routeProvider',"$httpProvider",function ($routeProvider, $httpProvider) {
var rootPath = '/assets/wechat/'
$routeProvider
.when('/activities', {
templateUrl: 'activities.html',
templateUrl: rootPath + 'activities.html',
controller: 'ActivityController'
})
.when('/issues/:id', {
templateUrl: 'issue_detail.html',
templateUrl: rootPath + 'issue_detail.html',
controller: 'IssueController'
})
.when('/project_discussion/:id', {
templateUrl: 'project_discussion.html',
templateUrl: rootPath + 'project_discussion.html',
controller: 'DiscussionController'
})
.when('/homework/:id', {
templateUrl: 'homework_detail.html',
templateUrl: rootPath + 'homework_detail.html',
controller: 'HomeworkController'
})
.when('/course_notice/:id', {
templateUrl: 'course_notice.html',
templateUrl: rootPath + 'course_notice.html',
controller: 'CourseNoticeController'
})
.when('/course_discussion/:id', {
templateUrl: 'course_discussion.html',
templateUrl: rootPath + 'course_discussion.html',
controller: 'DiscussionController'
})
.when('/journal_for_message/:id', {
templateUrl: 'jour_message_detail.html',
templateUrl: rootPath + 'jour_message_detail.html',
controller: 'JournalsController'
})
.when('/blog_comment/:id', {
templateUrl: 'blog_detail.html',
templateUrl: rootPath + 'blog_detail.html',
controller: 'BlogController'
})
.otherwise({

View File

@ -151,7 +151,8 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #15bccf;}
.homepagePostIntro a{color: #136ec2;}
.homepagePostIntro blockquote{background: none;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
@ -193,7 +194,8 @@ a.postOptionLink2:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyContent a{color: #15bccf;}
.homepagePostReplyContent a{color: #136ec2;}
.homepagePostReplyContent blockquote{background: none;}
.table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
@ -301,6 +303,7 @@ a:hover.talk_btn{ background:#2a9dc1;}
/****讨论区内页***/
.mt0{ margin-top:0px !important;}
.talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;}
.talk_info a{ color:#15bccf; }
a.talk_edit{ color:#269ac9; margin-right:5px;}
a:hover.talk_edit{ color:#297fb8;}
.talk_reply { background:#eeeeee; padding:10px; margin-bottom:10px;}
@ -441,7 +444,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_dispic a{ display:block; height:46px; width:46px; border:1px solid #CCC; padding:1px; float:left;}
.ping_dispic a:hover{border:1px solid #15bccf;}
.ping_discon{ float:left; width:610px; margin-left:10px; }
.ping_journal a{color: #15bccf;}
.ping_journal a{color: #136ec2;}
/*.ping_distop span{ float:left;}*/
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
@ -1140,7 +1143,8 @@ a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; paddin
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
.postDetailDes a{color: #15bccf;}
.postDetailDes a{color: #136ec2;}
.postDetailDes blockquote{background: none;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; }
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}

View File

@ -123,7 +123,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.list_style ol li{list-style-type: decimal;margin-left: 40px;}
.list_style ul li{list-style-type: disc;margin-left: 40px;}
.ping_distop span a{ float:right; /*width:20px;*/ height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}
.ping_journal a{color: #15bccf;}
.ping_journal a{color: #136ec2;}
/* 创建作业 */
.Newwork{ width:940px; border:1px solid #c3c3c3;}

View File

@ -682,7 +682,8 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #15bccf;}
.homepagePostIntro a{color: #136ec2;}
.homepagePostIntro blockquote{background: none;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
@ -722,7 +723,8 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyContent a{color: #15bccf;}
.homepagePostReplyContent a{color: #136ec2;}
.homepagePostReplyContent blockquote{background: none;}
.table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
@ -867,7 +869,8 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
.postDetailDes a{color: #15bccf;}
.postDetailDes a{color: #136ec2;}
.postDetailDes blockquote{background: none;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}

View File

@ -219,6 +219,7 @@ a:hover.talk_btn{ background:#2a9dc1;}
/****讨论区内页***/
.mt0{ margin-top:0px;}
.talk_info{ margin-left:60px; margin-top:10px;}
.talk_info a{ color:#15bccf; }
/*.issue_desc li{list-style-type: decimal;margin-left: 20px;}*/
.issue_desc ol li{list-style-type: decimal;margin-left: 40px;}
.issue_desc ul li{list-style-type: disc;margin-left: 40px;}
@ -333,7 +334,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
.ping_disfoot span a span{ color: #6883b6;}
.ping_journal a{color: #15bccf;}
.ping_journal a{color: #136ec2;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
.list_style ol li{list-style-type: decimal;margin-left: 40px;}
.list_style ul li{list-style-type: disc;margin-left: 40px;}
@ -976,7 +977,8 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #15bccf;}
.homepagePostIntro a{color: #136ec2;}
.homepagePostIntro blockquote{background: none;}
.topBorder {
border-top: 1px solid #E4E4E4;
}
@ -1118,7 +1120,8 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
.postDetailDes a{color: #15bccf;}
.postDetailDes a{color: #136ec2;}
.postDetailDes blockquote{background: none;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}

View File

@ -616,7 +616,8 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #15bccf;}
.homepagePostIntro a{color: #136ec2;}
.homepagePostIntro blockquote{background: none;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
@ -653,7 +654,8 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyContent a{color: #15bccf;}
.homepagePostReplyContent a{color: #136ec2;}
.homepagePostReplyContent blockquote{background: none;}
.table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;}

View File

@ -4,6 +4,16 @@
/*基本样式*/
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体";}
h1,h2,h3,h4,h5,p,pre {padding:0px; margin:0px;}
blockquote {
border:1px solid #d4d4d4;
padding: 0.6em;
margin-left: 1.4em;
margin-right: 0.4em;
border-radius: 4px;
font-family: "Microsoft YaHei";
background-size: 100% 100%;
margin-top:5px;
}
.f12 {font-size:12px;}
.f13 {font-size:13px;}
.f15 {font-size:15px;}
@ -84,3 +94,5 @@ a.underline {text-decoration:underline;}
/*帖子锁定样式*/
.locked_btn_cir {background: url("/images/locked.png") 0 0 no-repeat; cursor: default;}
.bg-grey {background-color:#c1c1c1;}