Merge branch 'weixin_guange' into develop
This commit is contained in:
commit
de46c5d9ca
|
@ -1 +0,0 @@
|
|||
{"access_token":"b_Pc60Dd5eyg_ut3cHbsjQO9EJJdj2Qj5F99o9LH9ltKSme7_FZ3Of22lWLL-K2V0siWzv-bd9PO0Dn-L1PBvIy9LhXa0qPVaFl6vTtZHR2kA8qjo1ps2ancya0t7KmzURGbAFAAXM","expires_in":7200,"got_token_at":1467976842}
|
|
@ -36,3 +36,4 @@ public/javascripts/wechat/node_modules/
|
|||
.ruby-version
|
||||
.access_token
|
||||
tmux*.log
|
||||
config/wechat.yml
|
||||
|
|
4
Gemfile
4
Gemfile
|
@ -49,9 +49,11 @@ gem 'kaminari'
|
|||
gem 'elasticsearch-model'
|
||||
gem 'elasticsearch-rails'
|
||||
|
||||
#rails 3.2.22.2 bug
|
||||
gem "test-unit", "~>3.0"
|
||||
|
||||
### profile
|
||||
gem 'oneapm_rpm'
|
||||
# gem 'oneapm_rpm'
|
||||
|
||||
group :development do
|
||||
gem 'grape-swagger'
|
||||
|
|
|
@ -20,13 +20,14 @@ module Mobile
|
|||
require_relative 'apis/praise'
|
||||
require_relative 'apis/resources'
|
||||
require_relative 'apis/syllabuses'
|
||||
require_relative 'apis/projects'
|
||||
|
||||
class API < Grape::API
|
||||
version 'v1', using: :path
|
||||
format :json
|
||||
content_type :json, "application/json;charset=UTF-8"
|
||||
use ActionDispatch::Session::CookieStore
|
||||
use Mobile::Middleware::ErrorHandler
|
||||
use Middleware::ErrorHandler
|
||||
|
||||
helpers do
|
||||
def logger
|
||||
|
@ -42,9 +43,9 @@ module Mobile
|
|||
end
|
||||
|
||||
def current_user
|
||||
openid = params[:openid]
|
||||
openid = session[:wechat_openid]
|
||||
if openid
|
||||
uw = UserWechat.find_by_openid(params[:openid])
|
||||
uw = UserWechat.find_by_openid(openid)
|
||||
return uw.user if uw
|
||||
end
|
||||
|
||||
|
@ -75,6 +76,7 @@ module Mobile
|
|||
mount Apis::Praise
|
||||
mount Apis::Resources
|
||||
mount Apis::Syllabuses
|
||||
mount Apis::Projects
|
||||
|
||||
add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development?
|
||||
|
||||
|
|
|
@ -419,6 +419,53 @@ module Mobile
|
|||
|
||||
end
|
||||
|
||||
desc "获取班级某成员角色信息"
|
||||
params do
|
||||
requires :id, type: Integer
|
||||
requires :token, type: String
|
||||
requires :user_id, type: Integer
|
||||
end
|
||||
post 'get_member_info' do
|
||||
authenticate!
|
||||
|
||||
c = Course.find("#{params[:id]}")
|
||||
|
||||
my_member = c.member_principals.where("users.id=#{params[:user_id]}").first
|
||||
|
||||
if my_member && my_member.roles[0]
|
||||
present :course_id,params[:id]
|
||||
present :user_id,params[:user_id]
|
||||
present :member_info,my_member, with: Mobile::Entities::ProjectMember
|
||||
present :status, 0
|
||||
else
|
||||
present :status, -1
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
desc "修改班级某成员角色信息"
|
||||
params do
|
||||
requires :id, type: Integer
|
||||
requires :token, type: String
|
||||
requires :user_id, type: Integer
|
||||
requires :role_id, type: Integer
|
||||
end
|
||||
post 'edit_member_role' do
|
||||
authenticate!
|
||||
|
||||
c = Course.find("#{params[:id]}")
|
||||
|
||||
#7教辅 9教师 10学生
|
||||
if c.tea_id == params[:user_id] || c.tea_id != current_user.id || !(params[:role_id] == 7 || params[:role_id] == 9 || params[:role_id] == 10)
|
||||
present :status, -1
|
||||
else
|
||||
|
||||
cs = CoursesService.new
|
||||
status = cs.modify_user_course_role params
|
||||
present :status, status
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,181 @@
|
|||
#coding=utf-8
|
||||
|
||||
module Mobile
|
||||
module Apis
|
||||
class Projects < Grape::API
|
||||
|
||||
resources :projects do
|
||||
desc "获取项目列表"
|
||||
params do
|
||||
requires :token, type: String
|
||||
end
|
||||
get do
|
||||
authenticate!
|
||||
|
||||
ps = ProjectsService.new
|
||||
projects = ps.user_projects(current_user)
|
||||
present :data, projects, with: Mobile::Entities::Project,user: current_user
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
desc "返回单个项目"
|
||||
params do
|
||||
requires :id, type: Integer
|
||||
requires :token,type:String
|
||||
end
|
||||
route_param :id do
|
||||
get do
|
||||
# course = Course.find(params[:id])
|
||||
ps = ProjectsService.new
|
||||
project = ps.show_project(params,current_user)
|
||||
|
||||
if project[:status] == 9
|
||||
{status:-1, message: '该项目不存在或已被删除啦' }
|
||||
else
|
||||
present :data, project, with: Mobile::Entities::Project,user: current_user
|
||||
present :status, 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "获取项目动态"
|
||||
params do
|
||||
requires :id, type: Integer
|
||||
requires :token, type: String
|
||||
end
|
||||
post 'activities' do
|
||||
authenticate!
|
||||
|
||||
user = current_user
|
||||
|
||||
project_types = "('Message','Issue','Project')"
|
||||
activities = UserActivity.where("(container_type = 'Project' and container_id = #{params[:id]} and act_type in #{project_types})").order('updated_at desc')
|
||||
|
||||
page = params[:page] ? params[:page] : 0
|
||||
all_count = activities.count
|
||||
activities = activities.limit(10).offset(page * 10)
|
||||
count = activities.count
|
||||
present :data, activities, with: Mobile::Entities::Activity,user: user
|
||||
present :all_count, all_count
|
||||
present :count, count
|
||||
present :page, page
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
desc "获取项目成员"
|
||||
params do
|
||||
requires :id, type: Integer
|
||||
requires :token, type: String
|
||||
end
|
||||
post 'members' do
|
||||
authenticate!
|
||||
|
||||
project = Project.find("#{params[:id]}")
|
||||
members = project.member_principals
|
||||
|
||||
master_members = project.member_principals.includes(:roles, :principal).where("member_roles.role_id=3").all.sort
|
||||
|
||||
master_members.each do |m|
|
||||
if m.user_id == project.user_id
|
||||
master_members.delete(m)
|
||||
master_members.insert(0,m)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
develop_members = project.member_principals.includes(:roles, :principal).where("member_roles.role_id=4").all.sort
|
||||
report_members = project.member_principals.includes(:roles, :principal).where("member_roles.role_id=5").all.sort
|
||||
|
||||
present :master_members,master_members, with: Mobile::Entities::ProjectMember
|
||||
present :develop_members,develop_members, with: Mobile::Entities::ProjectMember
|
||||
present :report_members,report_members, with: Mobile::Entities::ProjectMember
|
||||
present :status, 0
|
||||
end
|
||||
|
||||
desc "获取项目某成员角色信息"
|
||||
params do
|
||||
requires :id, type: Integer
|
||||
requires :token, type: String
|
||||
requires :user_id, type: Integer
|
||||
end
|
||||
post 'get_member_info' do
|
||||
authenticate!
|
||||
|
||||
project = Project.find("#{params[:id]}")
|
||||
|
||||
my_member = project.member_principals.where("users.id=#{params[:user_id]}").first
|
||||
|
||||
if my_member && my_member.roles[0]
|
||||
present :project_id,params[:id]
|
||||
present :user_id,params[:user_id]
|
||||
present :member_info,my_member, with: Mobile::Entities::ProjectMember
|
||||
present :status, 0
|
||||
else
|
||||
present :status, -1
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
desc "修改项目某成员角色信息"
|
||||
params do
|
||||
requires :id, type: Integer
|
||||
requires :token, type: String
|
||||
requires :user_id, type: Integer
|
||||
requires :role_id, type: Integer
|
||||
end
|
||||
post 'edit_member_role' do
|
||||
authenticate!
|
||||
|
||||
project = Project.find("#{params[:id]}")
|
||||
|
||||
my_member = project.member_principals.where("users.id=#{current_user.id}").first
|
||||
|
||||
#3管理 4开发 5报告
|
||||
if !(my_member && my_member.roles[0] && my_member.roles[0].id == 3 ) || project.user_id == params[:user_id] || !(params[:role_id] == 3 || params[:role_id] == 4 || params[:role_id] == 5)
|
||||
present :status, -1
|
||||
else
|
||||
ps = ProjectsService.new
|
||||
|
||||
status = ps.modify_user_project_role params
|
||||
|
||||
present :status, status
|
||||
end
|
||||
end
|
||||
|
||||
desc "新建项目"
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :name, type: String, desc: '项目名称'
|
||||
end
|
||||
post 'create' do
|
||||
authenticate!
|
||||
|
||||
ps = ProjectsService.new
|
||||
|
||||
status = ps.createNewProject params,current_user
|
||||
|
||||
|
||||
present :status, 0
|
||||
|
||||
end
|
||||
|
||||
desc "加入项目"
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :invite_code, type: String, desc: '邀请码'
|
||||
end
|
||||
post "join" do
|
||||
authenticate!
|
||||
|
||||
# ps = ProjectsService.new
|
||||
# status = ps.join_project({role: "5", openid: params[:openid], invite_code: params[:invite_code]}, current_user)
|
||||
#
|
||||
# present :status, status
|
||||
|
||||
{status:-1, message: '该功能将在近日开放,敬请期待!' }
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -13,8 +13,14 @@ module Mobile
|
|||
#0一级回复的更多 1 二级回复的更多
|
||||
type = params[:type] || 0
|
||||
page = params[:page] || 0
|
||||
homework = HomeworkCommon.find params[:id]
|
||||
present :data, homework, with: Mobile::Entities::Whomework,user: user,type: type,page: page
|
||||
|
||||
if type == 0
|
||||
homework = HomeworkCommon.find params[:id]
|
||||
present :data, homework, with: Mobile::Entities::Whomework,user: user,type: type,page: page,comment_type: "homework"
|
||||
else
|
||||
jour = JournalsForMessage.find params[:id]
|
||||
present :data, jour, with: Mobile::Entities::Jours,user: user,type: type,page: page,comment_type: "homework"
|
||||
end
|
||||
present :type, type
|
||||
present :page, page
|
||||
present :status, 0
|
||||
|
|
|
@ -51,9 +51,8 @@ module Mobile
|
|||
blog_comment_expose :id
|
||||
blog_comment_expose :locked
|
||||
blog_comment_expose :praise_count
|
||||
expose :blog_comment_children, using:Mobile::Entities::BlogComment do |c,opt|
|
||||
expose :all_children, using:Mobile::Entities::BlogComment do |c,opt|
|
||||
if c.is_a? (::BlogComment)
|
||||
##自己的父回复为空 才有子回复
|
||||
if !opt[:children]
|
||||
if c.parent.nil? && opt[:type] == 0
|
||||
opt[:children] = true
|
||||
|
@ -86,7 +85,7 @@ module Mobile
|
|||
#取二级回复的底楼层
|
||||
parents_reply = []
|
||||
parents_reply = get_reply_parents_no_root(parents_reply, c)
|
||||
if parents_reply.count > 0 && !opt[:bottom]
|
||||
if parents_reply.count > 0 && parents_reply.count != 2 && !opt[:bottom]
|
||||
if opt[:type] == 1
|
||||
# opt[:bottom] = true
|
||||
# parents_reply[opt[:page]..opt[:page]]
|
||||
|
@ -105,7 +104,7 @@ module Mobile
|
|||
#取二级回复的顶楼层
|
||||
parents_reply = []
|
||||
parents_reply = get_reply_parents_no_root(parents_reply, c)
|
||||
if parents_reply.count > 0 && !opt[:top]
|
||||
if parents_reply.count >= 2 && !opt[:top]
|
||||
if opt[:type] == 1
|
||||
opt[:bottom] = true
|
||||
tStart = (opt[:page]-1)*5+2
|
||||
|
|
|
@ -86,6 +86,15 @@ module Mobile
|
|||
expose :my_homework,using: Mobile::Entities::Homework do |f, opt|
|
||||
f[:my_homework] if f.is_a?(Hash) && f.key?(:my_homework)
|
||||
end
|
||||
expose :is_creator, if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
if instance[:course]
|
||||
course = instance[:course]
|
||||
else
|
||||
course = instance
|
||||
end
|
||||
current_user = options[:user]
|
||||
course.tea_id == current_user.id
|
||||
end
|
||||
course_expose :current_user_is_member
|
||||
course_expose :current_user_is_teacher
|
||||
course_expose :work_unit
|
||||
|
|
|
@ -22,10 +22,10 @@ module Mobile
|
|||
(get_user(issue.assigned_to_id)).login
|
||||
when :issue_status
|
||||
IssueStatus.find(issue.status_id).name
|
||||
when :journals_count
|
||||
# issue.journals.where("notes is not null and notes != ''").count
|
||||
all_comments = []
|
||||
get_all_children(all_comments, f).count
|
||||
when :comment_count
|
||||
issue.journals.where("notes is not null and notes != ''").count
|
||||
# all_comments = []
|
||||
# get_all_children(all_comments, f).count
|
||||
when :project_name
|
||||
issue.project.name
|
||||
when :praise_count
|
||||
|
@ -49,7 +49,7 @@ module Mobile
|
|||
issue_expose :issue_priority
|
||||
issue_expose :issue_assigned_to
|
||||
issue_expose :issue_status
|
||||
issue_expose :journals_count
|
||||
issue_expose :comment_count
|
||||
issue_expose :project_name
|
||||
issue_expose :praise_count
|
||||
expose :issue_journals, using: Mobile::Entities::Journal do |f, opt|
|
||||
|
|
|
@ -17,7 +17,7 @@ module Mobile
|
|||
case field
|
||||
when :lasted_comment
|
||||
time_from_now f.created_on
|
||||
when :reply_count
|
||||
when :comment_count
|
||||
# f.children.count
|
||||
all_comments = []
|
||||
get_all_children(all_comments, f).count
|
||||
|
@ -27,6 +27,8 @@ module Mobile
|
|||
'JournalsForMessage'
|
||||
when :act_id
|
||||
f.id
|
||||
when :content
|
||||
f.notes
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -42,10 +44,10 @@ module Mobile
|
|||
end
|
||||
jours_expose :created_on
|
||||
jours_expose :lasted_comment
|
||||
jours_expose :notes
|
||||
jours_expose :content
|
||||
jours_expose :m_reply_id
|
||||
jours_expose :m_parent_id
|
||||
jours_expose :reply_count
|
||||
jours_expose :comment_count
|
||||
jours_expose :praise_count
|
||||
expose :course,using:Mobile::Entities::Course do |f,opt|
|
||||
if f.is_a?(::JournalsForMessage) && f[:jour_type] == "Course"
|
||||
|
@ -55,9 +57,20 @@ module Mobile
|
|||
expose :reply_user,using: Mobile::Entities::User do |f, opt|
|
||||
f.at_user
|
||||
end
|
||||
expose :child_reply,using: Mobile::Entities::Jours do |f, opt|
|
||||
expose :all_children,using: Mobile::Entities::Jours do |f, opt|
|
||||
if f.is_a?(::JournalsForMessage)
|
||||
f.children.reverse
|
||||
# f.children.reverse
|
||||
if !opt[:children] && opt[:comment_type].nil?
|
||||
if f.parent.nil? && opt[:type] == 0
|
||||
opt[:children] = true
|
||||
all_comments = []
|
||||
tStart = opt[:page]*5
|
||||
tEnd = (opt[:page]+1)*5 - 1
|
||||
|
||||
all_comments = get_all_children(all_comments, f)[tStart..tEnd]
|
||||
all_comments
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
@ -67,6 +80,78 @@ module Mobile
|
|||
has_praise = obj.empty? ? false : true
|
||||
has_praise
|
||||
end
|
||||
|
||||
expose :parents_count, if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
parents_reply = []
|
||||
|
||||
if options[:comment_type].nil?
|
||||
parents_reply = get_reply_parents_no_root(parents_reply, instance)
|
||||
elsif options[:comment_type] == "homework"
|
||||
parents_reply = get_reply_parents(parents_reply, instance)
|
||||
end
|
||||
parents_reply.count
|
||||
end
|
||||
|
||||
expose :parents_reply_bottom, using:Mobile::Entities::Jours do |f,opt|
|
||||
if f.is_a? (::JournalsForMessage)
|
||||
#取二级回复的底楼层
|
||||
parents_reply = []
|
||||
if opt[:comment_type].nil?
|
||||
parents_reply = get_reply_parents_no_root(parents_reply, f)
|
||||
elsif opt[:comment_type] == "homework"
|
||||
parents_reply = get_reply_parents(parents_reply, f)
|
||||
end
|
||||
if parents_reply.count > 0 && parents_reply.count != 2 && !opt[:bottom]
|
||||
if opt[:type] == 1
|
||||
# opt[:bottom] = true
|
||||
# parents_reply[opt[:page]..opt[:page]]
|
||||
else
|
||||
opt[:bottom] = true
|
||||
parents_reply[0..0]
|
||||
end
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
expose :parents_reply_top, using:Mobile::Entities::Jours do |f,opt|
|
||||
if f.is_a? (::JournalsForMessage)
|
||||
#取二级回复的顶楼层
|
||||
parents_reply = []
|
||||
|
||||
if opt[:comment_type].nil?
|
||||
parents_reply = get_reply_parents_no_root(parents_reply, f)
|
||||
elsif opt[:comment_type] == "homework"
|
||||
parents_reply = get_reply_parents(parents_reply, f)
|
||||
end
|
||||
if parents_reply.count >= 2 && !opt[:top]
|
||||
if opt[:type] == 1
|
||||
opt[:bottom] = true
|
||||
tStart = (opt[:page]-1)*5+2
|
||||
tEnd = (opt[:page])*5+2 - 1
|
||||
|
||||
if tEnd >= parents_reply.count - 1
|
||||
tEnd = parents_reply.count - 2
|
||||
end
|
||||
|
||||
if tStart <= parents_reply.count - 2
|
||||
parents_reply = parents_reply.reverse[tStart..tEnd]
|
||||
parents_reply.reverse
|
||||
else
|
||||
[]
|
||||
end
|
||||
else
|
||||
opt[:top] = true
|
||||
parents_reply = parents_reply.reverse[0..1]
|
||||
parents_reply.reverse
|
||||
end
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module Mobile
|
|||
'Message'
|
||||
when :act_id
|
||||
u.id
|
||||
when :replies_count
|
||||
when :comment_count
|
||||
all_comments = []
|
||||
get_all_children(all_comments, u).count
|
||||
end
|
||||
|
@ -51,15 +51,26 @@ module Mobile
|
|||
message_expose :board_id
|
||||
message_expose :subject
|
||||
message_expose :content
|
||||
message_expose :replies_count
|
||||
message_expose :comment_count
|
||||
message_expose :praise_count
|
||||
message_expose :created_on
|
||||
message_expose :locked
|
||||
message_expose :id
|
||||
message_expose :lasted_comment
|
||||
expose :message_children,using:Mobile::Entities::Message do |c,opt|
|
||||
expose :all_children,using:Mobile::Entities::Message do |c,opt|
|
||||
if c.is_a? (::Message)
|
||||
c.children.reverse
|
||||
# c.children.reverse
|
||||
if !opt[:children]
|
||||
if c.parent.nil? && opt[:type] == 0
|
||||
opt[:children] = true
|
||||
all_comments = []
|
||||
tStart = opt[:page]*5
|
||||
tEnd = (opt[:page]+1)*5 - 1
|
||||
|
||||
all_comments = get_all_children(all_comments, c)[tStart..tEnd]
|
||||
all_comments
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
@ -69,6 +80,63 @@ module Mobile
|
|||
has_praise = obj.empty? ? false : true
|
||||
has_praise
|
||||
end
|
||||
|
||||
expose :parents_count, if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
parents_reply = []
|
||||
parents_reply = get_reply_parents_no_root(parents_reply, instance)
|
||||
parents_reply.count
|
||||
end
|
||||
|
||||
expose :parents_reply_bottom, using:Mobile::Entities::Message do |c,opt|
|
||||
if c.is_a? (::Message)
|
||||
#取二级回复的底楼层
|
||||
parents_reply = []
|
||||
parents_reply = get_reply_parents_no_root(parents_reply, c)
|
||||
if parents_reply.count > 0 && parents_reply.count != 2 && !opt[:bottom]
|
||||
if opt[:type] == 1
|
||||
# opt[:bottom] = true
|
||||
# parents_reply[opt[:page]..opt[:page]]
|
||||
else
|
||||
opt[:bottom] = true
|
||||
parents_reply[0..0]
|
||||
end
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
expose :parents_reply_top, using:Mobile::Entities::Message do |c,opt|
|
||||
if c.is_a? (::Message)
|
||||
#取二级回复的顶楼层
|
||||
parents_reply = []
|
||||
parents_reply = get_reply_parents_no_root(parents_reply, c)
|
||||
if parents_reply.count >= 2 && !opt[:top]
|
||||
if opt[:type] == 1
|
||||
opt[:bottom] = true
|
||||
tStart = (opt[:page]-1)*5+2
|
||||
tEnd = (opt[:page])*5+2 - 1
|
||||
|
||||
if tEnd >= parents_reply.count - 1
|
||||
tEnd = parents_reply.count - 2
|
||||
end
|
||||
|
||||
if tStart <= parents_reply.count - 2
|
||||
parents_reply = parents_reply.reverse[tStart..tEnd]
|
||||
parents_reply.reverse
|
||||
else
|
||||
[]
|
||||
end
|
||||
else
|
||||
opt[:top] = true
|
||||
parents_reply = parents_reply.reverse[0..1]
|
||||
parents_reply.reverse
|
||||
end
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -24,9 +24,8 @@ module Mobile
|
|||
'News'
|
||||
when :act_id
|
||||
f.id
|
||||
when :comments_count
|
||||
all_comments = []
|
||||
get_all_children(all_comments, f).count
|
||||
when :comment_count
|
||||
f.comments.count
|
||||
end
|
||||
end
|
||||
elsif f.is_a?(Hash) && !f.key?(field)
|
||||
|
@ -70,7 +69,7 @@ module Mobile
|
|||
#发布时间
|
||||
news_expose :created_on
|
||||
#评论数量
|
||||
news_expose :comments_count
|
||||
news_expose :comment_count
|
||||
news_expose :praise_count
|
||||
#课程名字
|
||||
news_expose :course_name
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class Project < Grape::Entity
|
||||
expose :name
|
||||
expose :id
|
||||
expose :user_id
|
||||
# expose :invite_code
|
||||
# expose :qrcode
|
||||
expose :can_setting, if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
current_user = options[:user]
|
||||
|
||||
my_member = instance.member_principals.where("users.id=#{current_user.id}").first
|
||||
can_setting = false
|
||||
if my_member && my_member.roles[0] && my_member.roles[0].id == 3
|
||||
can_setting = true
|
||||
end
|
||||
can_setting
|
||||
end
|
||||
|
||||
expose :is_creator, if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
current_user = options[:user]
|
||||
|
||||
current_user.id == instance.user_id
|
||||
end
|
||||
|
||||
|
||||
expose :member_count, if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
instance.members.count
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,35 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class ProjectMember < Grape::Entity
|
||||
include Redmine::I18n
|
||||
include ApplicationHelper
|
||||
include ApiHelper
|
||||
def self.member_expose(f)
|
||||
expose f do |u,opt|
|
||||
if u.is_a?(Hash) && u.key?(f)
|
||||
u[f]
|
||||
elsif u.is_a?(::Member)
|
||||
if u.respond_to?(f)
|
||||
u.send(f)
|
||||
else
|
||||
case f
|
||||
when :roles_id
|
||||
u.roles[0].id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
expose :user, using: Mobile::Entities::User do |c, opt|
|
||||
if c.is_a?(::Member)
|
||||
c.user
|
||||
end
|
||||
end
|
||||
|
||||
member_expose :roles_id
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -24,10 +24,12 @@ module Mobile
|
|||
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.brief_introduction
|
||||
when :student_num
|
||||
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.student_id
|
||||
when :realname
|
||||
u.nil? ? "" : get_user_realname(u)
|
||||
when :real_name
|
||||
u.nil? ? "" : get_user_realname(u).gsub(/\s*/,"");
|
||||
when :name
|
||||
u.nil? ? "" : u.show_name
|
||||
when :roles_id
|
||||
u[:roles_id].nil? ? nil : u.roles_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -37,11 +39,13 @@ module Mobile
|
|||
|
||||
expose :id
|
||||
#头像
|
||||
user_expose :img_url
|
||||
#昵称
|
||||
expose :nickname
|
||||
#真名
|
||||
user_expose :realname
|
||||
user_expose :img_url
|
||||
#昵称
|
||||
expose :realname
|
||||
#昵称
|
||||
user_expose :real_name
|
||||
#性别
|
||||
user_expose :gender
|
||||
#我的二维码
|
||||
|
@ -62,6 +66,8 @@ module Mobile
|
|||
|
||||
user_expose :role_name
|
||||
|
||||
user_expose :roles_id
|
||||
|
||||
user_expose :name
|
||||
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ module Mobile
|
|||
wh.nil? || wh.homework_detail_manual.nil? ? nil : convert_to_time(wh.homework_detail_manual.evaluation_end, 1)
|
||||
when :praise_count
|
||||
get_activity_praise_num(wh)
|
||||
when :whomework_journal_count
|
||||
when :comment_count
|
||||
wh.journals_for_messages.count
|
||||
when :course_name
|
||||
wh.course.name
|
||||
|
@ -58,6 +58,7 @@ module Mobile
|
|||
expose :anonymous_comment
|
||||
expose :quotes
|
||||
expose :is_open
|
||||
expose :id
|
||||
whomework_expose :act_type
|
||||
whomework_expose :act_id
|
||||
whomework_expose :course_name
|
||||
|
@ -66,11 +67,19 @@ module Mobile
|
|||
whomework_expose :evaluation_start
|
||||
whomework_expose :evaluation_end
|
||||
whomework_expose :praise_count
|
||||
whomework_expose :whomework_journal_count
|
||||
expose :journals_for_messages, using: Mobile::Entities::Jours do |f, opt|
|
||||
whomework_expose :comment_count
|
||||
expose :all_children, using: Mobile::Entities::Jours do |f, opt|
|
||||
#f[:journals_for_messages] if f.is_a?(Hash) && f.key?(:journals_for_messages)
|
||||
if f.is_a?(::HomeworkCommon)
|
||||
f.journals_for_messages.reverse
|
||||
# f.journals_for_messages.reverse
|
||||
if !opt[:children] && opt[:type] == 0
|
||||
opt[:children] = true
|
||||
tStart = opt[:page]*5
|
||||
tEnd = (opt[:page]+1)*5 - 1
|
||||
|
||||
all_comments = f.journals_for_messages.reorder("created_on desc")
|
||||
all_comments[tStart..tEnd]
|
||||
end
|
||||
end
|
||||
end
|
||||
expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options|
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#coding=utf-8
|
||||
#
|
||||
module Mobile
|
||||
module Exceptions
|
||||
class AuthException < StandardError
|
||||
attr_reader :err_code, :msg
|
||||
def initialize(code, msg)
|
||||
@err_code = code
|
||||
@msg = msg
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,3 +1,6 @@
|
|||
#coding=utf-8
|
||||
|
||||
|
||||
module Mobile
|
||||
module Middleware
|
||||
class ErrorHandler < Grape::Middleware::Base
|
||||
|
@ -6,7 +9,10 @@ module Mobile
|
|||
begin
|
||||
@app.call(@env)
|
||||
rescue =>e
|
||||
message = {status: 1, message: e.message }.to_json
|
||||
code = 1
|
||||
|
||||
message = {status: code, message: e.message }.to_json
|
||||
|
||||
Rails.logger.error e.inspect
|
||||
Rails.logger.error e.backtrace.join("\n")
|
||||
status = 200
|
||||
|
|
|
@ -636,8 +636,11 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
if @course
|
||||
#发送微信消息
|
||||
ss = SyllabusesService.new
|
||||
ss.send_wechat_create_class_notice User.current,@course
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{User.current.id} and shield_type='Course' and shield_id=#{@course.id}").count
|
||||
if count == 0
|
||||
ss = SyllabusesService.new
|
||||
ss.send_wechat_create_class_notice User.current,@course
|
||||
end
|
||||
respond_to do |format|
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
format.html {redirect_to course_url(@course)}
|
||||
|
|
|
@ -238,6 +238,10 @@ class ProjectsController < ApplicationController
|
|||
#end
|
||||
@project.members << m
|
||||
@project.project_infos << project_info
|
||||
|
||||
p = Project.find("#{@project.id}")
|
||||
ps = ProjectsService.new
|
||||
ps.send_wechat_create_project_notice User.current,p
|
||||
#end
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
|
|
|
@ -203,6 +203,7 @@ class SchoolController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
render :json =>status
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,10 +8,12 @@ class WechatsController < ActionController::Base
|
|||
# default text responder when no other match
|
||||
on :text do |request, content|
|
||||
#邀请码
|
||||
if join_request(request)
|
||||
if join_class_request(request)
|
||||
sendBindClass(request, {invite_code: content})
|
||||
# elsif join_project_request(request)
|
||||
# sendBindProject(request, {invite_code: content})
|
||||
else
|
||||
request.reply.text '您的意见已收到,感谢您的反馈!'
|
||||
request.reply.text "您的意见已收到,非常感谢~ \n更多问题可以通过以下方式联系我们:\n官方QQ群:173184401\n我们会认真聆听您的意见和建议。"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -143,11 +145,17 @@ class WechatsController < ActionController::Base
|
|||
end
|
||||
|
||||
on :click, with: 'PROJECT' do |request, key|
|
||||
request.reply.text "此功能正在开发中,很快就会上线,谢谢!"
|
||||
request.reply.text "该功能将在近日开放,敬请期待!"
|
||||
end
|
||||
|
||||
on :click, with: 'JOIN_PROJECT' do |request, key|
|
||||
request.reply.text "此功能正在开发中,很快就会上线,谢谢!"
|
||||
request.reply.text "该功能将在近日开放,敬请期待!"
|
||||
# uw = user_binded?(request[:FromUserName])
|
||||
# unless uw
|
||||
# sendBind(request)
|
||||
# else
|
||||
# request.reply.text "请直接回复6位项目邀请码\n(不区分大小写):"
|
||||
# end
|
||||
end
|
||||
|
||||
on :click, with: 'JOIN_CLASS' do |request, key|
|
||||
|
@ -159,12 +167,18 @@ class WechatsController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def join_request(request)
|
||||
def join_class_request(request)
|
||||
openid = request[:FromUserName]
|
||||
wl = WechatLog.where("openid = '#{openid}' and request_raw like '%\"Event\":\"click\"%'").order('id desc').first
|
||||
wl && JSON(wl.request_raw)["EventKey"] == 'JOIN_CLASS'
|
||||
end
|
||||
|
||||
def join_project_request(request)
|
||||
openid = request[:FromUserName]
|
||||
wl = WechatLog.where("openid = '#{openid}' and request_raw like '%\"Event\":\"click\"%'").order('id desc').first
|
||||
wl && JSON(wl.request_raw)["EventKey"] == 'JOIN_PROJECT'
|
||||
end
|
||||
|
||||
def sendBindClass(request, params)
|
||||
begin
|
||||
uw = user_binded?(request[:FromUserName])
|
||||
|
@ -180,6 +194,21 @@ class WechatsController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def sendBindProject(request, params)
|
||||
begin
|
||||
uw = user_binded?(request[:FromUserName])
|
||||
if !uw
|
||||
return sendBind(request)
|
||||
else
|
||||
return join_project(params, uw.user, request)
|
||||
end
|
||||
rescue => e
|
||||
logger.error e.inspect
|
||||
logger.error e.backtrace.join("\n")
|
||||
return request.reply.text e
|
||||
end
|
||||
end
|
||||
|
||||
def default_msg(request)
|
||||
uw = user_binded?(request[:FromUserName])
|
||||
if uw && uw.user
|
||||
|
@ -234,6 +263,36 @@ class WechatsController < ActionController::Base
|
|||
|
||||
end
|
||||
|
||||
def join_project(params, user, request)
|
||||
project = nil
|
||||
project = Project.where(qrcode: params[:ticket]).first if params[:ticket]
|
||||
project = Project.where(invite_code: params[:invite_code]).first if params[:invite_code]
|
||||
raise "项目不存在,请确认您的邀请码是否输入正确,谢谢!" unless project
|
||||
|
||||
#取出用户角色类型
|
||||
role = 5
|
||||
|
||||
ps = ProjectsService.new
|
||||
status = ps.join_project({invite_code: project.invite_code}, user)
|
||||
if status[:state] != 0
|
||||
raise ProjectService::JoinProjectError.message(status)
|
||||
end
|
||||
|
||||
creator = User.find(project.user_id)
|
||||
|
||||
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入项目,开始研发吧!',
|
||||
content: "项目名称:#{project.name}\n发起人:#{creator.name}\n进入项目,和小伙伴轻松的研发吧!"} }
|
||||
return request.reply.news(news) do |article, n, index| # article is return object
|
||||
url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{ROOT_URL+'/wechat/user_activities#/project?id='+project.id.to_s}&response_type=code&scope=snsapi_base&state=myproject#wechat_redirect"
|
||||
pic_url = "#{ROOT_URL}/images/wechat/class.jpg"
|
||||
article.item title: "#{n[:title]}",
|
||||
description: n[:content],
|
||||
pic_url: pic_url,
|
||||
url: url
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
### controller method
|
||||
module Controllers
|
||||
def get_bind
|
||||
|
@ -288,8 +347,7 @@ class WechatsController < ActionController::Base
|
|||
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'
|
||||
render 'wechats/user_activities', layout: nil
|
||||
end
|
||||
|
||||
def user_activities
|
||||
|
@ -299,13 +357,20 @@ class WechatsController < ActionController::Base
|
|||
unless open_id
|
||||
render 'wechats/open_wechat', layout: nil and return
|
||||
end
|
||||
if params[:state] == 'myclass'
|
||||
@course_id = params[:id];
|
||||
end
|
||||
|
||||
unless user_binded?(open_id)
|
||||
@path = '/login'
|
||||
else
|
||||
if params[:state] == 'myclass'
|
||||
@course_id = params[:id];
|
||||
elsif params[:state] == 'myproject'
|
||||
@project_id = params[:id];
|
||||
end
|
||||
|
||||
session[:wechat_openid] = open_id
|
||||
if params[:code]
|
||||
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
|
||||
session[:wechat_openid] = open_id
|
||||
if params[:code]
|
||||
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
|
||||
end
|
||||
end
|
||||
render 'wechats/user_activities', layout: nil
|
||||
end
|
||||
|
|
|
@ -165,6 +165,7 @@ class Project < ActiveRecord::Base
|
|||
scope :has_module, lambda {|mod|
|
||||
where("#{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name=?)", mod.to_s)
|
||||
}
|
||||
scope :not_deleted, lambda{where("status<>9")}
|
||||
scope :active, lambda { where(:status => STATUS_ACTIVE) }
|
||||
scope :status, lambda {|arg| where(arg.blank? ? nil : {:status => arg.to_i}) }
|
||||
scope :all_public, lambda { where(:is_public => true) }
|
||||
|
|
|
@ -89,7 +89,8 @@ class CoursesService
|
|||
@members = searchTeacherAndAssistant(c)
|
||||
when '2'
|
||||
#@subPage_title = l :label_student_list
|
||||
@members = searchStudent(c)
|
||||
# @members = searchStudent(c)
|
||||
@members = searchmember_by_name(student_homework_score(0,c.id, 0,"desc"),"")
|
||||
else
|
||||
#@subPage_title = ''
|
||||
@members = c.member_principals.includes(:roles, :principal).all.sort
|
||||
|
@ -104,6 +105,7 @@ class CoursesService
|
|||
:work_unit => work_unit, :mail => m.user.mail, :location => location,
|
||||
role_name: m.roles.first.name,
|
||||
name: m.user.show_name,
|
||||
roles_id: m.roles[0].id,
|
||||
:brief_introduction => m.user.user_extensions.brief_introduction,:realname=>m.user.realname}
|
||||
end
|
||||
users
|
||||
|
@ -954,5 +956,49 @@ class CoursesService
|
|||
# student_works[index + 1 .. index + n]
|
||||
# end
|
||||
|
||||
#修改班级成员角色
|
||||
def modify_user_course_role params
|
||||
status = -1
|
||||
|
||||
c = Course.find("#{params[:id]}")
|
||||
|
||||
member = c.member_principals.includes(:roles, :principal).where("user_id=?",params[:user_id]).first
|
||||
|
||||
if member
|
||||
role = Role.find(params[:role_id])
|
||||
|
||||
member.member_roles[0].role_id = params[:role_id]
|
||||
|
||||
# 这里的判断只能通过角色名,可以弄成常量
|
||||
if params[:role_id] == 10
|
||||
StudentsForCourse.create(:student_id => params[:user_id], :course_id =>params[:id])
|
||||
else
|
||||
joined = StudentsForCourse.where('student_id = ? and course_id = ?', params[:user_id],params[:id])
|
||||
joined.each do |join|
|
||||
join.delete
|
||||
end
|
||||
member.course_group_id = 0
|
||||
end
|
||||
if role.allowed_to?(:is_manager)
|
||||
courseInfo = CourseInfos.new(:user_id => params[:user_id], :course_id => params[:id])
|
||||
courseInfo.save
|
||||
else
|
||||
user_admin = CourseInfos.where("user_id = ? and course_id = ?", params[:user_id], params[:id])
|
||||
if user_admin.size > 0
|
||||
user_admin.each do |user|
|
||||
user.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Role.givable.all[3..5]
|
||||
|
||||
if member.member_roles[0].save
|
||||
status = 0
|
||||
end
|
||||
end
|
||||
status
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,145 @@
|
|||
#coding=utf-8
|
||||
|
||||
class ProjectsService
|
||||
|
||||
include ApplicationHelper
|
||||
|
||||
#获取指定用户的项目列表
|
||||
def user_projects(user)
|
||||
projects = user.projects.not_deleted.select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updated_at ").order("updated_at desc")
|
||||
projects
|
||||
end
|
||||
|
||||
#显示项目
|
||||
def show_project(params,current_user)
|
||||
project = Project.find(params[:id])
|
||||
# project.generate_invite_code
|
||||
# project.generate_qrcode
|
||||
|
||||
project
|
||||
end
|
||||
|
||||
def send_wechat_create_project_notice user,project
|
||||
count = ShieldWechatMessage.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count
|
||||
Rails.logger.info "!!!!!!!!!!!!!!!!!!!!!!#{project}"
|
||||
if count == 0
|
||||
ws = WechatService.new
|
||||
title = "恭喜您创建项目成功。"
|
||||
ws.create_project_notice user.id, "create_project_notice", project.id,title, project.name, format_time(project.created_on),"点击查看项目详情。"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def createNewProject params,user
|
||||
status = -1
|
||||
issue_custom_fields = IssueCustomField.sorted.all
|
||||
trackers = Tracker.sorted.all
|
||||
project = Project.new
|
||||
|
||||
project[:name] = params[:name]
|
||||
project[:description] = ''
|
||||
project[:is_public] = '1' #公开
|
||||
project[:project_type] = 0
|
||||
project[:project_new_type] = 1
|
||||
project[:identifier] = Project.next_identifier if Setting.sequential_project_identifiers?
|
||||
|
||||
project.organization_id = params[:organization_id]
|
||||
project.user_id = user.id
|
||||
|
||||
# if validate_parent_id && @project.save
|
||||
if project.save
|
||||
p = Project.find("#{project.id}")
|
||||
send_wechat_create_project_notice user,p
|
||||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||
m = Member.new(:user => user, :roles => [r])
|
||||
# project's score
|
||||
if ProjectScore.where("project_id=?", project.id).first.nil?
|
||||
ProjectScore.create(:project_id => project.id, :score => false)
|
||||
end
|
||||
# end
|
||||
project_info = ProjectInfo.new(:user_id => user.id, :project_id => project.id)
|
||||
user_grades = UserGrade.create(:user_id => user.id, :project_id => project.id)
|
||||
project_status = ProjectStatus.create(:project_id => project.id, :watchers_count => 0, :changesets_count => 0, :project_type => project.project_type,:grade => 0)
|
||||
project.members << m
|
||||
project.project_infos << project_info
|
||||
status = 0
|
||||
end
|
||||
status
|
||||
end
|
||||
|
||||
#修改项目成员角色
|
||||
def modify_user_project_role params
|
||||
status = -1
|
||||
|
||||
project = Project.find("#{params[:id]}")
|
||||
|
||||
member = project.member_principals.includes(:roles, :principal).where("user_id=?",params[:user_id]).first
|
||||
|
||||
if member
|
||||
member.member_roles[0].role_id = params[:role_id]
|
||||
|
||||
|
||||
role = Role.find(params[:role_id])
|
||||
if role.allowed_to?(:is_manager)
|
||||
projectInfo = ProjectInfo.new(:user_id => member.user_id, :project_id => project.id)
|
||||
projectInfo.save
|
||||
else
|
||||
user_admin = ProjectInfo.where("user_id = ? and project_id = ?", member.user_id, project.id)
|
||||
if user_admin.size > 0
|
||||
user_admin.each do |user|
|
||||
user.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if member.member_roles[0].save
|
||||
status = 0
|
||||
end
|
||||
end
|
||||
status
|
||||
end
|
||||
|
||||
class JoinProjectError < Errors
|
||||
define_error [
|
||||
0, '加入成功',
|
||||
1, '您的邀请码不正确',
|
||||
2, '您还未登录',
|
||||
3, '您已经是该项目的管理人员',
|
||||
4, '您已经是该项目的开发人员',
|
||||
5, '您已经是该项目的报告人员',
|
||||
6, '该项目不存在或已被删除啦',
|
||||
'未知错误,请稍后再试'
|
||||
]
|
||||
end
|
||||
|
||||
def join_project params,current_user
|
||||
status = -1
|
||||
project = project.find_by_invite_code(params[:invite_code]) if params[:invite_code]
|
||||
|
||||
if project
|
||||
if project[:is_delete] == 1
|
||||
status = 6
|
||||
else
|
||||
if current_user.member_of?(project) #如果已经是成员
|
||||
member = project.member_principals.includes(:roles, :principal).where("user_id=?",current_user.id).first
|
||||
status = member.member_roles[0].role_id
|
||||
else
|
||||
if params[:invite_code].present?
|
||||
members = []
|
||||
members << Member.new(:role_ids => [5], :user_id => current_user.id)
|
||||
project.members << members
|
||||
projectInfo = ProjectInfo.new(:user_id => current_user.id, :project_id => project.id)
|
||||
projectInfo.save
|
||||
status = 0
|
||||
else
|
||||
status = 4
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
status = 4
|
||||
end
|
||||
status
|
||||
end
|
||||
|
||||
end
|
|
@ -323,4 +323,41 @@ class WechatService
|
|||
end
|
||||
end
|
||||
|
||||
def create_project_notice(user_id, type, id, first, key1, key2,remark="")
|
||||
uw = UserWechat.where(user_id: user_id).first
|
||||
unless uw.nil?
|
||||
data = {
|
||||
touser:uw.openid,
|
||||
template_id:Wechat.config.create_project_notice,
|
||||
url:"#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/project?id="+id.to_s,
|
||||
topcolor:"#FF0000",
|
||||
data:{
|
||||
first: {
|
||||
value:first,
|
||||
color:"#707070"
|
||||
},
|
||||
keyword1:{
|
||||
value:key1,
|
||||
color:"#707070"
|
||||
},
|
||||
keyword2:{
|
||||
value:key2,
|
||||
color:"#707070"
|
||||
},
|
||||
remark:{
|
||||
value:remark,
|
||||
color:"#707070"
|
||||
}
|
||||
}
|
||||
}
|
||||
#data = three_keys_template uw.openid,Wechat.config.create_class_notice, type, id, first, key1, key2, key3, remark
|
||||
begin
|
||||
req = Wechat.api.template_message_send Wechat::Message.to(uw.openid).template(data)
|
||||
rescue Exception => e
|
||||
Rails.logger.error "[wechat_create_project_notice] ===> #{e}"
|
||||
end
|
||||
Rails.logger.info "send over. #{req}"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -18,6 +18,8 @@
|
|||
window.g_redirect_path = '<%= @path %>';
|
||||
<% if @course_id %>
|
||||
window.g_courseid = <%= @course_id %>;
|
||||
<% elsif @project_id %>
|
||||
window.g_projectid = <%= @project_id %>;
|
||||
<% end %>
|
||||
</script>
|
||||
|
||||
|
|
|
@ -30,11 +30,11 @@ button:
|
|||
type: "click"
|
||||
name: "加入项目"
|
||||
key: "JOIN_PROJECT"
|
||||
-
|
||||
type: "click"
|
||||
name: "反馈"
|
||||
key: "FEEDBACK"
|
||||
-
|
||||
type: "view"
|
||||
name: "历史推文"
|
||||
url: "http://mp.weixin.qq.com/mp/getmasssendmsg?__biz=MzIwOTM2NDkxMA==#wechat_webview_type=1&wechat_redirect"
|
||||
-
|
||||
type: "click"
|
||||
name: "联系我们"
|
||||
key: "FEEDBACK"
|
||||
|
|
|
@ -2,18 +2,22 @@ button:
|
|||
-
|
||||
type: "view"
|
||||
name: "我的动态"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=http://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=activities#wechat_redirect"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=activities#wechat_redirect"
|
||||
-
|
||||
name: "我的课程"
|
||||
name: "我的群组"
|
||||
sub_button:
|
||||
-
|
||||
type: "view"
|
||||
name: "课程"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=http://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
|
||||
name: "我的课程"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
|
||||
-
|
||||
type: "click"
|
||||
name: "我的项目"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=project_list#wechat_redirect"
|
||||
-
|
||||
type: "view"
|
||||
name: "资源"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=http://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=myresource#wechat_redirect"
|
||||
name: "我的宝库"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=myresource#wechat_redirect"
|
||||
|
||||
-
|
||||
name: "更多"
|
||||
|
@ -24,9 +28,13 @@ button:
|
|||
key: "JOIN_CLASS"
|
||||
-
|
||||
type: "click"
|
||||
name: "反馈"
|
||||
key: "FEEDBACK"
|
||||
name: "加入项目"
|
||||
key: "JOIN_PROJECT"
|
||||
-
|
||||
type: "view"
|
||||
name: "历史推文"
|
||||
url: "http://mp.weixin.qq.com/mp/getmasssendmsg?__biz=MzIwOTM2NDkxMA==#wechat_webview_type=1&wechat_redirect"
|
||||
-
|
||||
type: "click"
|
||||
name: "联系我们"
|
||||
key: "FEEDBACK"
|
||||
|
|
|
@ -2,22 +2,22 @@ button:
|
|||
-
|
||||
type: "view"
|
||||
name: "我的动态"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=activities#wechat_redirect"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=activities#wechat_redirect"
|
||||
-
|
||||
name: "我的群组"
|
||||
sub_button:
|
||||
-
|
||||
type: "view"
|
||||
name: "我的课程"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
|
||||
-
|
||||
type: "click"
|
||||
type: "view"
|
||||
name: "我的项目"
|
||||
key: "PROJECT"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=project_list#wechat_redirect"
|
||||
-
|
||||
type: "view"
|
||||
name: "我的宝库"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=myresource#wechat_redirect"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=myresource#wechat_redirect"
|
||||
|
||||
-
|
||||
name: "更多"
|
||||
|
@ -30,11 +30,11 @@ button:
|
|||
type: "click"
|
||||
name: "加入项目"
|
||||
key: "JOIN_PROJECT"
|
||||
-
|
||||
type: "click"
|
||||
name: "反馈"
|
||||
key: "FEEDBACK"
|
||||
-
|
||||
type: "view"
|
||||
name: "历史推文"
|
||||
url: "http://mp.weixin.qq.com/mp/getmasssendmsg?__biz=MzIwOTM2NDkxMA==#wechat_webview_type=1&wechat_redirect"
|
||||
-
|
||||
type: "click"
|
||||
name: "联系我们"
|
||||
key: "FEEDBACK"
|
||||
|
|
|
@ -2,19 +2,11 @@ default: &default
|
|||
# corpid: "corpid"
|
||||
# corpsecret: "corpsecret"
|
||||
# agentid: 1
|
||||
#
|
||||
#- # guange test
|
||||
#appid: "wxf694495398c7d470"
|
||||
#secret: "743e038392f1d89540e95f8f7645849a"
|
||||
|
||||
#production
|
||||
appid: "wx8e1ab05163a28e37"
|
||||
secret: "beb4d3bc4b32b3557811680835357841"
|
||||
|
||||
#test
|
||||
# appid: "wxc09454f171153c2d"
|
||||
# secret: "dff5b606e34dcafe24163ec82c2715f8"
|
||||
|
||||
token: "123456"
|
||||
access_token: "1234567"
|
||||
encrypt_mode: false # if true must fill encoding_aes_key
|
||||
|
@ -22,24 +14,14 @@ default: &default
|
|||
#production
|
||||
encoding_aes_key: "QGfP13YP4BbQGkkrlYuxpn4ZIDXpBJww4fxl8CObvNw"
|
||||
jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket"
|
||||
#
|
||||
# #template
|
||||
|
||||
#template
|
||||
binding_succ_notice: "jjpDrgFErnmkrE9tf2M3o0t31ZrJ7mr0YtuE_wyLaMc"
|
||||
journal_notice: "uC1zAw4F2q6HTA3Pcj8VUO6wKKKiYFwnPJB4iXxpdoM"
|
||||
homework_message_notice: "tCf7teCVqc2vl2LZ_hppIdWmpg8yLcrI8XifxYePjps"
|
||||
class_notice: "MQ_mFupbXP-9jWbeHT3C5xqNBvPo8EIlNv4ULakSpJA"
|
||||
create_class_notice: "2GtJJGzzNlNy2i0UrsjEDlvfSVIUXQfSo47stpcQAVw"
|
||||
|
||||
#test
|
||||
# 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"
|
||||
# create_class_notice: "9CDIvHIKiGwPEQWRw_-wieec1o50tMXQPPZIfECKu0I"
|
||||
create_project_notice: "R2ZaQKJfDJgujPcHWPzadKHIRkIyj2CjX2o_qIuRqig"
|
||||
|
||||
production:
|
||||
<<: *default
|
|
@ -2,26 +2,26 @@ default: &default
|
|||
# corpid: "corpid"
|
||||
# corpsecret: "corpsecret"
|
||||
# agentid: 1
|
||||
# Or if using public account, only need above two line
|
||||
|
||||
# guange test
|
||||
#appid: "wxf694495398c7d470"
|
||||
#secret: "743e038392f1d89540e95f8f7645849a"
|
||||
|
||||
appid: "wx8e1ab05163a28e37"
|
||||
secret: "beb4d3bc4b32b3557811680835357841"
|
||||
#test
|
||||
appid: "wxc09454f171153c2d"
|
||||
secret: "dff5b606e34dcafe24163ec82c2715f8"
|
||||
|
||||
token: "123456"
|
||||
access_token: ".access_token"
|
||||
access_token: "1234567"
|
||||
encrypt_mode: false # if true must fill encoding_aes_key
|
||||
encoding_aes_key: "QGfP13YP4BbQGkkrlYuxpn4ZIDXpBJww4fxl8CObvNw"
|
||||
jsapi_ticket: "tmp/wechat_jsapi_ticket"
|
||||
|
||||
#test
|
||||
encoding_aes_key: "QyocNOkRmrT5HzBpCG54EVPUQjk86nJapXNVDQm6Yy6"
|
||||
jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket"
|
||||
|
||||
#template
|
||||
binding_succ_notice: "jjpDrgFErnmkrE9tf2M3o0t31ZrJ7mr0YtuE_wyLaMc"
|
||||
journal_notice: "uC1zAw4F2q6HTA3Pcj8VUO6wKKKiYFwnPJB4iXxpdoM"
|
||||
homework_message_notice: "tCf7teCVqc2vl2LZ_hppIdWmpg8yLcrI8XifxYePjps"
|
||||
class_notice: "MQ_mFupbXP-9jWbeHT3C5xqNBvPo8EIlNv4ULakSpJA"
|
||||
binding_succ_notice: "n4KLwcWNrIMYkKxWL2hUwzunm5RTT54EbWem2MIUapU"
|
||||
journal_notice: "XpHHYkqSGkwuF9vHthRdmPQLvCFRQ4_NbRBP12T7ciE"
|
||||
homework_message_notice: "Kom0TsYYKsNKCS6luweYVRo9z-mH0wRPr24b1clGCPQ"
|
||||
class_notice: "8LVu33l6bP-56SDomVgHn-yJc57YpCwwJ81rAJgRONk"
|
||||
create_class_notice: "9CDIvHIKiGwPEQWRw_-wieec1o50tMXQPPZIfECKu0I"
|
||||
create_project_notice: "R2ZaQKJfDJgujPcHWPzadKHIRkIyj2CjX2o_qIuRqig"
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
|
|
14
db/schema.rb
14
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160720094503) do
|
||||
ActiveRecord::Schema.define(:version => 20160725091759) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -67,6 +67,7 @@ ActiveRecord::Schema.define(:version => 20160720094503) do
|
|||
t.integer "status", :default => 0
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "user_id"
|
||||
end
|
||||
|
||||
create_table "apply_homeworks", :force => true do |t|
|
||||
|
@ -395,6 +396,17 @@ ActiveRecord::Schema.define(:version => 20160720094503) do
|
|||
add_index "comments", ["author_id"], :name => "index_comments_on_author_id"
|
||||
add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type"
|
||||
|
||||
create_table "commits", :force => true do |t|
|
||||
t.integer "repository_id"
|
||||
t.string "version"
|
||||
t.string "committer"
|
||||
t.text "comments"
|
||||
t.datetime "committed_on"
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "contest_notifications", :force => true do |t|
|
||||
t.text "title"
|
||||
t.text "content"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 222a9bdd72014f197baf2131ab71cc41660111ed
|
|
@ -51,7 +51,7 @@ module Redmine
|
|||
#通过model层删除以触发before_destroy事件 -by zjc
|
||||
watchers = Watcher.find_by_sql "select * from `watchers` where watchable_type = 'Principal' AND watchable_id = #{self.id} AND user_id = #{user.id}"
|
||||
watchers.each do |watcher|
|
||||
watcher.destroy
|
||||
watcher.destroy
|
||||
end
|
||||
#Watcher.delete_all "watchable_type = 'Principal' AND watchable_id = #{self.id} AND user_id = #{user.id}"
|
||||
else
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
require 'wechat/cache_file.rb'
|
||||
require 'wechat/api_loader'
|
||||
require 'wechat/api'
|
||||
require 'wechat/corp_api'
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#coding=utf-8
|
||||
#
|
||||
|
||||
module Wechat
|
||||
class CacheFile
|
||||
class << self
|
||||
def cache
|
||||
if defined?(Rails)
|
||||
Rails.cache
|
||||
else
|
||||
File
|
||||
end
|
||||
end
|
||||
|
||||
def read(key)
|
||||
cache.read(key) || ''
|
||||
end
|
||||
|
||||
def write(key, val)
|
||||
cache.write(key, val)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -44,7 +44,7 @@ module Wechat
|
|||
protected
|
||||
|
||||
def read_ticket_from_file
|
||||
td = JSON.parse(File.read(jsapi_ticket_file))
|
||||
td = JSON.parse(CacheFile.read(jsapi_ticket_file))
|
||||
@got_ticket_at = td.fetch('got_ticket_at').to_i
|
||||
@ticket_life_in_seconds = td.fetch('expires_in').to_i
|
||||
@access_ticket = td.fetch('ticket')
|
||||
|
@ -54,7 +54,7 @@ module Wechat
|
|||
|
||||
def write_ticket_to_file(ticket_hash)
|
||||
ticket_hash.merge!('got_ticket_at'.freeze => Time.now.to_i)
|
||||
File.write(jsapi_ticket_file, ticket_hash.to_json)
|
||||
CacheFile.write(jsapi_ticket_file, ticket_hash.to_json)
|
||||
end
|
||||
|
||||
def remain_life_seconds
|
||||
|
|
|
@ -21,7 +21,7 @@ module Wechat
|
|||
protected
|
||||
|
||||
def read_token_from_file
|
||||
td = JSON.parse(File.read(token_file))
|
||||
td = JSON.parse(CacheFile.read(token_file))
|
||||
@got_token_at = td.fetch('got_token_at').to_i
|
||||
@token_life_in_seconds = td.fetch('expires_in').to_i
|
||||
@access_token = td.fetch('access_token')
|
||||
|
@ -31,7 +31,7 @@ module Wechat
|
|||
|
||||
def write_token_to_file(token_hash)
|
||||
token_hash.merge!('got_token_at'.freeze => Time.now.to_i)
|
||||
File.write(token_file, token_hash.to_json)
|
||||
CacheFile.write(token_file, token_hash.to_json)
|
||||
end
|
||||
|
||||
def remain_life_seconds
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[submodule "app/assets/javascripts/ckeditor-releases"]
|
||||
path = app/assets/javascripts/ckeditor-releases
|
||||
url = git://github.com/ckeditor/ckeditor-releases.git
|
|
@ -13,11 +13,13 @@
|
|||
<img ng-if="blog.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-dynamic-title c-grey3 mt12 fb">{{blog.title}}<img ng-if="blog.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt10"><span class="mr10">博客</span><span>{{blog.created_at}}</span></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{blog.title}}<img ng-if="blog.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">博客</span><span>{{blog.created_at}}</span></div>
|
||||
|
||||
<div class="f13 c-grey3 mt10 text-control post-all-content" ng-bind-html="blog.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="blog.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!blog.praise_count" ng-click="addPraise(blog);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="blog.praise_count && !blog.has_praise" ng-click="addPraise(blog);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{blog.praise_count}}</span></div>
|
||||
|
@ -31,64 +33,32 @@
|
|||
</div>
|
||||
<div class="mb50" id="all_blog_reply">
|
||||
|
||||
<div ng-if="blog.blog_comment_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in blog.blog_comment_children">
|
||||
<div class="post-reply-row">
|
||||
<div ng-if="blog.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in blog.all_children">
|
||||
<div class="post-reply-row" ng-class="['post-reply-row',{'border-bottom-none' : $last}]">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<div class="post-reply-author hidden fl">
|
||||
{{journal.user.realname}}
|
||||
<img ng-if="journal.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="journal.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-time fr f12">{{journal.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<!--<div class="post-reply-content c-grey2 mt12" ng-bind-html="journal.content|safeHtml"></div>-->
|
||||
<div ng-show="journal.parents_count > 0" class="mult-reply-container mt10">
|
||||
<!--<div ng-repeat="reply_top in journal.parents_reply_top" >-->
|
||||
<div class="mult-reply-container mt2">
|
||||
<ul ng-if="journal.parents_reply_top[1]" ng-include="'comment_reply'" ng-init="i=1;journal=journal"></ul>
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.parents_reply_top[0].user.img_url}}" class="border-radius img-circle" height="30" width="30"></div>
|
||||
<div class="post-dynamic-author hidden fl ng-binding">
|
||||
{{journal.parents_reply_top[0].user.realname}}
|
||||
<img ng-if="journal.parents_reply_top[0].user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="journal.parents_reply_top[0].user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{journal.parents_reply_top[0].lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12 border-bottom-none" ng-bind-html="journal.parents_reply_top[0].content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
|
||||
<!--['weixin-tab', {'class-tab-active': currentTab == $index+1}]-->
|
||||
<!--一层end-->
|
||||
<!--<div class="mt10">-->
|
||||
<!--<div class="post-avatar fl mr10"><img src="images/pic01.jpg" ng-src="/images/avatars/User/0" class="border-radius img-circle" height="30" width="30"></div>-->
|
||||
<!--<div class="post-dynamic-author hidden fl ng-binding">yixin<img src="images/female.png" class="ml5" width="14"></div>-->
|
||||
<!--<div class="post-dynamic-time fr f13">5分钟前</div>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--<div class="post-reply-content c-grey2 mt12 border-bottom-none">烤活牛你见过似的,美国那边吃人你怎么不信?</div>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</div>-->
|
||||
<!--二层end-->
|
||||
<div ng-show="journal.parents_count > 0" class="mult-reply-container ml40 mb5">
|
||||
<comment-reply i="0" journal="journal" ></comment-reply>
|
||||
<div ng-click="showMoreReply(1,journal)" ng-show="journal.parents_reply_top.length + journal.parents_reply_bottom.length < journal.parents_count" class="mult-reply-hide"><span class="mult-reply-arrow" >↓ </span><span class="mult-reply-arrow" style="display:none;" > ↑</span>点击展开更多楼层</div>
|
||||
|
||||
<div class="mt10" ng-repeat="reply_bottom in journal.parents_reply_bottom">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{reply_bottom.user.img_url}}" class="border-radius img-circle" height="30" width="30"></div>
|
||||
<div class="post-dynamic-author hidden fl ng-binding">
|
||||
<div ng-repeat="reply_bottom in journal.parents_reply_bottom" class="ml5 mr5">
|
||||
<div class="post-reply-author hidden fl ng-binding">
|
||||
{{reply_bottom.user.realname}}
|
||||
<img ng-if="reply_bottom.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="reply_bottom.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{reply_bottom.lasted_comment}}</div>
|
||||
<div class="post-reply-time fr f12">{{reply_bottom.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12 border-bottom-none" ng-bind-html="reply_bottom.content|safeHtml"></div>
|
||||
<div class="post-reply-content c-grey2 mt5 border-bottom-none" ng-bind-html="reply_bottom.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-reply-content">
|
||||
<div class="mult-reply-content">
|
||||
<div class="mt10" ng-bind-html="journal.content|safeHtml"></div>
|
||||
<div class="post-reply-content c-grey3 ml40">
|
||||
<div class="mult-reply-content mb15">
|
||||
<div ng-bind-html="journal.content|safeHtml"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
@ -100,7 +70,7 @@
|
|||
</div>
|
||||
|
||||
<div ng-if="!blog.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
|
@ -113,20 +83,4 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script id="comment_reply" type="text/ng-template">
|
||||
<div class="mult-reply-container mt2">
|
||||
<ul ng-if="journal.parents_reply_top[i+1]" ng-include="'comment_reply'" ng-init="i=i+1;journal=journal"></ul>
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.parents_reply_top[i].user.img_url}}" class="border-radius img-circle" height="30" width="30"></div>
|
||||
<div class="post-dynamic-author hidden fl ng-binding">
|
||||
{{journal.parents_reply_top[i].user.realname}}
|
||||
<img ng-if="journal.parents_reply_top[i].user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="journal.parents_reply_top[i].user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{journal.parents_reply_top[i].lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12 border-bottom-none" ng-bind-html="journal.parents_reply_top[i].content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
|
@ -1,6 +1,6 @@
|
|||
<div class="post-container">
|
||||
<div loading-spinner></div>
|
||||
<div class="class-detail-name">{{course.name}}<span ng-click="invite()" class="f13 blue-title-sub">邀请码</span></div>
|
||||
<div class="class-detail-name"><span class="course-name-width hidden inline-block">{{course.name}}</span><span ng-click="invite()" class="f13 blue-title-sub">邀请码</span></div>
|
||||
<div class="tab-wrap">
|
||||
<a ng-click="tab($index+1)" ng-repeat="menu in menus" id="class_tab_1" href="javascript:void(0);" ng-class="['weixin-tab', {'class-tab-active': currentTab == $index+1}]">{{menu}}</a>
|
||||
</div>
|
||||
|
@ -31,12 +31,16 @@
|
|||
<div class="member-banner f13 c-grey3">授课老师</div>
|
||||
|
||||
<div class="class-member-row f13 c-grey3" ng-repeat="teacher in teachers|filter:searchText">
|
||||
<img ng-src="/images/wechat/{{teacher.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{teacher.name}}</span><span class="fr mr10 c-grey2">{{teacher.role_name|identify}}</span><img ng-src="/images/wechat/{{teacher.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
|
||||
<img ng-src="/images/wechat/{{teacher.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{teacher.name}}</span><img ng-src="/images/wechat/{{teacher.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
|
||||
<img src="/images/wechat/setting.png" ng-show = "course.is_creator && teacher.id != course.tea_id" width="15" class="fr mr10" style="margin-top:7px;" ng-click="onSetting(teacher)" />
|
||||
<span class = "fr mr25 mt5" ng-show ="teacher.id == course.tea_id">管理员</span>
|
||||
<span ng-class="['fr','mt5',{'mr10': course.is_creator,'mr25': !course.is_creator}]" ng-show ="teacher.id != course.tea_id && teacher.roles_id == 7">教辅</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="member-banner f13 mt10 c-grey3">我的同学</div>
|
||||
<div class="class-member-row f13 c-grey3" ng-repeat="student in students|filter:searchText">
|
||||
<img ng-src="/images/wechat/{{student.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{student.name}}</span><img ng-src="/images/wechat/{{student.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
|
||||
<img src="/images/wechat/setting.png" ng-show = "course.is_creator" width="15" class="class-list-setting" ng-click="onSetting(student)" />
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -50,8 +54,8 @@
|
|||
|
||||
<div ng-class="{'undis': !showTestcase}">
|
||||
<div ng-repeat="r in exercises|filter:searchText" ng-class="['class-detail-row', 'f13', 'c-grey3', {'border-top': $first}]"><img src="/images/wechat/test.png" width="15" class="ml10 fl" /><span class="fl ml10 resource-width">{{r.exercise_name}}</span><a ng-show="isTeacher" herf="javascript:void(0);" class="fr mr10 link-blue2 undis" ng-click="sendFile(r,3)">发送</a><div class="cl"></div></div>
|
||||
<p ng-show="exercises_tag == true && exercises.length<=0" class="class-test-tip">暂无小测验,<br />
|
||||
请登录Trustie网站,在PC浏览器中上传小测验。</p>
|
||||
<p ng-show="exercises_tag == true && exercises.length<=0" class="class-test-tip">暂无测验,<br />
|
||||
请登录Trustie网站,在PC浏览器中上传测验。</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
<div class="course-diff-row"><span class="c-blue f13 ml10">我创建的课程</span></div>
|
||||
<div ng-show = "syllabus.can_setting" ng-repeat="syllabus in syllabuses" style="position:relative;">
|
||||
<div ng-click="syllabus.show_plus = !syllabus.show_plus" class="course-list-row f13 c-grey3 border-top-none"><img src="/images/wechat/plus.png" ng-show="!syllabus.show_plus" width="15" class="fl ml10 mt11 spread-btn" /><img src="/images/wechat/minus.png" ng-show="syllabus.show_plus" width="15" class="fl ml10 mt11 retract-btn " /><span class="fl ml10 class-list-name hidden">{{syllabus.title}}</span></div>
|
||||
<img src="/images/wechat/setting.png" ng-show = "syllabus.can_setting" width="15" class="class-list-setting" ng-click="onSetting(syllabus)" />
|
||||
<div class="class-setting-wrap" ng-click="onSetting(syllabus)"><img src="/images/wechat/setting.png" ng-show = "syllabus.can_setting" width="15" class="class-list-setting" /></div>
|
||||
<ul ng-show="syllabus.show_plus" class="class-list f13 c-grey3">
|
||||
<li ng-show="course.id" ng-click="goClass(course.id)" ng-repeat="course in syllabus.courses" ng-class="{'border-bottom-none': $last}">
|
||||
<img src="/images/wechat/dot.png" width="15px" class="class-list-dot" />
|
||||
<span class="fl ml10 class-list-name hidden">{{course.name}}</span>
|
||||
<span class="fr c-grey4">></span>
|
||||
<span class="students-amount f12 fr mt10">{{course.member_count}}人</span>
|
||||
<span class="students-amount f12 fr mt10 mr5">{{course.member_count}}人</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -20,13 +20,13 @@
|
|||
<div class="course-diff-row border-top mt10"><span class="c-blue f13 ml10">我参与的课程</span></div>
|
||||
<div ng-show = "!syllabus.can_setting" ng-repeat="syllabus in syllabuses" style="position:relative;">
|
||||
<div ng-click="syllabus.show_plus = !syllabus.show_plus" class="course-list-row f13 c-grey3 border-top-none"><img src="/images/wechat/plus.png" ng-show="!syllabus.show_plus" width="15" class="fl ml10 mt11 spread-btn" /><img src="/images/wechat/minus.png" ng-show="syllabus.show_plus" width="15" class="fl ml10 mt11 retract-btn " /><span class="fl ml10 class-list-name hidden">{{syllabus.title}}</span></div>
|
||||
<img src="/images/wechat/setting.png" ng-show = "syllabus.can_setting" width="15" class="class-list-setting" ng-click="onSetting(syllabus)" />
|
||||
<div class="class-setting-wrap" ng-click="onSetting(syllabus)"><img src="/images/wechat/setting.png" ng-show = "syllabus.can_setting" width="15" class="class-list-setting" /></div>
|
||||
<ul ng-show="syllabus.show_plus" class="class-list f13 c-grey3">
|
||||
<li ng-show="course.id" ng-click="goClass(course.id)" ng-repeat="course in syllabus.courses" ng-class="{'border-bottom-none': $last}">
|
||||
<img src="/images/wechat/dot.png" width="15px" class="class-list-dot" />
|
||||
<span class="fl ml10 class-list-name hidden">{{course.name}}</span>
|
||||
<span class="fr c-grey4">></span>
|
||||
<span class="students-amount f12 fr mt10">{{course.member_count}}人</span>
|
||||
<span class="students-amount f12 fr mt10 mr5">{{course.member_count}}人</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<div class="bottom-tab-wrap mt10">
|
||||
<a ng-click="newClass()" href="javascript:void(0);" class="weixin-tab link-blue2 border-top">新建课程</a>
|
||||
<a ng-click="joinClass()" class="weixin-tab link-blue2 border-top">加入班级</a>
|
||||
<a ng-click="goResource()" href="javascript:void(0);" class="weixin-tab link-blue2 border-top">我的资源</a>
|
||||
<!--<a ng-click="goResource()" href="javascript:void(0);" class="weixin-tab link-blue2 border-top">我的资源</a>-->
|
||||
</div>
|
||||
|
||||
<my-alert message="alertService_1.message" title="alertService_1.title" visible="alertService_1.visible" cb="alertService_1.cb"></my-alert>
|
||||
|
|
|
@ -13,41 +13,60 @@
|
|||
<img ng-if="discussion.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-dynamic-title c-grey3 mt12 fb">{{discussion.subject}}<img ng-if="discussion.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt10"><span class="mr10">{{discussion.course_project_name}} - 课程问答区</span><span>{{discussion.created_on}}</span></div>
|
||||
<div class="f13 c-grey3 mt10 text-control post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!discussion.praise_count" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="discussion.praise_count && !discussion.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{discussion.subject}}<img ng-if="discussion.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{discussion.course_project_name}} - 课程问答区</span><span>{{discussion.created_on}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!discussion.praise_count" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="discussion.praise_count && !discussion.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{discussion.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!discussion.replies_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="discussion.replies_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{discussion.replies_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mb50" id="all_course_message_reply">
|
||||
<div ng-if="discussion.message_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in discussion.message_children">
|
||||
<div ng-if="discussion.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in discussion.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<div class="post-reply-author hidden fl">
|
||||
{{journal.user.realname}}
|
||||
<img ng-if="journal.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="journal.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-time fr f12">{{journal.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12" ng-bind-html="journal.content|safeHtml"></div>
|
||||
|
||||
<div ng-show="journal.parents_count > 0" class="mult-reply-container ml40 mb5">
|
||||
<!--<ul ng-if="journal.parents_reply_top[0]" ng-include="'comment_reply'" ng-init="i=0;journal=journal"></ul>-->
|
||||
<comment-reply i="0" journal="journal" ></comment-reply>
|
||||
<div ng-click="showMoreReply(1,journal)" ng-show="journal.parents_reply_top.length + journal.parents_reply_bottom.length < journal.parents_count" class="mult-reply-hide"><span class="mult-reply-arrow" >↓ </span><span class="mult-reply-arrow" style="display:none;" > ↑</span>点击展开更多楼层</div>
|
||||
<div class="mt10" ng-repeat="reply_bottom in journal.parents_reply_bottom">
|
||||
<div class="post-reply-author hidden fl ng-binding">
|
||||
{{reply_bottom.user.realname}}
|
||||
</div>
|
||||
<div class="post-reply-time fr f12">{{reply_bottom.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12 border-bottom-none" ng-bind-html="reply_bottom.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post-reply-content c-grey3 ml40 mb15" ng-bind-html="journal.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,discussion);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
|
|
|
@ -12,41 +12,41 @@
|
|||
<img ng-if="news.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-dynamic-title c-grey3 mt12 fb">{{news.title}}</div>
|
||||
<div class="c-grey4 f13 mt10"><span class="mr10">{{news.course_name}} - 课程通知</span><span>{{news.created_on}}</span></div>
|
||||
<div class="f13 c-grey3 mt10 text-control post-all-content" ng-bind-html="news.description|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!news.praise_count" ng-click="addPraise(news);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="news.praise_count && !news.has_praise" ng-click="addPraise(news);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{news.praise_count}}</span></div>
|
||||
<div ng-if="news.has_praise" ng-click="decreasePraise(news);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{news.praise_count}}</span></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{news.title}}</div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{news.course_name}} - 课程通知</span><span>{{news.created_on}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="news.description|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!news.praise_count" ng-click="addPraise(news);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="news.praise_count && !news.has_praise" ng-click="addPraise(news);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{news.praise_count}}</span></div>
|
||||
<div ng-if="news.has_praise" ng-click="decreasePraise(news);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{news.praise_count}}</span></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!news.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="news.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{news.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!news.comments_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="news.comments_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{news.comments_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mb50" id="all_news_reply">
|
||||
<div ng-if="news.comments == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="comments in news.comments">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{comments.author.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<div class="post-reply-author hidden fl">
|
||||
{{comments.author.realname}}
|
||||
<img ng-if="comments.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="comments.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{comments.created_on}}</div>
|
||||
<div class="post-reply-time fr f12">{{comments.created_on}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12" ng-bind-html="comments.comments|safeHtml"></div>
|
||||
<div class="post-reply-content c-grey3 ml40 mb15" ng-bind-html="comments.comments|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<div class="post-container">
|
||||
<div loading-spinner></div>
|
||||
<div ng-show="current_edit_member" class="post-container" style="padding-bottom:50px;">
|
||||
<div class="blue-title">角色变更</div>
|
||||
<div class="class-detail-row f13 c-grey3"><img ng-src="/images/wechat/{{current_edit_member.user.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle mt4" /><span class="fl mt10 ml10">{{current_edit_member.user.realname == "" ? current_edit_member.user.name : current_edit_member.user.realname}}</span><img ng-src="/images/wechat/{{current_edit_member.user.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt10" /><div class="cl"></div> </div>
|
||||
<div class="course-list-row f13 c-grey3 mt10"><span class="fl ml10">角色</span></div>
|
||||
<ul class="class-list f13 c-grey3">
|
||||
<li><span class="fl ml10 class-list-name hidden">教师</span><span ng-click="selectRole(9)" ng-class="['login-box', 'fr', 'mr10', 'mt12','img-circle', {'checked': current_edit_member.roles_id == 9}]"></span></li>
|
||||
<li><span class="fl ml10 class-list-name hidden">教辅</span><span ng-click="selectRole(7)" ng-class="['login-box', 'fr', 'mr10', 'mt12','img-circle', {'checked': current_edit_member.roles_id == 7}]"></span></li>
|
||||
<li class="border-bottom-none"><span class="fl ml10 class-list-name hidden">学生</span><span ng-click="selectRole(10)" ng-class="['login-box', 'fr', 'mr10', 'mt12','img-circle', {'checked': current_edit_member.roles_id == 10}]"></span></li>
|
||||
</ul>
|
||||
<div class="bottom-tab-wrap mt10">
|
||||
<a href="javascript:void(0);" ng-click="cancel()" class="weixin-tab c-grey border-top">取消</a>
|
||||
<a href="javascript:void(0);" ng-click="edit_member_role()" class="weixin-tab link-blue2 border-top">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
|
||||
</div>
|
|
@ -0,0 +1,21 @@
|
|||
<div class="post-container">
|
||||
<div loading-spinner></div>
|
||||
<div ng-show="current_edit_member" class="post-container" style="padding-bottom:50px;">
|
||||
<div class="blue-title">角色变更</div>
|
||||
<div class="class-detail-row f13 c-grey3"><img ng-src="/images/wechat/{{current_edit_member.user.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle mt4" /><span class="fl mt10 ml10">{{current_edit_member.user.real_name == "" ? current_edit_member.user.name : current_edit_member.user.real_name}}</span><img ng-src="/images/wechat/{{current_edit_member.user.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt10" /><div class="cl"></div> </div>
|
||||
<div class="course-list-row f13 c-grey3 mt10"><span class="fl ml10">角色</span></div>
|
||||
<ul class="class-list f13 c-grey3">
|
||||
<li><span class="fl ml10 class-list-name hidden">管理人员</span><span ng-click="selectRole(3)" ng-class="['login-box', 'fr', 'mr10', 'mt12','img-circle', {'checked': current_edit_member.roles_id == 3}]"></span></li>
|
||||
<li><span class="fl ml10 class-list-name hidden">开发人员</span><span ng-click="selectRole(4)" ng-class="['login-box', 'fr', 'mr10', 'mt12','img-circle', {'checked': current_edit_member.roles_id == 4}]"></span></li>
|
||||
<li class="border-bottom-none"><span class="fl ml10 class-list-name hidden">报告人员</span><span ng-click="selectRole(5)" ng-class="['login-box', 'fr', 'mr10', 'mt12','img-circle', {'checked': current_edit_member.roles_id == 5}]"></span></li>
|
||||
</ul>
|
||||
<div class="bottom-tab-wrap mt10">
|
||||
<a href="javascript:void(0);" ng-click="cancel()" class="weixin-tab c-grey border-top">取消</a>
|
||||
<a href="javascript:void(0);" ng-click="edit_member_role()" class="weixin-tab link-blue2 border-top">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
|
||||
</div>
|
|
@ -12,47 +12,65 @@
|
|||
<img ng-if="homework.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-dynamic-title c-grey3 mt12 fb">{{homework.name}}</div>
|
||||
<div class="c-grey4 f13 mt10"><span class="mr10">{{homework.course_name}} - <span ng-if="homework.homework_type == 1">普通作业</span><span ng-if="homework.homework_type == 2">编程作业</span><span ng-if="homework.homework_type == 3">分组作业</span></span><span>{{homework.publish_time}}</span></div>
|
||||
<div class="f13 c-grey3 mt10 mb10 text-control post-all-content" ng-bind-html="homework.description|safeHtml"></div>
|
||||
<span class="c-grey f12 mr15">迟交扣分:{{homework.late_penalty}}分</span>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12">匿评开启时间:{{homework.evaluation_start}}</span><br />
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12 mr15">缺评扣分:{{homework.absence_penalty}}分/作品</span>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12">匿评关闭时间:{{homework.evaluation_end}}</span>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{homework.name}}</div>
|
||||
<div class="c-grey4 mt5 f13"><span class="mr10">{{homework.course_name}} - <span ng-if="homework.homework_type == 1">普通作业</span><span ng-if="homework.homework_type == 2">编程作业</span><span ng-if="homework.homework_type == 3">分组作业</span></span><span>{{homework.publish_time}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="homework.description|safeHtml"></div>
|
||||
<span class="c-grey f12 mr15">迟交扣分:{{homework.late_penalty}}分</span>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12">匿评开启时间:{{homework.evaluation_start}}</span><br />
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12 mr15">缺评扣分:{{homework.absence_penalty}}分/作品</span>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12">匿评关闭时间:{{homework.evaluation_end}}</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!homework.praise_count" ng-click="addPraise(homework);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="homework.praise_count && !homework.has_praise" ng-click="addPraise(homework);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{homework.praise_count}}</span></div>
|
||||
<div ng-if="homework.has_praise" ng-click="decreasePraise(homework);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{homework.praise_count}}</span></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!homework.whomework_journal_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="homework.whomework_journal_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{homework.whomework_journal_count}}</span></a>
|
||||
<a ng-if="!homework.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="homework.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{homework.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mb50" id="all_homework_reply">
|
||||
|
||||
<div ng-if="homework.journals_for_messages == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in homework.journals_for_messages">
|
||||
<div ng-if="homework.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in homework.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<div class="post-reply-author hidden fl">
|
||||
{{journal.user.realname}}
|
||||
<img ng-if="journal.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="journal.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-time fr f12">{{journal.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12" ng-bind-html="journal.notes|safeHtml"></div>
|
||||
|
||||
<div ng-show="journal.parents_count > 0" class="mult-reply-container ml40 mb5">
|
||||
<!--<ul ng-if="journal.parents_reply_top[0]" ng-include="'comment_reply'" ng-init="i=0;journal=journal"></ul>-->
|
||||
<comment-reply i="0" journal="journal" ></comment-reply>
|
||||
<div ng-click="showMoreReply(1,journal)" ng-show="journal.parents_reply_top.length + journal.parents_reply_bottom.length < journal.parents_count" class="mult-reply-hide"><span class="mult-reply-arrow" >↓ </span><span class="mult-reply-arrow" style="display:none;" > ↑</span>点击展开更多楼层</div>
|
||||
<div class="ml5 mr5 mt10" ng-repeat="reply_bottom in journal.parents_reply_bottom">
|
||||
<div class="post-reply-author hidden fl ng-binding">
|
||||
{{reply_bottom.user.realname}}
|
||||
</div>
|
||||
<div class="post-reply-time fr f12">{{reply_bottom.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt5 border-bottom-none" ng-bind-html="reply_bottom.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post-reply-content c-grey3 ml40 mb15" ng-bind-html="journal.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,homework);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
|
|
|
@ -13,46 +13,46 @@
|
|||
<img ng-if="issue.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-dynamic-title c-grey3 mt12 fb">{{issue.subject}}</div>
|
||||
<div class="c-grey4 f13 mt10"><span class="mr10">{{issue.project_name}} - 项目问题</span><span>{{issue.created_on}}</span></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{issue.subject}}</div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{issue.project_name}} - 项目问题</span><span>{{issue.created_on}}</span></div>
|
||||
|
||||
<div class="f13 c-grey3 mt10 mb10 text-control post-all-content" ng-bind-html="issue.description|safeHtml"></div>
|
||||
<span class="c-grey f12 mr15">状 态:{{issue.issue_status}}</span>
|
||||
<span class="c-grey f12">优先级:{{issue.issue_priority}}</span><br/>
|
||||
<span class="c-grey f12 mr15">指派给:{{issue.issue_assigned_to}}</span>
|
||||
<span class="c-grey f12">完成度:{{issue.done_ratio}}%</span>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!issue.praise_count" ng-click="addPraise(issue);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="issue.praise_count && !issue.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{issue.praise_count}}</span></div>
|
||||
<div ng-if="issue.has_praise" ng-click="decreasePraise(issue);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{issue.praise_count}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="issue.description|safeHtml"></div>
|
||||
<span class="c-grey f12 mr15">状 态:{{issue.issue_status}}</span>
|
||||
<span class="c-grey f12">优先级:{{issue.issue_priority}}</span><br/>
|
||||
<span class="c-grey f12 mr15">指派给:{{issue.issue_assigned_to}}</span>
|
||||
<span class="c-grey f12">完成度:{{issue.done_ratio}}%</span>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!issue.praise_count" ng-click="addPraise(issue);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="issue.praise_count && !issue.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{issue.praise_count}}</span></div>
|
||||
<div ng-if="issue.has_praise" ng-click="decreasePraise(issue);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{issue.praise_count}}</span></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!issue.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="issue.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{issue.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!issue.journals_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="issue.journals_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{issue.journals_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mb50" id="all_issue_reply">
|
||||
<div ng-if="issue.issue_journals == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in issue.issue_journals">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<div class="post-reply-author hidden fl">
|
||||
{{journal.user.realname}}
|
||||
<img ng-if="journal.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="journal.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{journal.created_on}}</div>
|
||||
<div class="post-reply-time fr f12">{{journal.created_on}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12" ng-bind-html="journal.notes|safeHtml"></div>
|
||||
<div class="post-reply-content c-grey3 ml40 mb15" ng-bind-html="journal.notes|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
|
|
|
@ -12,43 +12,60 @@
|
|||
<img ng-if="message.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="c-grey4 f13 mt10"><span class="mr10">留言</span><span>{{message.created_on}}</span></div>
|
||||
<div class="ml40">
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">留言</span><span>{{message.created_on}}</span></div>
|
||||
|
||||
<div class="f13 c-grey3 mt10 text-control post-all-content" ng-bind-html="message.notes|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!message.praise_count" ng-click="addPraise(message);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="message.praise_count && !message.has_praise" ng-click="addPraise(message);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{message.praise_count}}</span></div>
|
||||
<div ng-if="message.has_praise" ng-click="decreasePraise(message);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{message.praise_count}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="message.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!message.praise_count" ng-click="addPraise(message);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="message.praise_count && !message.has_praise" ng-click="addPraise(message);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{message.praise_count}}</span></div>
|
||||
<div ng-if="message.has_praise" ng-click="decreasePraise(message);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{message.praise_count}}</span></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!message.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="message.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{message.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!message.reply_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="message.reply_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{message.reply_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mb50" id="all_message_reply">
|
||||
|
||||
<div ng-if="message.child_reply == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in message.child_reply">
|
||||
<div class="post-reply-wrap" ng-repeat="journal in message.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<div class="post-reply-author hidden fl">
|
||||
{{journal.user.realname}}
|
||||
<img ng-if="journal.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="journal.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-time fr f12">{{journal.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12" ng-bind-html="journal.notes|safeHtml"></div>
|
||||
|
||||
<div ng-show="journal.parents_count > 0" class="mult-reply-container ml40 mb5">
|
||||
<comment-reply i="0" journal="journal" ></comment-reply>
|
||||
<div ng-click="showMoreReply(1,journal)" ng-show="journal.parents_reply_top.length + journal.parents_reply_bottom.length < journal.parents_count" class="mult-reply-hide"><span class="mult-reply-arrow" >↓ </span><span class="mult-reply-arrow" style="display:none;" > ↑</span>点击展开更多楼层</div>
|
||||
<div class="mt10 ml5 mr5" ng-repeat="reply_bottom in journal.parents_reply_bottom">
|
||||
<div class="post-reply-author hidden fl ng-binding">
|
||||
{{reply_bottom.user.realname}}
|
||||
</div>
|
||||
<div class="post-reply-time fr f12">{{reply_bottom.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt5 border-bottom-none" ng-bind-html="reply_bottom.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post-reply-content c-grey3 ml40 mb15" ng-bind-html="journal.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,message);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
|
|
|
@ -32,15 +32,15 @@
|
|||
<p ng-show="homeworks_tag == true && homeworks.length<=0" class="class-test-tip">暂无作业,<br />
|
||||
请登录Trustie网站,在PC浏览器中创建作业。</p>
|
||||
</div>
|
||||
<div ng-class="{'undis': currentTab!=3}">
|
||||
<div ng-repeat="r in exercise|filter:{exercise_name: searchText}" ng-class="['class-detail-row', 'f13', 'c-grey3', {'border-top': $first}]"><img src="/images/wechat/test.png" width="15" class="ml10 fl" /><span class="fl ml10 resource-width">{{r.exercise_name}}</span><a ng-show="r.current_user_is_teacher" ng-click="sendFile(r,3)" class="fr mr10 link-blue2 undis">发送</a><div class="cl"></div>
|
||||
<span class="f12 mt5 ml35 c-grey4 other-from-width hidden">题目来源:{{r.coursename}}</span><div class="cl"></div>
|
||||
</div>
|
||||
<div ng-if="exercise_has_more">
|
||||
<div id="more_exercises" class="more-events mt10" ng-click="loadResourceData(3,exercise_page+1);">更多</div>
|
||||
</div>
|
||||
<p ng-show="exercises_tag == true && exercise.length<=0" class="class-test-tip">暂无测验,<br />
|
||||
请登录Trustie网站,在PC浏览器中创建测验。</p>
|
||||
</div>
|
||||
<!--<div ng-class="{'undis': currentTab!=3}">-->
|
||||
<!--<div ng-repeat="r in exercise|filter:{exercise_name: searchText}" ng-class="['class-detail-row', 'f13', 'c-grey3', {'border-top': $first}]"><img src="/images/wechat/test.png" width="15" class="ml10 fl" /><span class="fl ml10 resource-width">{{r.exercise_name}}</span><a ng-show="r.current_user_is_teacher" ng-click="sendFile(r,3)" class="fr mr10 link-blue2 undis">发送</a><div class="cl"></div>-->
|
||||
<!--<span class="f12 mt5 ml35 c-grey4 other-from-width hidden">题目来源:{{r.coursename}}</span><div class="cl"></div>-->
|
||||
<!--</div>-->
|
||||
<!--<div ng-if="exercise_has_more">-->
|
||||
<!--<div id="more_exercises" class="more-events mt10" ng-click="loadResourceData(3,exercise_page+1);">更多</div>-->
|
||||
<!--</div>-->
|
||||
<!--<p ng-show="exercises_tag == true && exercise.length<=0" class="class-test-tip">暂无测验,<br />-->
|
||||
<!--请登录Trustie网站,在PC浏览器中创建测验。</p>-->
|
||||
<!--</div>-->
|
||||
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<div class="post-container">
|
||||
<div loading-spinner></div>
|
||||
|
||||
<div class="blue-title">新建项目</div>
|
||||
<form novalidate name="classForm">
|
||||
<div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">项目</span><input class="new-class-input ml25" ng-model="project.name" required placeholder="例如:团队写作方法与机制研究" /></div>
|
||||
<a ng-click="newProject(classForm, project)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a>
|
||||
</form>
|
||||
|
||||
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
|
||||
</div>
|
|
@ -0,0 +1,132 @@
|
|||
<div class="post-container">
|
||||
<div loading-spinner></div>
|
||||
<div class="class-detail-name"><span class="course-name-width hidden inline-block">{{project.name}}</span><span ng-click="invite()" class="f13 blue-title-sub">邀请码</span></div>
|
||||
<div class="tab-wrap">
|
||||
<a ng-click="tab($index+1)" ng-repeat="menu in menus" id="class_tab_1" href="javascript:void(0);" ng-class="['weixin-tab', {'class-tab-active': currentTab == $index+1}]">{{menu}}</a>
|
||||
</div>
|
||||
|
||||
<div ng-class="{'undis': currentTab != 1}">
|
||||
<div ng-repeat="act in project_activities">
|
||||
<div ng-if="act.container_type=='Project' ">
|
||||
<div ng-if="act.act_type=='Issue'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div dataID = "{{act.act_id}}" ng-click="goDetail('issues',act.act_id, act.id)" id="act_{{act.id}}">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<span ng-if="act.author.realname != ' '">{{act.author.realname}}</span>
|
||||
<span ng-if="act.author.realname == ' '">{{act.author.nickname}}</span>
|
||||
<img ng-if="act.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="act.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{act.latest_update}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【问题】{{act.subject|safeHtml}}</div>
|
||||
<div class="post-content c-grey3 mt10 mb10">
|
||||
<div class="post-all-content" 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 />
|
||||
<span class="mr15 f13 c-grey2">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15 f13 c-grey2">完成度:{{act.issue_detail.done_ratio}}%</span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="post-dynamic-from hidden fl c-grey3">来源: <span class="c-blue">{{act.course_project_name}}</span></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
|
||||
<div ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!act.reply_count" ng-click="goDetail('issues',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-click="goDetail('issues',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-if="act.act_type=='Message'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div dataID = "{{act.act_id}}" ng-click="goDetail('project_discussion',act.act_id, act.id)" id="act_{{act.id}}">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<span ng-if="act.author.realname != ' '">{{act.author.realname}}</span>
|
||||
<span ng-if="act.author.realname == ' '">{{act.author.nickname}}</span>
|
||||
<img ng-if="act.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="act.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{act.latest_update}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div>
|
||||
<div class="post-content c-grey3 mt10 mb10">
|
||||
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="post-dynamic-from hidden fl c-grey3">来源: <span class="c-blue">{{act.course_project_name}}</span></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
|
||||
<div ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!act.reply_count" ng-click="goDetail('project_discussion',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="act.reply_count" ng-click="goDetail('project_discussion',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="act.act_type=='Project'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper">
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-title hidden mb5"><span class="c-grey3 f13 fb mr10">{{act.author.realname}}</span>创建了<span class="c-grey3 f13 fb ml10">{{act.course_project_name}} | 项目</span></div>
|
||||
<div class="post-title hidden"><span class="mr10">{{act.latest_update}}</span></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="project_has_more">
|
||||
<div id="more_project_activities" class="more-events mt10" ng-click="getActivities(project_activities_page+1);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-class="{'undis': currentTab != 2}">
|
||||
<div class="class-search-wrap">
|
||||
<div class="class-search-inner"> <img src="/images/wechat/search.png" width="18" class="class-search-icon" />
|
||||
<input class="class-detail-search" ng-model="searchText" placeholder="输入关键词进行搜索" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-banner f13 c-grey3">管理人员({{project_master_members.length}})</div>
|
||||
<div class="class-member-row f13 c-grey3" ng-repeat="master in project_master_members|filter:searchText">
|
||||
<img ng-src="/images/wechat/{{master.user.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{master.user.real_name == "" ? master.user.name : master.user.real_name }}</span><span class="fr mr10 c-grey2">{{teacher.role_name|identify}}</span><img ng-src="/images/wechat/{{master.user.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
|
||||
<img src="/images/wechat/setting.png" ng-show = "master.user.id != project.user_id && project.can_setting" width="15" class="class-list-setting" ng-click="onSetting(master)" />
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="member-banner f13 mt10 c-grey3">开发人员({{project_develop_members.length}})</div>
|
||||
<div class="class-member-row f13 c-grey3" ng-repeat="develop in project_develop_members|filter:searchText">
|
||||
<img ng-src="/images/wechat/{{develop.user.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{develop.user.real_name == "" ? develop.user.name : develop.user.real_name}}</span><img ng-src="/images/wechat/{{develop.user.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
|
||||
<img src="/images/wechat/setting.png" ng-show = "master.user.id != project.user_id && project.can_setting " width="15" class="class-list-setting" ng-click="onSetting(develop)" />
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="member-banner f13 mt10 c-grey3">报告人员({{project_report_members.length}})</div>
|
||||
<div class="class-member-row f13 c-grey3" ng-repeat="report in project_report_members|filter:searchText">
|
||||
<img ng-src="/images/wechat/{{report.user.gender==0 ? 'male' : 'female'}}.jpg" width="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{report.user.real_name == "" ? report.user.name : report.user.real_name}}</span><img ng-src="/images/wechat/{{report.user.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
|
||||
<img src="/images/wechat/setting.png" ng-show = "master.user.id != project.user_id && project.can_setting " width="15" class="class-list-setting" ng-click="onSetting(report)" />
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
|
||||
</div>
|
|
@ -12,42 +12,60 @@
|
|||
<img ng-if="discussion.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-dynamic-title c-grey3 mt12 fb">{{discussion.subject}}<img ng-if="discussion.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt10"><span class="mr10">{{discussion.course_project_name}} - 项目讨论区</span><span>{{discussion.created_on}}</span></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{discussion.subject}}<img ng-if="discussion.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{discussion.course_project_name}} - 项目讨论区</span><span>{{discussion.created_on}}</span></div>
|
||||
|
||||
<div class="f13 c-grey3 mt10 text-control post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!discussion.praise_count" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="discussion.praise_count && !discussion.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!discussion.praise_count" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="discussion.praise_count && !discussion.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{discussion.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fr mr25 f13">
|
||||
<a ng-if="!discussion.replies_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="discussion.replies_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{discussion.replies_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div class="mb50" id="all_course_message_reply">
|
||||
<div ng-if="discussion.message_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in discussion.message_children">
|
||||
<div ng-if="discussion.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in discussion.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
<div class="post-reply-author hidden fl">
|
||||
{{journal.user.realname}}
|
||||
<img ng-if="journal.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="journal.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="post-dynamic-time fr f13">{{journal.lasted_comment}}</div>
|
||||
<div class="post-reply-time fr f12">{{journal.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt12" ng-bind-html="journal.content|safeHtml"></div>
|
||||
|
||||
<div ng-show="journal.parents_count > 0" class="mult-reply-container ml40 mb5">
|
||||
<comment-reply i="0" journal="journal" ></comment-reply>
|
||||
<div ng-click="showMoreReply(1,journal)" ng-show="journal.parents_reply_top.length + journal.parents_reply_bottom.length < journal.parents_count" class="mult-reply-hide"><span class="mult-reply-arrow" >↓ </span><span class="mult-reply-arrow" style="display:none;" > ↑</span>点击展开更多楼层</div>
|
||||
<div class="mt10 ml5 mr5" ng-repeat="reply_bottom in journal.parents_reply_bottom">
|
||||
<div class="post-reply-author hidden fl ng-binding">
|
||||
{{reply_bottom.user.realname}}
|
||||
</div>
|
||||
<div class="post-reply-time fr f12">{{reply_bottom.lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt5 border-bottom-none" ng-bind-html="reply_bottom.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post-reply-content c-grey3 ml40 mb15" ng-bind-html="journal.content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,discussion);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="formData.comment" placeholder="输入回复内容~" /></textarea>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<div class="post-container">
|
||||
<div class="qr-code-wrap">
|
||||
<div class="qr-code-box">
|
||||
<div class="share-class-name">{{project.name}}</div>
|
||||
<div class="qr-img-wrap"><img ng-src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket={{project.qrcode}}" width="152" class="qr-code-img" /></div>
|
||||
<div class="invitation-code-wrap">邀请码:{{project.invite_code}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="share-code-wrap">
|
||||
<!--<a ng-click="share()" href="javascript:void(0);" class="share-code-btn">分享邀请码</a>-->
|
||||
<p/>
|
||||
<div class="share-code-instruction"> 1.点击右上角"发送给朋友",邀请朋友加入项目<br />
|
||||
2.长按二维码,通过“识别图中二维码”功能加入项目<br />
|
||||
3.通过“加入项目”菜单输入邀请码加入项目(长按邀请码可以复制哦~)</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,38 @@
|
|||
<div class="post-container" style="padding-bottom: 50px;">
|
||||
<div loading-spinner></div>
|
||||
<div class="blue-title">项目列表</div>
|
||||
|
||||
<div>
|
||||
<div class="course-diff-row"><span class="c-blue f13 ml10">我创建的项目</span></div>
|
||||
<div ng-repeat="project in projects" style="position:relative;">
|
||||
<div ng-click="goProject(project.id)" ng-show="project.is_creator" class="course-list-row f13 c-grey3 border-top-none">
|
||||
<span class="fl ml15 class-list-name hidden">{{project.name}}</span>
|
||||
<span class="fr c-grey4 mr10">></span>
|
||||
<span class="students-amount f12 fr mt10 mr5">{{project.member_count}}人</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<div class="course-diff-row mt10"><span class="c-blue f13 ml10">我参与的项目</span></div>
|
||||
<div ng-click="goProject(project.id)" ng-repeat="project in projects" style="position:relative;">
|
||||
<div ng-show="!project.is_creator" class="course-list-row f13 c-grey3 border-top-none">
|
||||
<span class="fl ml15 class-list-name hidden">{{project.name}}</span>
|
||||
<span class="fr c-grey4 mr10">></span>
|
||||
<span class="students-amount f12 fr mt10 mr5">{{project.member_count}}人</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottom-tab-wrap mt10">
|
||||
<a ng-click="newProject()" href="javascript:void(0);" class="weixin-tab link-blue2 border-top">新建项目</a>
|
||||
<a ng-click="joinProject()" href="javascript:void(0);" class="weixin-tab link-blue2 border-top">加入项目</a>
|
||||
</div>
|
||||
|
||||
<my-alert message="alertService_1.message" title="alertService_1.title" visible="alertService_1.visible" cb="alertService_1.cb"></my-alert>
|
||||
<my-alert3 message="alertService_3.message" title="alertService_3.title" visible="alertService_3.visible" cb="alertService_3.cb" invite="alertService_3.invite" ></my-alert3>
|
||||
</div>
|
|
@ -19,6 +19,6 @@
|
|||
<!--<li ng-click="selectCourse(course)" ng-class="{'border-bottom-none': $last }" ng-repeat="course in courses"><img src="/images/wechat/dot.png" width="15px" class="class-list-dot" /><span class="fl ml10 class-list-name hidden">{{course.name}}</span><span ng-class="['login-box', 'fr', 'mr5', 'mt12', {'checked': course.checked}]"></span></li>-->
|
||||
<!--</ul>-->
|
||||
|
||||
<div ng-show="syllabuses.length>0" class="btn2 bg-blue" ng-click="sendToCourses()">发送</div>
|
||||
<div ng-show="syllabuses.length>0" class="fixed-bottom-btn btn3 bg-blue" ng-click="sendToCourses()">发送</div>
|
||||
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<div ng-if="journal.parents_reply_top[i]" class="mult-reply-container">
|
||||
<!--<ul ng-if="journal.parents_reply_top[i+1]" ng-include="'comment_reply'" ng-init="i=i+1;journal=journal"></ul>-->
|
||||
|
||||
<ul ng-if="journal.parents_reply_top[i+1]" ng-include="'comment_reply'" ng-init="i=i+1;journal=journal"></ul>
|
||||
<div class="ml5 mr5">
|
||||
<div class="post-reply-author hidden fl ng-binding">
|
||||
{{journal.parents_reply_top[i].user.realname}}
|
||||
</div>
|
||||
<div class="post-reply-time fr f12">{{journal.parents_reply_top[i].lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt5 border-bottom-none" ng-bind-html="journal.parents_reply_top[i].content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script id="comment_reply" type="text/ng-template">
|
||||
<div class="mult-reply-container mb10">
|
||||
<ul ng-if="journal.parents_reply_top[i+1]" ng-include="'comment_reply'" ng-init="i=i+1;journal=journal"></ul>
|
||||
<div class="ml5 mr5">
|
||||
<div class="post-reply-author hidden fl ng-binding">
|
||||
{{journal.parents_reply_top[i].user.realname}}
|
||||
</div>
|
||||
<div class="post-reply-time fr f12">{{journal.parents_reply_top[i].lasted_comment}}</div>
|
||||
<div class="cl"></div>
|
||||
<div class="post-reply-content c-grey2 mt5 border-bottom-none" ng-bind-html="journal.parents_reply_top[i].content|safeHtml"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
|
@ -122,12 +122,14 @@ app.controller('ActivityController',
|
|||
}
|
||||
break;
|
||||
}
|
||||
rms.save("tab_num",$scope.currentTab);
|
||||
}
|
||||
|
||||
$scope.currentTab = 1;
|
||||
|
||||
$scope.currentTab = rms.get('tab_num') || 1;
|
||||
|
||||
if($scope.activities.length<=0){
|
||||
$scope.loadActData(1,0);
|
||||
$scope.loadActData('tab_num',0);
|
||||
} else {
|
||||
$timeout(function(){
|
||||
window.scrollTo(0, rms.get("yoffset"));
|
||||
|
@ -136,7 +138,7 @@ app.controller('ActivityController',
|
|||
|
||||
//跳到详情页
|
||||
$scope.goDetail = function(type, act_id,id){
|
||||
rms.save("yoffset", document.documentElement.scrollTop);
|
||||
rms.save("yoffset", document.documentElement.scrollTop || document.body.scrollTop);
|
||||
rms.save("activities",$scope.activities);
|
||||
rms.save("course_activities",$scope.course_activities);
|
||||
rms.save("project_activities",$scope.project_activities);
|
||||
|
|
|
@ -20,15 +20,15 @@ app.controller('BlogController',
|
|||
$scope.page = 0;
|
||||
}
|
||||
else{
|
||||
$scope.blog.blog_comment_children = $scope.blog.blog_comment_children.concat(data.data.blog_comment_children);
|
||||
$scope.blog.all_children = $scope.blog.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.blog.blog_comment_children.length < $scope.blog.comment_count;
|
||||
$scope.has_more = $scope.blog.all_children.length < $scope.blog.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.blog.blog_comment_children) {
|
||||
var comment = $scope.blog.blog_comment_children[i];
|
||||
for (var i in $scope.blog.all_children) {
|
||||
var comment = $scope.blog.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
|
|
|
@ -2,7 +2,7 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
|
|||
|
||||
var vm = $scope;
|
||||
var courseid = $routeParams.id;
|
||||
|
||||
var tag = $routeParams.tag;
|
||||
|
||||
|
||||
var getUsers = function(){
|
||||
|
@ -126,7 +126,13 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
|
|||
if (response.data.status == 0){
|
||||
vm.course = response.data.data;
|
||||
resetMenu(vm.course.current_user_is_teacher);
|
||||
vm.tab(1);
|
||||
if(tag){
|
||||
vm.tab(4);
|
||||
tag = null;
|
||||
}
|
||||
else{
|
||||
vm.tab(1);
|
||||
}
|
||||
}
|
||||
else{
|
||||
vm.alertService.showMessage('提示', response.data.message);
|
||||
|
@ -139,11 +145,19 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
|
|||
var resetMenu = function(is_teacher){
|
||||
vm.isTeacher = is_teacher;
|
||||
if(is_teacher){
|
||||
vm.menus = ["课件", "作业", "小测验", "学生管理"];
|
||||
vm.menus = ["课件", "作业", "测验", "成员管理"];
|
||||
} else {
|
||||
vm.menus = ['课件', "我的同学"];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
vm.onSetting = function(user){
|
||||
rms.save('current_edit_member', user);
|
||||
$location.path("/edit_class_member").search({id: courseid,user_id: user.id});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}]);
|
|
@ -6,7 +6,33 @@ app.controller('DiscussionController', ['$scope', '$http', '$routeParams', 'auth
|
|||
type: 'messages',
|
||||
replyType: 'Message',
|
||||
loadCallback: function(data){
|
||||
$scope.discussion = data.data;
|
||||
console.log(data.data);
|
||||
|
||||
//回复级别 0 一级回复 1 二级回复
|
||||
replytype = data.type;
|
||||
page = data.page;
|
||||
|
||||
if (replytype == 0){
|
||||
if (page == 0){
|
||||
$scope.discussion = data.data;
|
||||
$scope.page = 0;
|
||||
}
|
||||
else{
|
||||
$scope.discussion.all_children = $scope.discussion.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.discussion.all_children.length < $scope.discussion.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.discussion.all_children) {
|
||||
var comment = $scope.discussion.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
replyCallback: function(){
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ app.controller('EditClassController', ['$scope', '$http', 'auth', 'config', 'ale
|
|||
token: auth.token()
|
||||
}).then(function(response){
|
||||
if(response.data.status!=0){
|
||||
vm.alertService_1.showMessage('出错了', response.data.message);
|
||||
vm.alertService_1.showMessage('提示', response.data.message);
|
||||
} else {
|
||||
vm.alertService_1.showMessage('提示', '删除班级成功', function(){
|
||||
vm.syllabus.courses.splice(index, 1);
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
|
||||
|
||||
app.controller('EditClassMemberController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms', function($scope, $http, auth, config, alertService, $location,$routeParams, rms){
|
||||
var vm = $scope;
|
||||
|
||||
// vm.current_edit_member = rms.get('current_edit_member');
|
||||
vm.current_edit_member = null;
|
||||
|
||||
vm.alertService = alertService.create();
|
||||
|
||||
var course_id = $routeParams.id;
|
||||
var user_id = $routeParams.user_id;
|
||||
if(!vm.current_edit_member){
|
||||
$http.post(config.apiUrl+'courses/get_member_info', {
|
||||
token: auth.token(),
|
||||
id: course_id,
|
||||
user_id:user_id
|
||||
}).then(function(response){
|
||||
if(response.data.status!=0){
|
||||
vm.alertService.showMessage('提示', response.data.message);
|
||||
} else {
|
||||
course_id = response.data.course_id;
|
||||
user_id = response.data.user_id;
|
||||
vm.current_edit_member = response.data.member_info;
|
||||
vm.current_roles_id = vm.current_edit_member.roles_id;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
console.log(vm.current_edit_member);
|
||||
|
||||
vm.cancel = function(){
|
||||
vm.alertService.showMessage('提示', '您确定不对角色进行变更吗?', function(){
|
||||
// rms.save("project_master_members",[]);
|
||||
// rms.save("project_develop_members",[]);
|
||||
// rms.save("project_report_members",[]);
|
||||
window.history.back();
|
||||
// $location.path("/project").search({id: project_id});
|
||||
});
|
||||
};
|
||||
|
||||
vm.edit_member_role = function(){
|
||||
if(vm.current_roles_id == vm.current_edit_member.roles_id){
|
||||
vm.alertService.showMessage('提示', "该用户当前已是该角色");
|
||||
return;
|
||||
}
|
||||
|
||||
$http.post(config.apiUrl+'courses/edit_member_role', {
|
||||
token: auth.token(),
|
||||
id: course_id,
|
||||
user_id:vm.current_edit_member.user.id,
|
||||
role_id:vm.current_edit_member.roles_id
|
||||
}).then(function(response){
|
||||
if(response.data.status!=0){
|
||||
vm.alertService.showMessage('提示', response.data.message);
|
||||
} else {
|
||||
vm.alertService.showMessage('提示', '修改角色成功', function(){
|
||||
// window.history.back();
|
||||
|
||||
$location.path("/class").search({id: course_id,tag:1});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
vm.selectRole = function(role_id){
|
||||
vm.current_edit_member.roles_id = role_id;
|
||||
}
|
||||
|
||||
}] );
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
|
||||
app.controller('EditProjectMemberController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms', function($scope, $http, auth, config, alertService, $location,$routeParams, rms){
|
||||
var vm = $scope;
|
||||
|
||||
// vm.current_edit_member = rms.get('current_edit_member');
|
||||
|
||||
vm.current_edit_member = null;
|
||||
|
||||
vm.alertService = alertService.create();
|
||||
|
||||
var project_id = $routeParams.id;
|
||||
var user_id = $routeParams.user_id;
|
||||
if(!vm.current_edit_member){
|
||||
$http.post(config.apiUrl+'projects/get_member_info', {
|
||||
token: auth.token(),
|
||||
id: project_id,
|
||||
user_id:user_id
|
||||
}).then(function(response){
|
||||
if(response.data.status!=0){
|
||||
vm.alertService.showMessage('提示', response.data.message);
|
||||
} else {
|
||||
project_id = response.data.project_id;
|
||||
user_id = response.data.user_id;
|
||||
vm.current_edit_member = response.data.member_info;
|
||||
vm.current_roles_id = vm.current_edit_member.roles_id;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
console.log(vm.current_edit_member);
|
||||
|
||||
vm.cancel = function(){
|
||||
vm.alertService.showMessage('提示', '您确定不对角色进行变更吗?', function(){
|
||||
// rms.save("project_master_members",[]);
|
||||
// rms.save("project_develop_members",[]);
|
||||
// rms.save("project_report_members",[]);
|
||||
window.history.back();
|
||||
// $location.path("/project").search({id: project_id});
|
||||
});
|
||||
};
|
||||
|
||||
vm.edit_member_role = function(){
|
||||
if(vm.current_roles_id == vm.current_edit_member.roles_id){
|
||||
vm.alertService.showMessage('提示', "该用户当前已是该角色");
|
||||
return;
|
||||
}
|
||||
|
||||
$http.post(config.apiUrl+'projects/edit_member_role', {
|
||||
token: auth.token(),
|
||||
id: project_id,
|
||||
user_id:vm.current_edit_member.user.id,
|
||||
role_id:vm.current_edit_member.roles_id
|
||||
}).then(function(response){
|
||||
if(response.data.status!=0){
|
||||
vm.alertService.showMessage('提示', response.data.message);
|
||||
} else {
|
||||
vm.alertService.showMessage('提示', '修改角色成功', function(){
|
||||
rms.save('project_activities_page',0);
|
||||
rms.save("project_activities",[]);
|
||||
rms.save("project_has_more",false);
|
||||
rms.save("project",null);
|
||||
rms.save("project_master_members",[]);
|
||||
rms.save("project_develop_members",[]);
|
||||
rms.save("project_report_members",[]);
|
||||
rms.save('tab_num',null);
|
||||
// window.history.back();
|
||||
$location.path("/project").search({id: project_id,tag:1});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
vm.selectRole = function(role_id){
|
||||
vm.current_edit_member.roles_id = role_id;
|
||||
}
|
||||
|
||||
}] );
|
|
@ -6,8 +6,33 @@ app.controller('HomeworkController', ['$scope', '$http', '$routeParams', 'auth',
|
|||
type: 'whomeworks',
|
||||
replyType: 'HomeworkCommon',
|
||||
loadCallback: function(data){
|
||||
console.log(data);
|
||||
$scope.homework = data.data;
|
||||
console.log(data.data);
|
||||
|
||||
//回复级别 0 一级回复 1 二级回复
|
||||
replytype = data.type;
|
||||
page = data.page;
|
||||
|
||||
if (replytype == 0){
|
||||
if (page == 0){
|
||||
$scope.homework = data.data;
|
||||
$scope.page = 0;
|
||||
}
|
||||
else{
|
||||
$scope.homework.all_children = $scope.homework.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.homework.all_children.length < $scope.homework.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.homework.all_children) {
|
||||
var comment = $scope.homework.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
replyCallback: function(){
|
||||
}
|
||||
|
|
|
@ -5,7 +5,34 @@ app.controller('JournalsController', ['$scope', '$http', '$routeParams', 'auth',
|
|||
type: 'journal_for_messages',
|
||||
replyType: 'JournalsForMessage',
|
||||
loadCallback: function(data){
|
||||
$scope.message = data.data;
|
||||
console.log(data.data);
|
||||
|
||||
//回复级别 0 一级回复 1 二级回复
|
||||
replytype = data.type;
|
||||
page = data.page;
|
||||
|
||||
if (replytype == 0){
|
||||
if (page == 0){
|
||||
$scope.message = data.data;
|
||||
$scope.page = 0;
|
||||
}
|
||||
else{
|
||||
$scope.message.all_children = $scope.message.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.message.all_children.length < $scope.message.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.message.all_children) {
|
||||
var comment = $scope.message.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
replyCallback: function(){
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
app.controller('MyResourceController', ['$scope', '$http', 'auth', 'config', '$location', 'rms', function($scope, $http, auth, config, $location,rms){
|
||||
var vm = $scope;
|
||||
vm.menus = ['课件', '作业', '测验'];
|
||||
// vm.menus = ['课件', '作业', '测验'];
|
||||
vm.menus = ['课件', '作业'];
|
||||
|
||||
vm.resources = [];
|
||||
vm.homeworks = [];
|
||||
|
@ -137,8 +138,11 @@ app.controller('MyResourceController', ['$scope', '$http', 'auth', 'config', '$l
|
|||
}
|
||||
break;
|
||||
}
|
||||
rms.save("resource_tab_num",vm.currentTab);
|
||||
}
|
||||
|
||||
vm.tab(1);
|
||||
var currentTab = rms.get('resource_tab_num') || 1;
|
||||
|
||||
vm.tab(currentTab);
|
||||
|
||||
}] );
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
|
||||
app.controller('NewProjectController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','rms', function($scope, $http, auth, config, alertService, $location,rms){
|
||||
var vm = $scope;
|
||||
|
||||
vm.alertService = alertService.create();
|
||||
|
||||
vm.project = {
|
||||
name:""
|
||||
};
|
||||
|
||||
vm.addClass = function(){
|
||||
vm.syllabus.courses.push({});
|
||||
};
|
||||
|
||||
vm.deleteClass = function(index){
|
||||
vm.syllabus.courses.splice(index, 1);
|
||||
}
|
||||
|
||||
vm.newProject = function (frm, project) {
|
||||
frm.$setSubmitted();
|
||||
console.log(project);
|
||||
|
||||
if(!frm.$valid){
|
||||
console.log(frm.$error);
|
||||
return;
|
||||
}
|
||||
|
||||
$http.post(config.apiUrl+"projects/create", {
|
||||
token: auth.token(),
|
||||
name: project.name
|
||||
}).then(function(response){
|
||||
if(response.data.status!=0){
|
||||
vm.alertService.showMessage('出错了', response.data.message);
|
||||
} else {
|
||||
vm.alertService.showMessage('提示', '新建项目成功', function(){
|
||||
// window.history.back();
|
||||
rms.save('projects',[]);
|
||||
$location.path("/project_list");
|
||||
});
|
||||
}
|
||||
console.log(response.data.data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}] );
|
|
@ -0,0 +1,204 @@
|
|||
app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'auth','$location','$routeParams','alertService','rms','common', function($scope, config, $http,$timeout, auth, $location, $routeParams,alertService,rms,common){
|
||||
$scope.replaceUrl = function(url){
|
||||
return url;
|
||||
};
|
||||
|
||||
var vm = $scope;
|
||||
var projectid = $routeParams.id;
|
||||
var tag = $routeParams.tag;
|
||||
|
||||
vm.project_activities_page = rms.get('project_activities_page') || 0;
|
||||
vm.project_activities = rms.get("project_activities") || [];
|
||||
vm.project_has_more = rms.get("project_has_more");
|
||||
|
||||
vm.project = rms.get("project") || null;
|
||||
|
||||
|
||||
// vm.project_members_page = rms.get('project_members_page') || 0;
|
||||
vm.project_master_members = rms.get("project_master_members") || [];
|
||||
vm.project_develop_members = rms.get("project_develop_members") || [];
|
||||
vm.project_report_members = rms.get("project_report_members") || [];
|
||||
|
||||
// vm.project_members_has_more = rms.get("project_members_has_more");
|
||||
|
||||
vm.alertService = alertService.create();
|
||||
|
||||
//跳入邀请界面
|
||||
vm.invite = function(){
|
||||
vm.alertService.showMessage('提示', "该功能将在近日开放,敬请期待!");
|
||||
|
||||
|
||||
// $location.path("/project_invite_code").search({id: projectid});
|
||||
};
|
||||
|
||||
//获取项目动态
|
||||
vm.getActivities = function(page){
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: apiUrl + "projects/activities?id=" + projectid,
|
||||
data:{token:auth.token(),page:page}
|
||||
}).then(function successCallback(response) {
|
||||
console.log(response.data);
|
||||
if(response.data.status == 0){
|
||||
vm.project_activities_page = response.data.page;
|
||||
if(response.data.page > 0)
|
||||
{
|
||||
vm.project_activities = vm.project_activities.concat(response.data.data);
|
||||
}
|
||||
else{
|
||||
vm.project_activities = response.data.data;
|
||||
vm.project_activities_page = 0;
|
||||
vm.project_has_more = (response.data.count + response.data.page * 10) < response.data.all_count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
vm.alertService.showMessage('提示', response.data.message);
|
||||
}
|
||||
|
||||
|
||||
}, function errorCallback(response) {
|
||||
});
|
||||
}
|
||||
|
||||
vm.getMembers = function(page){
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: apiUrl + "projects/members?id=" + projectid,
|
||||
data:{token:auth.token(),page:page}
|
||||
}).then(function successCallback(response) {
|
||||
console.log(response.data);
|
||||
if(response.data.status == 0){
|
||||
// vm.project_members_page = response.data.page;
|
||||
// if(response.data.page > 0)
|
||||
// {
|
||||
// vm.project_members = vm.project_members.concat(response.data.data);
|
||||
// }
|
||||
// else{
|
||||
// vm.project_members = response.data.data;
|
||||
// vm.project_members_page = 0;
|
||||
// vm.project_members_has_more = (response.data.count + response.data.page * 10) < response.data.all_count;
|
||||
// }
|
||||
vm.project_master_members = response.data.master_members;
|
||||
vm.project_develop_members = response.data.develop_members;
|
||||
vm.project_report_members = response.data.report_members;
|
||||
|
||||
}
|
||||
else{
|
||||
vm.alertService.showMessage('提示', response.data.message);
|
||||
}
|
||||
|
||||
|
||||
}, function errorCallback(response) {
|
||||
});
|
||||
}
|
||||
|
||||
//跳到详情页
|
||||
vm.goDetail = function(type, act_id,id){
|
||||
rms.save("yoffset", document.documentElement.scrollTop);
|
||||
rms.save("project_activities",vm.project_activities);
|
||||
rms.save("project",vm.project);
|
||||
$location.path('/'+type+'/'+act_id);
|
||||
}
|
||||
|
||||
//切换 按钮
|
||||
vm.tab = function(index){
|
||||
vm.currentTab = index;
|
||||
vm.searchText = '';
|
||||
|
||||
if(index == 1 && vm.project_activities.length <= 0 ){
|
||||
vm.getActivities(0);
|
||||
}
|
||||
else if(index == 2 && vm.project_master_members.length <= 0){
|
||||
vm.getMembers(0);
|
||||
}
|
||||
|
||||
rms.save("tab_num",vm.currentTab);
|
||||
};
|
||||
|
||||
//初始化TAB按钮
|
||||
var resetMenu = function(can_setting){
|
||||
if(can_setting){
|
||||
vm.menus = ["项目动态", "成员管理"];
|
||||
} else {
|
||||
vm.menus = ['项目动态', "我的伙伴"];
|
||||
}
|
||||
}
|
||||
if(vm.project){
|
||||
resetMenu(vm.project.can_setting);
|
||||
}
|
||||
|
||||
vm.currentTab = rms.get('tab_num');
|
||||
|
||||
//
|
||||
if(!vm.currentTab){
|
||||
$http.get(config.apiUrl+ 'projects/'+projectid+"?token="+auth.token()).then(
|
||||
function(response) {
|
||||
console.log(response.data);
|
||||
|
||||
if (response.data.status == 0){
|
||||
vm.project = response.data.data;
|
||||
resetMenu(vm.project.can_setting);
|
||||
if(tag){
|
||||
vm.tab(2);
|
||||
tag = null;
|
||||
}
|
||||
else{
|
||||
vm.tab(1);
|
||||
}
|
||||
}
|
||||
else{
|
||||
vm.alertService.showMessage('提示', response.data.message,function(){
|
||||
window.history.back();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
vm.currentTab = 1;
|
||||
vm.tab(vm.currentTab);
|
||||
} else {
|
||||
$timeout(function(){
|
||||
window.scrollTo(0, rms.get("yoffset"));
|
||||
});
|
||||
}
|
||||
|
||||
vm.addPraise = function(act){
|
||||
for(var i in vm.project_activities){
|
||||
if(vm.project_activities[i].act_id == act.act_id){
|
||||
vm.project_activities[i].praise_count += 1;
|
||||
vm.project_activities[i].has_praise = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
common.addCommonPraise(act);
|
||||
};
|
||||
|
||||
vm.decreasePraise = function(act){
|
||||
for(var i in vm.project_activities){
|
||||
if(vm.project_activities[i].act_id == act.act_id){
|
||||
vm.project_activities[i].praise_count -= 1;
|
||||
vm.project_activities[i].has_praise = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
common.decreaseCommonPraise(act);
|
||||
};
|
||||
|
||||
vm.onSetting = function(data){
|
||||
rms.save('current_edit_member', data);
|
||||
|
||||
rms.save('project_activities_page',vm.project_activities_page);
|
||||
rms.save("project_activities",vm.project_activities);
|
||||
rms.save("project_has_more",vm.project_has_more);
|
||||
|
||||
rms.save("project",vm.project);
|
||||
rms.save("project_master_members",vm.project_master_members);
|
||||
rms.save("project_develop_members",vm.project_develop_members);
|
||||
rms.save("project_report_members",vm.project_report_members);
|
||||
|
||||
$location.path("/edit_project_member").search({id: projectid,user_id: data.user.id});
|
||||
};
|
||||
|
||||
}]);
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* Created by guange on 16/6/22.
|
||||
*/
|
||||
|
||||
|
||||
app.controller('ProjectInviteCodeController', ['$scope','$http', '$routeParams','config','auth', function($scope, $http, $routeParams, config, auth){
|
||||
var vm = $scope;
|
||||
|
||||
vm.project = {};
|
||||
var projectid = $routeParams.id;
|
||||
$http.get(config.apiUrl+ 'projects/'+projectid+"?token="+auth.token()).then(
|
||||
function(response){
|
||||
console.log(response.data);
|
||||
vm.project = response.data.data;
|
||||
}
|
||||
);
|
||||
|
||||
vm.share = function(){
|
||||
window.WeixinJSBridge.invoke('sendAppMessage',{
|
||||
'appid': 'wxf694495398c7d470', // 公众号appID
|
||||
'type': 'link', // 非必填,music,vido或link,默认为link。
|
||||
'data_url': '', // 非必填,连接地址,如音乐的mp3数据地址,供内置播放器使用
|
||||
'img_url': 'http://pnewsapp.tc.qq.com/newsapp_bt/0/9963967/640', // 缩略图地址
|
||||
'img_height':370, // 缩略图高度
|
||||
'img_width':550, // 缩略图宽度
|
||||
'link':'http://view.inews.qq.com/a/WXN2013101101385701', // 链接地址
|
||||
'desc':'desc', // 描述
|
||||
'title':'title' // 标题
|
||||
},function(res){
|
||||
//alert(res.err_msg);
|
||||
});
|
||||
}
|
||||
|
||||
}]);
|
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* Created by guange on 16/6/27.
|
||||
*/
|
||||
|
||||
|
||||
app.controller('ProjectListController', ['$scope', 'config', 'auth', '$http', '$location', 'alertService','rms',
|
||||
function ($scope, config, auth, $http, $location, alertService,rms) {
|
||||
var vm = $scope;
|
||||
// vm.projects = rms.get('projects') || [];
|
||||
vm.projects = [];
|
||||
|
||||
vm.alertService_1 = alertService.create();
|
||||
vm.alertService_3 = alertService.create();
|
||||
|
||||
var loadProjectList = function () {
|
||||
$http.get(config.apiUrl + "projects?token=" + auth.token()).then(
|
||||
function (response) {
|
||||
console.log(response.data);
|
||||
vm.projects = response.data.data;
|
||||
rms.save('projects', vm.projects);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
if(vm.projects.length<=0){
|
||||
loadProjectList();
|
||||
}
|
||||
|
||||
vm.goProject = function (project_id) {
|
||||
|
||||
rms.save('project_activities_page',0);
|
||||
rms.save("project_activities",[]);
|
||||
rms.save("project_has_more",false);
|
||||
rms.save("project",null);
|
||||
rms.save('project_members_page',0);
|
||||
rms.save("project_members",[]);
|
||||
rms.save("project_members_has_more",false);
|
||||
rms.save('tab_num',null);
|
||||
console.log(project_id);
|
||||
$location.path("/project").search({id: project_id});
|
||||
};
|
||||
|
||||
vm.newProject = function () {
|
||||
$location.path("/new_project");
|
||||
};
|
||||
|
||||
vm.joinProject = function () {
|
||||
vm.alertService_1.showMessage('提示', "该功能将在近日开放,敬请期待!");
|
||||
|
||||
// vm.alertService_3.showMessage('提示', '请输入6位项目邀请码(不区分大小写)', function(){
|
||||
// if (vm.alertService_3.invite && vm.alertService_3.invite.length == 6) {
|
||||
// $http.post(config.apiUrl + "projects/join", {
|
||||
// token: auth.token(),
|
||||
// invite_code: vm.alertService_3.invite
|
||||
// }).then(function (response) {
|
||||
// console.log(response.data);
|
||||
// if (response.data.status != 0) {
|
||||
// vm.alertService_1.showMessage('提示', response.data.message);
|
||||
// } else {
|
||||
// vm.alertService_1.showMessage('提示', '加入项目成功');
|
||||
// vm.alertService_3.invite = "";
|
||||
// loadProjectList();
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// if(vm.alertService_3.invite){
|
||||
// vm.alertService_1.showMessage('提示', '邀请码格式不正确');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
};
|
||||
|
||||
vm.onSetting = function (project) {
|
||||
console.log(project);
|
||||
rms.save('current_edit_project', project);
|
||||
$location.path("/edit_project").search({id: project.id});
|
||||
}
|
||||
|
||||
}]);
|
|
@ -49,14 +49,20 @@ app.controller('SendClassListController', ['$scope', '$http','$routeParams', 'co
|
|||
var tip = "";
|
||||
if (vm.myresource_sendIndex == 1){
|
||||
tip = "课件已发送到目标班级。";
|
||||
vm.alertService.showMessage('发送成功', tip, function () {
|
||||
rms.save('page',0);
|
||||
rms.save("resources",[]);
|
||||
rms.save("has_more",false);
|
||||
window.history.back();
|
||||
});
|
||||
}
|
||||
else if(vm.myresource_sendIndex == 2){
|
||||
tip = "题目已发送到目标班级的作业列表,但需要您访问Trustie网站设置发布和截止时间,以激活相应作业,谢谢。";
|
||||
vm.alertService.showMessage('发送成功', tip, function () {
|
||||
window.history.back();
|
||||
});
|
||||
}
|
||||
|
||||
vm.alertService.showMessage('发送成功', tip, function () {
|
||||
window.history.back();
|
||||
});
|
||||
} else {
|
||||
vm.alertService.showMessage('发送出错', response.data.message);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
app.directive('commentReply', ['config', function(config){
|
||||
return {
|
||||
templateUrl: config.rootPath+ 'templates/comment_reply.html',
|
||||
scope: {
|
||||
i: "=",
|
||||
journal: "="
|
||||
}
|
||||
}
|
||||
}]);
|
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* Created by Tim on 7/22/16.
|
||||
*/
|
||||
app.directive('ellipsisShow',["$timeout",function(timer){
|
||||
return{
|
||||
restrict: 'A',
|
||||
scope: {},
|
||||
link: function(scope, element){
|
||||
timer(function() {
|
||||
var textContent = element.text();
|
||||
console.log(textContent);
|
||||
//while (textHeight > 100) {
|
||||
// element.text(element.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "..."));
|
||||
//}
|
||||
});
|
||||
}
|
||||
}
|
||||
}]);
|
|
@ -6,7 +6,7 @@ app.directive('inputAuto',function(){
|
|||
var copyContainer = element.parent().children().children().eq(0);
|
||||
var sendButton = element.next();
|
||||
element.on('input',function(){
|
||||
console.log(sendButton);
|
||||
//console.log(sendButton);
|
||||
copyContainer.html(element[0].value);
|
||||
var textHeight = copyContainer[0].scrollHeight-10;
|
||||
element.css('height', textHeight + 'px');
|
||||
|
|
|
@ -60,7 +60,7 @@ app.factory('auth', ['$http','$routeParams', '$q', 'session', 'config',function(
|
|||
}
|
||||
|
||||
var getToken = function(){
|
||||
return session.get("token");
|
||||
return 'token';//session.get("token");
|
||||
}
|
||||
return {get_bind: isBind, token: getToken};
|
||||
}]);
|
||||
|
@ -89,7 +89,7 @@ app.factory('rms', function(){
|
|||
return {save: save, get: get};
|
||||
});
|
||||
|
||||
app.factory('common', ['$http', 'auth', '$routeParams','rms', function($http, auth, $routeParams,rms){
|
||||
app.factory('common', ['$http', 'auth', '$routeParams','rms','config', function($http, auth, $routeParams,rms,config){
|
||||
var addCommonReply = function(id, type, data, cb){
|
||||
|
||||
if(!data.comment || data.comment.length<=0){
|
||||
|
@ -117,6 +117,33 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms', function($http, au
|
|||
if(typeof cb === 'function'){
|
||||
cb();
|
||||
}
|
||||
|
||||
//保证内外回复数一致
|
||||
activities = rms.get("activities") || [];
|
||||
course_activities = rms.get("course_activities") || [];
|
||||
project_activities = rms.get("project_activities") || [];
|
||||
for(var i in activities){
|
||||
if(activities[i].act_id == id){
|
||||
activities[i].reply_count += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(var i in course_activities){
|
||||
if(course_activities[i].act_id == id){
|
||||
course_activities[i].reply_count += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(var i in project_activities){
|
||||
if(project_activities[i].act_id == id){
|
||||
project_activities[i].reply_count += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
rms.save("activities",activities);
|
||||
rms.save("course_activities",course_activities);
|
||||
rms.save("project_activities",project_activities);
|
||||
|
||||
}, function errorCallback(response) {
|
||||
});
|
||||
};
|
||||
|
@ -132,6 +159,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms', function($http, au
|
|||
return $http({
|
||||
method: 'POST',
|
||||
url: apiUrl+ type + "/" + id,
|
||||
dataType: 'jsonp',
|
||||
data:{token:auth.token(),type:replytype,page:page}
|
||||
})
|
||||
};
|
||||
|
@ -268,7 +296,9 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms', function($http, au
|
|||
});
|
||||
};
|
||||
|
||||
args.scope.commentreply_path = config.rootPath+ 'templates/comment_reply.html';
|
||||
|
||||
}
|
||||
|
||||
return {init: init, addCommonReply: addCommonReply, loadCommonData: loadCommonData, addCommonPraise: addCommonPraise, decreaseCommonPraise: decreaseCommonPraise};
|
||||
}]);
|
||||
}]);
|
||||
|
|
|
@ -8,8 +8,8 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', func
|
|||
var makeRoute = function(path, ctrl){
|
||||
return {
|
||||
templateUrl: rootPath + path,
|
||||
controller: ctrl,
|
||||
resolve: resolve
|
||||
controller: ctrl
|
||||
//resolve: resolve
|
||||
}
|
||||
}
|
||||
//$locationProvider.html5Mode(true);
|
||||
|
@ -34,9 +34,15 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', func
|
|||
.when('/new_class', makeRoute('new_class.html', 'NewClassController'))
|
||||
.when('/edit_class', makeRoute('edit_class.html', 'EditClassController'))
|
||||
.when('/class_list', makeRoute('class_list.html', 'ClassListController'))
|
||||
.when('/edit_class_member', makeRoute('edit_class_member.html', 'EditClassMemberController'))
|
||||
.when('/myresource', makeRoute('myresource.html', 'MyResourceController'))
|
||||
.when('/invite_code', {templateUrl: rootPath + 'invite_code.html', controller: 'InviteCodeController'})
|
||||
.when('/send_class_list', makeRoute('send_class_list.html', 'SendClassListController'))
|
||||
.when('/project_list', makeRoute('project_list.html', 'ProjectListController'))
|
||||
.when('/project', makeRoute('project.html', 'ProjectController'))
|
||||
.when('/edit_project_member', makeRoute('edit_project_member.html', 'EditProjectMemberController'))
|
||||
.when('/new_project', makeRoute('new_project.html', 'NewProjectController'))
|
||||
.when('/project_invite_code', {templateUrl: rootPath + 'project_invite_code.html', controller: 'ProjectInviteCodeController'})
|
||||
.otherwise({
|
||||
redirectTo: '/activites'
|
||||
});
|
||||
|
@ -57,6 +63,14 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', func
|
|||
return rejection;
|
||||
},
|
||||
response: function (response) {
|
||||
// var data = response.data;
|
||||
// if(data && data.status==405){
|
||||
// var rootScope = $injector.get('$rootScope');
|
||||
// var state = $injector.get('$rootScope').$state.current.name;
|
||||
// rootScope.stateBeforLogin = state;
|
||||
// rootScope.$state.go("login");
|
||||
// return $q.reject(response);
|
||||
// }
|
||||
$rootScope.activeCalls -= 1;
|
||||
return response;
|
||||
},
|
||||
|
|
|
@ -27,10 +27,12 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin: 5px 0.4em 5px 1.4e
|
|||
.mt70 {margin-top:70px;}
|
||||
.mb5 {margin-bottom:5px;}
|
||||
.mb10 {margin-bottom:10px;}
|
||||
.mb15 {margin-bottom:15px;}
|
||||
.mb20 {margin-bottom:20px;}
|
||||
.mb50 {margin-bottom:50px;}
|
||||
.ml5 {margin-left:5px;}
|
||||
.ml10 {margin-left:10px;}
|
||||
.ml40 {margin-left:40px;}
|
||||
.mr5 {margin-right:5px;}
|
||||
.mr10 {margin-right:10px;}
|
||||
.ml15 {margin-left:15px;}
|
||||
|
@ -84,6 +86,8 @@ a.underline {text-decoration:underline;}
|
|||
.bg-blue:not(.btn-disabled):active {background-color:#2780c2;}
|
||||
.btn-disabled {background-color:#ccc !important;}
|
||||
.btn2 {width:145px; height:35px; color:#fff; font-size:15px; line-height:35px; text-align:center; vertical-align:middle; margin:18px auto 20px auto; border-radius:50px; display:block;}
|
||||
.btn3 {width:145px; height:35px; color:#fff; font-size:15px; line-height:35px; text-align:center; vertical-align:middle; border-radius:50px; display:block;}
|
||||
.fixed-bottom-btn {position:fixed; bottom:5px; left:50%; transform:translate(-50%,0);}
|
||||
|
||||
/*tab*/
|
||||
.tab-wrap {position:relative; width:100%; line-height:38px; display:-webkit-box; display:-moz-box; display:-ms-flexbox; display:-webkit-flex; display:flex; font-size:13px; background-color:#fff;}
|
||||
|
@ -118,12 +122,12 @@ a.underline {text-decoration:underline;}
|
|||
.border-bottom {border-bottom:1px solid #e6e6e6;}
|
||||
.post-reply-wrap {width:100%;}
|
||||
.post-reply-wrap:first-child {border-top:1px solid #ccc;}
|
||||
.post-input-wrap {width:100%; position:fixed; bottom:0;}
|
||||
.post-input-wrap {width:100%; position:fixed; bottom:0; background-color:#fff;}
|
||||
.post-input-wrap2 {width:100%;}
|
||||
.post-reply-row {padding:10px 15px; color:#9a9a9a; background-color:#fff;}
|
||||
.post-reply-row {margin:10px 15px; color:#9a9a9a; background-color:#fff; border-bottom:1px solid #f0f0f0;}
|
||||
.post-reply-avatar {width:45px; height:30px; text-align:center; margin-right:10px;}
|
||||
.post-reply-user {font-size:13px; text-align:left; margin-bottom:10px;}
|
||||
.post-reply-content {font-size:13px; text-align:left; word-break:break-all; word-wrap:break-word; overflow:hidden; padding-bottom:15px; border-bottom:1px solid #ccc;}
|
||||
.post-reply-content {font-size:13px; word-break:break-all; word-wrap:break-word; overflow:hidden; text-align:justify;}
|
||||
.post-reply-content img {max-width:100%;}
|
||||
.post-reply-content a {color:#136ec2;}
|
||||
.post-reply-date, .post-reply-trigger {font-size:13px;}
|
||||
|
@ -144,6 +148,8 @@ a.underline {text-decoration:underline;}
|
|||
.post-dynamic-title {font-size:15px;}
|
||||
.post-dynamic-from {width:50%; font-size:13px;}
|
||||
.post-box-shadow {box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
.post-reply-author {width:50%; height:20px; line-height:20px; font-size:12px; color:#5d5d5d; vertical-align:middle;}
|
||||
.post-reply-time {height:20px; line-height:20px; vertical-align:middle;}
|
||||
|
||||
/* loading 弹框*/
|
||||
.loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;}
|
||||
|
@ -191,13 +197,14 @@ a.underline {text-decoration:underline;}
|
|||
.class-detail-search {width:100%; height:33px; color:#999; background-color:#fff; border:none; outline:none;}
|
||||
.border-top {border-top:1px solid #ccc;}
|
||||
.class-detail-row {width:100%; line-height:18px; padding:10px 0; border-bottom:1px solid #ccc; background-color:#fff;}
|
||||
.class-member-row {width:100%; line-height:18px; padding:5px 0; border-bottom:1px solid #ccc; background-color:#fff;}
|
||||
.class-member-row {width:100%; line-height:18px; padding:5px 0; border-bottom:1px solid #ccc; background-color:#fff; position:relative;}
|
||||
.class-test-tip {text-align:center; font-size:13px; color:#444; padding-top:40px;}
|
||||
.img-circle {border-radius:50%;}
|
||||
.img-circle {border-radius:50% !important;}
|
||||
.member-banner {height:24px; line-height:24px; text-align:center; vertical-align:middle; background-color:#dfdfdf;}
|
||||
.resource-width {width:76%;}
|
||||
.courseware-from-width {max-width:57%;}
|
||||
.other-from-width {max-width:80%;}
|
||||
.course-name-width {width:68%;}
|
||||
|
||||
/*20160614班级列表*/
|
||||
.course-diff-row {width:100%; height:28px; line-height:28px; vertical-align:middle; background-color:#fff; border-bottom:1px solid #ccc;}
|
||||
|
@ -212,7 +219,8 @@ a.underline {text-decoration:underline;}
|
|||
.new-class-btn {font-size:15px; color:#fff; background-color:#3b94d6; padding:10px 40px; border-radius:20px; display:inline-block; margin:0 auto;}
|
||||
.join-class-btn {font-size:15px; color:#444; background-color:#ccc; padding:10px 40px; border-radius:20px; display:inline-block; margin:0 auto;}
|
||||
.new-class-input {width:60%; color:#555; height:16px; line-height:16px; vertical-align:middle; border:none; outline:none; padding:8px 0;}
|
||||
.class-list-setting {position:absolute; top:10px; right:10px;}
|
||||
.class-list-setting {position:absolute; top:11px; right:10px;}
|
||||
.class-setting-wrap {width:38px; height:38px; position:absolute; top:0; right:0;}
|
||||
|
||||
/*20160616登录注册*/
|
||||
.login-wrap {padding:0 10px;}
|
||||
|
@ -227,6 +235,6 @@ a.underline {text-decoration:underline;}
|
|||
|
||||
/*二级回复*/
|
||||
.mult-reply-container{ border:solid 1px #f3ddb3; background:#fffef4; padding:4px;color:#999;}
|
||||
.mult-reply-content{ color:#707070; font-size:13px;}
|
||||
.mult-reply-content{ color:#555; font-size:13px;}
|
||||
.mult-reply-hide{ text-align:center; display:block; font-size:14px; color:#aaa; border-bottom:1px solid #F3DDB3; padding:8px 0;}
|
||||
.mult-reply-arrow{ color:#aaa; margin-right:10px; font-size:14px; font-weight:bold;}
|
Loading…
Reference in New Issue