diff --git a/.gitignore b/.gitignore index a1f5f7e76..9d33b264c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /config/configuration.yml /config/additional_environment.rb /config/oneapm.yml +/config/environments/production.rb /files/* diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index 4d07c23f8..6ce01aac0 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -36,7 +36,7 @@ module Mobile principal_types = "JournalsForMessage" watched_user_ids = User.watched_by(user.id).count == 0 ? " " : ("," + User.watched_by(user.id).map{|u| u.id.to_s }.join(',')) user_ids = "(" + user.id.to_s + watched_user_ids + ")" - watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}").count == 0 ? " " :Blog.select("id").where("author_id in #{user_ids}").map { |blog| blog.id}.join(",") + watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}").count == 0 ? "-1" :Blog.select("id").where("author_id in #{user_ids}").map { |blog| blog.id}.join(",") blog_ids = "(" + watched_user_blog_ids + ")" if container_type == "Course" diff --git a/app/api/mobile/apis/newss.rb b/app/api/mobile/apis/newss.rb index 810e4ff2a..0f03905a5 100644 --- a/app/api/mobile/apis/newss.rb +++ b/app/api/mobile/apis/newss.rb @@ -35,6 +35,8 @@ module Mobile present :is_public, is_public present :status, 0 rescue Exception=>e + Rails.logger.info "course_notice is not find!" + Rails.logger.info e present :status, -1 present :message, e.message end diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 9deeec58e..b36b8039b 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -73,6 +73,12 @@ module Mobile elsif ac.container_type == "Blog" "发表博客" end + when :syllabus_title + if ac.container_type == "Course" + course = get_course(ac.container_id) + name = course.syllabus.nil? ? "":course.syllabus.title + name + end when :course_project_id if ac.container_type == "Course" ac.container_id @@ -145,6 +151,7 @@ module Mobile act_expose :latest_update #最新更新时间 act_expose :course_project_id #课程/项目ID act_expose :course_project_name #课程/项目名字 + act_expose :syllabus_title #课程名字 act_expose :activity_type_name #课程问答区/项目缺陷等 expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| if instance.act_type == "HomeworkCommon" || instance.act_type == "News" || instance.act_type == "Message" || instance.act_type == "BlogComment" || instance.act_type == "JournalsForMessage" || instance.act_type == "Issue" diff --git a/app/api/mobile/entities/course.rb b/app/api/mobile/entities/course.rb index fc78cc14e..30a5a6cc9 100644 --- a/app/api/mobile/entities/course.rb +++ b/app/api/mobile/entities/course.rb @@ -107,6 +107,7 @@ module Mobile course_expose :current_user_is_member course_expose :current_user_is_teacher course_expose :work_unit + course_expose :syllabus_title end end end diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index e542d1e1d..403119e20 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -894,12 +894,15 @@ class CoursesController < ApplicationController # return # end #更新创建课程消息状态 - create_course_messages = @course.course_messages.where("user_id =? and course_message_type =? and course_id =? and viewed =?", User.current.id, 'Course', @course.id, 0) - create_course_messages.update_all(:viewed => true) + course_request_messages = CourseMessage.where(:user_id => User.current.id, :course_id => @course.id, :course_message_type => ["CourseRequestDealResult", "Course"], :viewed => false) + course_request_messages.update_all(:viewed => true) + + # create_course_messages = @course.course_messages.where("user_id =? and course_message_type =? and course_id =? and viewed =?", User.current.id, 'Course', @course.id, 0) + # create_course_messages.update_all(:viewed => true) #更新申请结果反馈消息的状态 - course_request_messages = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @course.id, 'CourseRequestDealResult', false) - course_request_messages.update_all(:viewed => true) + # course_request_messages = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @course.id, 'CourseRequestDealResult', false) + # course_request_messages.update_all(:viewed => true) course_activities = @course.course_activities @canShowRealName = User.current.member_of_course? @course diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 3e41e2c91..37383712f 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -92,7 +92,13 @@ class MessagesController < ApplicationController @message.board = @board @message.safe_attributes = params[:message] if request.post? - @message.save_attachments(params[:attachments]) + if @project + is_public = @project.is_public + elsif @course + is_public = @course.is_public + end + # 公开项目/课程上传的资源是公开的,私有项目上传的是私有的 + @message.save_attachments_containers(params[:attachments], User.current, is_public) if @message.save # 更新kindeditor上传的图片资源所有者 if params[:asset_id] diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 190c3852b..660e4d76c 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -1,3 +1,4 @@ +#encoding: utf-8 # Redmine - project management software # Copyright (C) 2006-2013 Jean-Philippe Lang # @@ -212,6 +213,19 @@ class NewsController < ApplicationController @news.safe_attributes = params[:news] @news.save_attachments(params[:attachments]) if @news.save + @course.members.each do |m| + if m.user_id != User.current.id + #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) + count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{@news.course_id}").count + if count == 0 + ws = WechatService.new + content = @news.title + name = @news.course.syllabus.nil? ? @news.course.name : @news.course.syllabus.title+" • "+@news.course.name + ws.class_notice m.user_id, "course_notice", @news.id, "#{l(:label_new_notice_template)}", name, @news.author.show_name, format_time(@news.created_on), content, "点击查看通知详情" + end + end + end + if params[:asset_id] ids = params[:asset_id].split(',') update_kindeditor_assets_owner ids,@news.id,OwnerTypeHelper::NEWS diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 8d4c09ded..df40eb378 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -325,27 +325,27 @@ class ProjectsController < ApplicationController end # 版本库统计图 - unless @project.gpid.nil? || @project.project_score.changeset_num == 0 - # rep_statics_commit = @project.rep_statics.order("commits_num desc") - rep_statics_commit = RepStatics.find_by_sql("SELECT * FROM `rep_statics` where project_id = #{@project.id} order by commits_num desc limit 10") - rep_statics_code = RepStatics.find_by_sql("SELECT * FROM `rep_statics` where project_id = #{@project.id} order by changeset desc limit 10") - # rep_statics_code = @project.rep_statics.sort_by {|u| u.changeset}.reverse - @a_uname = rep_statics_commit.map {|s| s.uname } - @a_uname_code = rep_statics_code.map {|s| s.uname } - @a_commits_num = rep_statics_commit.map {|s| s.commits_num.to_i } - @a_commits_add = rep_statics_code.map {|s| s.add.to_i } - @a_commits_del = rep_statics_code.map {|s| s.del.to_i } - @a_commits_changeset = rep_statics_code.map {|s| s.changeset.to_i } - g = Gitlab.client - begin - gid = @project.gpid - g_project = g.project(gid) - g_branch = g_project.default_branch.to_s - rescue =>e - logger.error("get default branch failed: " + e) - end - @rev = g_branch.nil? ? "master" : g_branch - end + # unless @project.gpid.nil? || @project.project_score.changeset_num == 0 + # # rep_statics_commit = @project.rep_statics.order("commits_num desc") + # rep_statics_commit = RepStatics.find_by_sql("SELECT * FROM `rep_statics` where project_id = #{@project.id} order by commits_num desc limit 10") + # rep_statics_code = RepStatics.find_by_sql("SELECT * FROM `rep_statics` where project_id = #{@project.id} order by changeset desc limit 10") + # # rep_statics_code = @project.rep_statics.sort_by {|u| u.changeset}.reverse + # @a_uname = rep_statics_commit.map {|s| s.uname } + # @a_uname_code = rep_statics_code.map {|s| s.uname } + # @a_commits_num = rep_statics_commit.map {|s| s.commits_num.to_i } + # @a_commits_add = rep_statics_code.map {|s| s.add.to_i } + # @a_commits_del = rep_statics_code.map {|s| s.del.to_i } + # @a_commits_changeset = rep_statics_code.map {|s| s.changeset.to_i } + # g = Gitlab.client + # begin + # gid = @project.gpid + # g_project = g.project(gid) + # g_branch = g_project.default_branch.to_s + # rescue =>e + # logger.error("get default branch failed: " + e) + # end + # @rev = g_branch.nil? ? "master" : g_branch + # end # 根据对应的请求,返回对应的数据 respond_to do |format| format.html diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index e8c061b5c..f6a97e66c 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -338,41 +338,17 @@ class StudentWorkController < ApplicationController end def index - # 作业消息状态更新 - @homework.course_messages.each do |homework_message| - if User.current.id == homework_message.user_id && homework_message.viewed == 0 - homework_message.update_attributes(:viewed => true) if homework_message.viewed == 0 - end - end - - #修改作品提示消息更新 - student_work_messages = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, StudentWork.name, 0) - student_work_messages.each do |message| - message.update_attribute(:viewed, true) - end - + # 作业消息状态更新? + homeworkcommon_messages = CourseMessage.where(:user_id => User.current.id, :viewed => 0, :course_message_id => @homework.id, :course_message_type => "HomeWorkCommon") + homeworkcommon_messages.update_all(:viewed => true) + studentwork_messages = CourseMessage.where(:user_id => User.current.id, :viewed => 0, :course_id => @homework.course, :course_message_type => "StudentWork") + studentwork_messages.update_all(:viewed => true) # 作品打分消息状态更新 studentworks_scores = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, "StudentWorksScore", 0) - studentworks_scores.each do |studentworks_score| - studentworks_score.update_attributes(:viewed => true) if studentworks_score.viewed == 0 - end + studentworks_scores.update_all(:viewed => true) # 作品评论消息状态更新 journals_for_teacher = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, "JournalsForMessage", 0) - journals_for_teacher.each do |journal_for_teacher| - journal_for_teacher.update_attributes(:viewed => true) - end - #不能参与作业匿评消息状态更新 - no_evaluation = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =? and status =?", User.current.id, @homework.course, "StudentWork", 0, 0) - no_evaluation.update_all(:viewed => true) - # 作品留言 - # 消息end - #设置作业对应的forge_messages表的viewed字段 - query_student_work = @homework.course_messages - query_student_work.each do |query| - if User.current.id == query.user_id - query.update_attributes(:viewed => true) - end - end + journals_for_teacher.update_all(:viewed => true) ################################################################################################################## @order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name].to_s.strip || "",params[:group] @homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).order("created_at desc") @@ -480,7 +456,7 @@ class StudentWorkController < ApplicationController elsif @order == 'student_id' @stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").joins("join user_extensions on student_works.user_id = user_extensions.user_id").order("#{@order} #{@b_sort}"),@name else - @stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").order("#{@order} #{@b_sort}"),@name + @stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").includes(:user => {:user_extensions => []}, :project => {}, :student_works_scores => {}).order("#{@order} #{@b_sort}"),@name end @show_all = true elsif User.current.member_of_course?(@course) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7e9add5e2..bdbaf1738 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1683,7 +1683,7 @@ class UsersController < ApplicationController container_type = 'Project' act_type = 'Issue' when "project_message" - container_type = 'Course' + container_type = 'Project' act_type = 'Message' when "user_journals" container_type = 'Principal' diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 0c6eb0910..92864d490 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -8,13 +8,13 @@ class WechatsController < ActionController::Base # default text responder when no other match on :text do |request, content| #邀请码 - if join_class_request(request) - sendBindClass(request, {invite_code: content}) - elsif join_project_request(request) - sendBindProject(request, {invite_code: content}) - else + # if join_class_request(request) + # sendBindClass(request, {invite_code: content}) + # elsif join_project_request(request) + # sendBindProject(request, {invite_code: content}) + # else request.reply.text "您的意见已收到,非常感谢~ \n更多问题可以通过以下方式联系我们:\n官方QQ群:173184401\n我们会认真聆听您的意见和建议。" - end + # end end # When receive 'help', will trigger this responder @@ -456,18 +456,29 @@ class WechatsController < ActionController::Base session[:wechat_openid] = open_id if params[:code] - # if params[:state].match("review_class_member") || params[:state].match("review_project_member") + if !(params[:state] == "invite_code" || params[:state] == "project_invite_code" || params[:state] == "blog_comment" || params[:state] == "course_notice" || params[:state] == "project_discussion" || params[:state] == "course_discussion" || params[:state] == "homework" || params[:state] == "issues" || params[:state] == "journal_for_message") + uw = user_binded?(open_id) + if uw + user = uw.user + lastname = user.lastname + end + end + + if lastname && lastname == "" + @path = '/edit_userinfo' + else @path = params[:state].split('/')[0] useridstr = params[:state].split('/')[1] - # end - if useridstr - redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}&#{useridstr}" and return - elsif params[:id] - redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return - else - redirect_to "/wechat/user_activities##{@path}" and return + + if useridstr + redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}&#{useridstr}" and return + elsif params[:id] + redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return + else + redirect_to "/wechat/user_activities##{@path}" and return + end + # redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return end - # redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return end end render 'wechats/user_activities', layout: nil diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a370f226c..d3b28fb20 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -345,7 +345,11 @@ module ApplicationHelper def link_to_isuue_user(user, options={}) if user.is_a?(User) - name = h(user.name(options[:format])) + if options[:format] + name = h(user.name(options[:format])) + else + name = h(user.show_name) + end link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => "pro_info_p" else h(user.to_s) @@ -921,6 +925,12 @@ module ApplicationHelper s.html_safe end + # 计算Pull Request的请求数目 + def pull_request_count project + g = Gitlab.client + g.merge_requests(project.gpid).count + end + #项目成员列表复选框生成 def project_member_check_box_tags_ex name, principals s = '' @@ -978,7 +988,7 @@ module ApplicationHelper groups = '' collection.sort.each do |element| selected_attribute = ' selected="selected"' if option_value_selected?(element, selected) - (element.is_a?(Group) ? groups : s) << %() + (element.is_a?(Group) ? groups : s) << %() end unless groups.empty? s << %(#{groups}) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index b7bf3543c..f119e0e69 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -63,6 +63,7 @@ module CoursesHelper # searchTeacherAndAssistant(project).count end + # 统计数目 def show_nav?(count) count == 0 ? true : false end @@ -795,11 +796,12 @@ module CoursesHelper link.html_safe end + # 可以查看到资源库的资源 def visable_attachemnts_incourse course return[] unless course result = [] course.attachments.each do |attachment| - if (attachment.is_public? && attachment.is_publish == 1) ||User.current == attachment.author ||User.current.allowed_to?(:as_teacher,course)|| (User.current.member_of_course?(course) && attachment.is_publish == 1) || User.current.admin? + if attachment.is_public? && attachment.is_publish == 1 || User.current == attachment.author || User.current.allowed_to?(:as_teacher,course) || (User.current.member_of_course?(course) && attachment.is_publish == 1) || User.current.admin? result << attachment end end diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index b161e29e9..5a124849f 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -111,9 +111,9 @@ module IssuesHelper def principals_options_for_isuue_list(project) if User.current.member_of?(project) - project.members.includes(:user).order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["<< #{l(:label_me)} >>", User.current.id]).unshift(["指派给", 0]) + project.members.includes(:user).order("lower(users.login)").map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["<< #{l(:label_me)} >>", User.current.id]).unshift(["指派给", 0]) else - project.members.includes(:user).order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给", 0]) + project.members.includes(:user).order("lower(users.login)").map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["指派给", 0]) end end diff --git a/app/models/at_message.rb b/app/models/at_message.rb index 2212ef07e..10afe3e79 100644 --- a/app/models/at_message.rb +++ b/app/models/at_message.rb @@ -99,7 +99,7 @@ class AtMessage < ActiveRecord::Base else type = "journal_for_message" detail_id = topic.id - detail_title = at_message.notes + detail_title = topic.notes.nil? ? "" : topic.notes end else status = -1 diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index a901e6338..7a082cecf 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -77,7 +77,8 @@ class HomeworkCommon < ActiveRecord::Base count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count if count == 0 ws = WechatService.new - ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", self.course.name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") + name = self.course.syllabus.nil? ? self.course.name : self.course.syllabus.title+" • "+self.course.name + ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") end # end end diff --git a/app/models/news.rb b/app/models/news.rb index cd7156cca..58bbc40ac 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -62,7 +62,7 @@ class News < ActiveRecord::Base :author_key => :author_id acts_as_watchable - after_create :act_as_activity,:act_as_forge_activity, :act_as_course_activity, :add_author_as_watcher, :send_mail, :add_news_count, :act_as_student_score, :act_as_system_message, :delay_news_send + after_create :act_as_forge_activity, :act_as_course_activity, :add_author_as_watcher, :send_mail, :add_news_count, :act_as_student_score, :act_as_system_message, :delay_news_send after_update :update_activity after_destroy :delete_kindeditor_assets, :decrease_news_count, :delete_org_activities, :down_course_score @@ -140,19 +140,13 @@ class News < ActiveRecord::Base Watcher.create(:watchable => self, :user => author) end - ## fq - def act_as_activity - self.acts << Activity.new(:user_id => self.author_id) - end - # Time 2015-02-27 15:48:17 # Author lizanle # Description 公用表中也要记录 def act_as_forge_activity # 如果是project为空,那么是课程相关的,不需要保存 if self.project - self.forge_acts << ForgeActivity.new(:user_id => self.author_id, - :project_id => self.project.id) + self.forge_acts << ForgeActivity.new(:user_id => self.author_id, :project_id => self.project.id) end end @@ -167,17 +161,17 @@ class News < ActiveRecord::Base # 消息发送原则:除了消息的发布者,课程的其它成员都能收到消息提醒 def act_as_system_message if self.course - self.course.members.each do |m| - if m.user_id != self.author_id - #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) - count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count - if count == 0 - ws = WechatService.new - content = self.title - ws.class_notice m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", self.course.name, self.author.show_name, format_time(self.created_on), content, "点击查看通知详情" - end - end - end + # self.course.members.each do |m| + # if m.user_id != self.author_id + # #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) + # count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count + # if count == 0 + # ws = WechatService.new + # content = self.title + # ws.class_notice m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", self.course.name, self.author.show_name, format_time(self.created_on), content, "点击查看通知详情" + # end + # end + # end else if !self.project.nil? self.project.members.each do |m| @@ -198,7 +192,7 @@ class News < ActiveRecord::Base def contain_news_message self.course.members.each do |m| if m.user_id != self.author_id - self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => container_id, :viewed => false) + self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) end end end diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 24e15f369..5add9979d 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -332,7 +332,7 @@ class CoursesService # unless (course.is_public == 1 || current_user.member_of_course?(course) || current_user.admin?) # raise '403' # end - {:course => course,:work_unit => work_unit, :img_url => url_to_avatar(course),:current_user_is_member => current_user.nil? ? false : current_user.member_of_course?(course),:current_user_is_teacher => current_user.nil? ? false : is_course_teacher(current_user,course),:course_student_num => course ? course.student.count.to_s : 0} + {:course => course,:syllabus_title => course.syllabus.nil? ? "":course.syllabus.title ,:work_unit => work_unit, :img_url => url_to_avatar(course),:current_user_is_member => current_user.nil? ? false : current_user.member_of_course?(course),:current_user_is_teacher => current_user.nil? ? false : is_course_teacher(current_user,course),:course_student_num => course ? course.student.count.to_s : 0} end #创建课程 @@ -554,8 +554,10 @@ class CoursesService uid = user.id type = "review_class_member" end + + name = course.syllabus.nil? ? course.name : course.syllabus.title+" • "+course.name ws = WechatService.new - ws.class_notice user.id, type, course.id, title, course.name, user.show_name, format_time(Time.now), content, remark,uid + ws.class_notice user.id, type, course.id, title,name, user.show_name, format_time(Time.now), content, remark,uid end end @@ -650,8 +652,9 @@ class CoursesService rolename = role_ids.include?("7") ? "助教" : "教师" content = current_user.show_name + "申请以"+rolename+"身份加入班级,等待您的审批。" + name = course.syllabus.nil? ? course.name : course.syllabus.title+" • "+course.name ws = WechatService.new - ws.class_notice tea_user.id, "review_class_member", course.id, "班级成员审批通知。", course.name, tea_user.show_name, format_time(Time.now), content, "点击查看申请详情。",current_user.id + ws.class_notice tea_user.id, "review_class_member", course.id, "班级成员审批通知。", name, tea_user.show_name, format_time(Time.now), content, "点击查看申请详情。",current_user.id end end #-------------------------------------------- diff --git a/app/services/syllabuses_service.rb b/app/services/syllabuses_service.rb index f12ae67cc..caf6e052e 100644 --- a/app/services/syllabuses_service.rb +++ b/app/services/syllabuses_service.rb @@ -69,7 +69,8 @@ class SyllabusesService if count == 0 ws = WechatService.new title = "恭喜您创建班级成功。" - ws.create_class_notice user.id, "create_course_notice", course.id,title, course.name, user.show_name, 1, "点击查看班级详情。" + name = course.syllabus.nil? ? course.name : course.syllabus.title+" • "+course.name + ws.create_class_notice user.id, "create_course_notice", course.id,title, name, user.show_name, 1, "点击查看班级详情。" end end diff --git a/app/views/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb index b37c80dad..48c01468a 100644 --- a/app/views/attachments/_activity_attach.html.erb +++ b/app/views/attachments/_activity_attach.html.erb @@ -9,8 +9,9 @@ ( <%= number_to_human_size attachment.filesize %>) - - <%= link_to h(truncate(attachment.author.name, length: 15, omission: '...')),user_path(attachment.author),:class => "c_orange" %>, + <% user_name = attachment.author.show_name.empty? ? attachment.author : attachment.author.show_name %> + + <%= link_to h(truncate(user_name, length: 15, omission: '...')),user_path(attachment.author),:class => "linkBlue2" %>, <%= format_time(attachment.created_on) %> diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index 759a9a735..4d261c5d1 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -91,8 +91,8 @@   <% end %> <% if options[:author] %> - - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "link-blue" %>, + + <%= link_to h(truncate(attachment.author.show_name, length: 10, omission: '...')),user_path(attachment.author),:class => "link-blue" %>, <%= format_time(attachment.created_on) %> <% end %> diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index ec9f4f7de..9a52fb410 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -11,7 +11,8 @@ <%#= link_to forum.name.gsub(/(\r\n|\s+)/,'
'), forum_path(forum),:class=>"f16 linkBlue" %>
<%= textAreailizable forum.description%>
- + <% user_name = forum.creator.show_name.empty? ? forum.creator.name : forum.creator.show_name %> +
创建者:<%= user_name %>
diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index 11b1403cd..c3b8b4dbe 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -27,7 +27,7 @@
<% author = topic.last_reply.try(:author)%> <% if author%> -
最后回复:<%= author.name%>
+
最后回复:<%= author.show_name%>
<%= format_date(topic.last_reply.created_at)%>
<% end%> 更新时间:<%= format_date(topic.updated_at)%> diff --git a/app/views/issues/_detail.html.erb b/app/views/issues/_detail.html.erb index ac912a71c..9ae3dfc43 100644 --- a/app/views/issues/_detail.html.erb +++ b/app/views/issues/_detail.html.erb @@ -20,7 +20,7 @@ <%= get_issue_priority(@issue.priority_id)[1] %>


- 由<%=link_to @issue.author, user_path(@issue.author), :class => "link-blue" %>添加于 <%= format_time(@issue.created_on).html_safe %> + 由<%=link_to @issue.author.show_name, user_path(@issue.author), :class => "link-blue" %>添加于 <%= format_time(@issue.created_on).html_safe %> diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index ccd37dc91..ea15af42e 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -3,7 +3,7 @@ <%= import_ke(enable_at: true, prettify: false, init_activity: false) %> <% end %> -<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true, :remote => true} do |f| %> +<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %> <%= error_messages_for 'issue', 'time_entry' %> <%= render :partial => 'conflict' if @conflict %> diff --git a/app/views/issues/_jounal_refresh.js.erb b/app/views/issues/_jounal_refresh.js.erb index db5a068bf..5ccbf69d2 100644 --- a/app/views/issues/_jounal_refresh.js.erb +++ b/app/views/issues/_jounal_refresh.js.erb @@ -1,3 +1,8 @@ +/* $("#reply_div_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue}) %>"); +$("#issue_detail_show").html('<%#= escape_javascript(render :partial => 'issues/detail') %>'); +$("#issue_edit_show").html('<%#= escape_javascript(render :partial => 'issues/edit') %>'); +$("#div_issue_attachment_<%#=@issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/issue_attachments', :locals => {:issue => @issue}) %>"); +sd_create_editor_from_data(<%#= @issue.id %>, null, "100%", "<%#= @issue.class.name %>");*/ location.reload(); issue_desc_editor = KindEditor.create('#issue_description', @@ -14,3 +19,5 @@ issue_desc_editor = KindEditor.create('#issue_description', "uploadJson":"/kindeditor/upload", "fileManagerJson":"/kindeditor/filemanager"}); // $("#issue_test_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/edit', :locals => {:issue => Issue.find( @issue_id)}) %>"); +// $(".homepagePostReplyBannerCount").html('<%#= escape_javascript(render :partial => 'issues/issue_reply_banner') %>'); +// sd_create_editor_from_data(<%#= @issue.id%>, null, "100%","<%#= @issue.class.name %>"); \ No newline at end of file diff --git a/app/views/issues/update.js.erb b/app/views/issues/update.js.erb index 733066d38..bcf4c3077 100644 --- a/app/views/issues/update.js.erb +++ b/app/views/issues/update.js.erb @@ -1,4 +1,13 @@ <% if @saved %> +/*$("#issue_detail").replaceWith('<%#= escape_javascript(render :partial => 'issues/detail') %>'); +$("#issue_edit").replaceWith('<%#= escape_javascript(render :partial => 'issues/edit') %>'); + +$("#issue_detail").show(); +$("#issue_edit").hide(); + +$("#reply_div_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue,:replies_all_i=>0}) %>"); +sd_create_editor_from_data(<%#= @issue.id%>, null, "100%","<%#=@issue.class.name%>"); +$(".homepagePostReplyBannerCount").html('<%#= escape_javascript(render :partial => 'issues/issue_reply_banner') %>');*/ location.reload(); //edit里的编辑器貌似显示不出来,所以手动js生成。 issue_desc_editor = KindEditor.create('#issue_description', diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index ea63f680f..db90c47c4 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -1,41 +1,51 @@ <%= javascript_include_tag "feedback" %> -
+
-
-
- - - - +
+ 问题和建议 + × +
-
-
+
+
<% get_memo %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> - <%= f.text_area :subject, :id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> + <%= f.text_area :subject, :id=>"subject", :class => "opnionText mb5", :placeholder => l(:label_feedback_tips) %> <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> - - + 还能输入50个字符 + <%= l(:label_submit)%> +
<% end %>
-
+
+
+
- <%#= l(:label_technical_support) %> + <%#= l(:label_technical_support) %> - - - Trustie师姐师兄答疑群 + + + +

加入QQ群

+
+
+

关注官方微信

+
-
-
- <%= l(:label_submit)%> - +
+
+
+ +
+
+ × +
diff --git a/app/views/layouts/_user_courses.html.erb b/app/views/layouts/_user_courses.html.erb index 754cfd10b..60db07db0 100644 --- a/app/views/layouts/_user_courses.html.erb +++ b/app/views/layouts/_user_courses.html.erb @@ -2,10 +2,17 @@
  • <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %> -

    - <%= link_to course.syllabus.title, syllabus_path(course.syllabus_id), :target => '_blank', :class => 'hidden', :style => "max-width:85px; display:inline-block;"%> +

    + <% title = "#{course.syllabus.title}".html_safe %> + <%= link_to title, syllabus_path(course.syllabus_id), :target => '_blank', :class => 'hidden', :style => "max-width:91px; display:inline-block;"%> · - <%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :class => 'hidden', :style => "max-width:85px; display:inline-block;"%> + <% classes = "#{course.name}".html_safe %> + <%= link_to classes, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :class => 'hidden', :style => "max-width:91px; display:inline-block;"%> + + 课程名称:<%= course.syllabus.title %>
    + 班级名称:<%= course.name+'('+current_time_and_term(course)+')' %>
    + 班级属性:<%= course.is_public? ? '公开' : '私有' %> +

    <%#= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :id => "show_course_#{course.id}", :class => 'course_list_menu hidden', :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+"("+current_time_and_term(course)+")"%> @@ -106,11 +113,25 @@ } $(".course_list_menu").each(function(){ - var courseWidth = $(this).children().eq(0).width(); - var classWidth = 170 -courseWidth; + var courseWidth = $(this).children().eq(0).children().width(); + var classWidth = $(this).children().eq(2).children().width(); + var newClassWidth = 182 - courseWidth; + var newCourseWidth = 182 - classWidth; console.log(courseWidth, classWidth); - if(courseWidth < 80){ - $(this).children().eq(2).css("max-width",classWidth + "px"); + if(courseWidth < 91 && classWidth > 91){ + $(this).children().eq(2).css("max-width",newClassWidth + "px"); + } + if(classWidth < 91 && courseWidth > 91){ + $(this).children().eq(0).css("max-width",newCourseWidth + "px"); } }) + + $(".course-name").each(function(){ + $(this).mouseenter(function(){ + $(this).parent().parent().children().eq(3).show(); + }); + $(this).mouseleave(function(){ + $(this).parent().parent().children().eq(3).hide(); + }); + }) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 2c72e3e2e..84aa054e0 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -1,6 +1,7 @@ <%# course_model %> -<%# course_file_num = visable_attachemnts_incourse(@course).count%> -<% course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> +<%# course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> + +<% course_file_num = visable_attachemnts_incourse(@course).count%> <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> <% homework_num = visable_course_homework @course %> diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 021b281d9..b57feb5bd 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -187,7 +187,8 @@
  • <%= @forum.name%>
    - + <% user_name = @forum.creator.show_name.empty? ? @forum.creator.name : @forum.creator.show_name %> +
    diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index d684b4297..bf1485cf3 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -58,7 +58,7 @@
    - <%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%>
    + <%= link_to @memo.author.show_name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%>
    <%= format_date( @memo.created_at)%>
    @@ -90,7 +90,7 @@
    <%= reply.author.name%><%= format_date(reply.created_at) %>
    -
    <%= h reply.content.html_safe%>
    +
    <%= reply.content.gsub(/script/, "script ").html_safe %>
    + +<% end %> + diff --git a/app/views/users/_project_issue_detail.html.erb b/app/views/users/_project_issue_detail.html.erb index 95e297f49..321ba663a 100644 --- a/app/views/users/_project_issue_detail.html.erb +++ b/app/views/users/_project_issue_detail.html.erb @@ -62,7 +62,7 @@
  •  指派  : 

    - <%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %> + <%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %> <%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project), { :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0}, diff --git a/app/views/users/user_organizations.html.erb b/app/views/users/user_organizations.html.erb index 3dc8332da..86177f2e4 100644 --- a/app/views/users/user_organizations.html.erb +++ b/app/views/users/user_organizations.html.erb @@ -25,7 +25,8 @@ <%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
  • <%= org.description %>
    -
    创建者:<%= link_to User.find(org.creator_id), user_path(org.creator_id), :class => 'linkGrey2', :target => '_blank' %>
    + <% user_name = User.find(org.creator_id).show_name.empty? ? User.find(org.creator_id) : User.find(org.creator_id).show_name %> +
    创建者:<%= link_to user_name, user_path(org.creator_id), :class => 'linkGrey2', :target => '_blank' %>
    您的身份:<%= User.current.admin_of_org?(org) ? "组织管理员" : "组织成员" %>
    diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index 49d5f4d03..cfe52e11a 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -358,7 +358,7 @@ zh: # 意见反馈 # label_feedback: 意见反馈 - label_feedback_tips: "请在此发布平台问题和建议,或直接加入答疑群,谢谢!" + label_feedback_tips: "在此输入对平台问题和建议,您也可以通过QQ、微信留言,谢谢!" label_technical_support: "QQ 在线支持:" label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!" label_feedback_value: "该帖来自用户反馈:)" diff --git a/db/migrate/20160913063446_add_index_to_student_works_scores.rb b/db/migrate/20160913063446_add_index_to_student_works_scores.rb new file mode 100644 index 000000000..f21843289 --- /dev/null +++ b/db/migrate/20160913063446_add_index_to_student_works_scores.rb @@ -0,0 +1,6 @@ +class AddIndexToStudentWorksScores < ActiveRecord::Migration + def change + add_index :student_works_scores, :user_id, name: 'user_id' + add_index :student_works_scores, :student_work_id, name: 'student_work_id' + end +end diff --git a/db/migrate/20160914073340_update_user_extensions.rb b/db/migrate/20160914073340_update_user_extensions.rb new file mode 100644 index 000000000..63d15437b --- /dev/null +++ b/db/migrate/20160914073340_update_user_extensions.rb @@ -0,0 +1,9 @@ +class UpdateUserExtensions < ActiveRecord::Migration + def up + ues = UserExtensions.where(:school_id => 0) + ues.update_all(:school_id => nil) + end + + def down + end +end diff --git a/db/migrate/20160918033136_update_issue_author.rb b/db/migrate/20160918033136_update_issue_author.rb new file mode 100644 index 000000000..8cbc99d6d --- /dev/null +++ b/db/migrate/20160918033136_update_issue_author.rb @@ -0,0 +1,13 @@ +class UpdateIssueAuthor < ActiveRecord::Migration + def up + begin + issue = Issue.find(9377) + issue.update_column(:author_id, 15341) + rescue Exception => e + puts e + end + end + + def down + end +end diff --git a/db/migrate/20160918074635_update_attach_public_for_message.rb b/db/migrate/20160918074635_update_attach_public_for_message.rb new file mode 100644 index 000000000..5f9b51c5a --- /dev/null +++ b/db/migrate/20160918074635_update_attach_public_for_message.rb @@ -0,0 +1,13 @@ +class UpdateAttachPublicForMessage < ActiveRecord::Migration + def up + begin + attachments = Attachment.where(:container_type => "Message", :is_public => 0) + attachments.update_all(:is_public => 1) + rescue Exception => e + puts e + end + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 4b188ecbb..443e8c426 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160907061917) do +ActiveRecord::Schema.define(:version => 20160907080621) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -56,10 +56,10 @@ ActiveRecord::Schema.define(:version => 20160907061917) do t.integer "user_id" t.integer "applied_id" t.string "applied_type" - t.integer "viewed", :default => 0 - t.integer "status", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.integer "viewed" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "name" t.integer "applied_user_id" t.integer "role" @@ -157,13 +157,13 @@ ActiveRecord::Schema.define(:version => 20160907061917) do create_table "attachments", :force => true do |t| t.integer "container_id" t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false + t.string "filename", :default => "", :null => false + t.string "disk_filename", :default => "", :null => false + t.integer "filesize", :default => 0, :null => false t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false + t.string "digest", :limit => 40, :default => "", :null => false + t.integer "downloads", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false t.datetime "created_on" t.string "description" t.string "disk_directory" @@ -173,6 +173,7 @@ ActiveRecord::Schema.define(:version => 20160907061917) do t.integer "quotes" t.integer "is_publish", :default => 1 t.date "publish_time" + t.boolean "init_file", :default => false end add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" @@ -310,14 +311,16 @@ ActiveRecord::Schema.define(:version => 20160907061917) do add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false + t.integer "repository_id", :null => false + t.string "revision", :null => false t.string "committer" - t.datetime "committed_on", :null => false + t.datetime "committed_on", :null => false t.text "comments" t.date "commit_date" t.string "scmid" t.integer "user_id" + t.integer "project_id" + t.integer "type", :default => 0 end add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" diff --git a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb index f5b48544d..acfc28c41 100644 --- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb +++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb @@ -172,6 +172,72 @@ module Redmine {:files => saved_attachments, :unsaved => unsaved_attachments} end + # 扩展方法,因为类型太多,为了不影响其它的 + # 最终需要形成一个方法 + def save_attachments_containers(attachments, author, is_public) + # 清除临时文件 + if attachments + tempAttach = attachments[:dummy] + if tempAttach && tempAttach[:file] + attachments.delete(:dummy) + end + end + + if attachments.is_a?(Hash) + attachments = attachments.stringify_keys + attachments = attachments.to_a.sort {|a, b| + if a.first.to_i > 0 && b.first.to_i > 0 + a.first.to_i <=> b.first.to_i + elsif a.first.to_i > 0 + 1 + elsif b.first.to_i > 0 + -1 + else + a.first <=> b.first + end + } + attachments = attachments.map(&:last) + end + if attachments.is_a?(Array) + attachments.each do |attachment| + if attachment.is_a?(Hash) + a = nil + file = attachment['file'] + token = attachment['token'] + t = file && file.size > 0 + if file && file.size > 0 + a = Attachment.create(:file => file, :author => author) + elsif token + # 通过token值找到对应的attachment + a = Attachment.find_by_token_only(token) + if a + a.filename = attachment['filename'] unless attachment['filename'].blank? + a.content_type = attachment['content_type'] + end + end + end + + if a && !attachment['is_public_checkbox'] + # 考虑到更新操作,所以全部设置为公开,私有项目、课程是不能访问的 + a.is_public = true + elsif a && attachment['is_public_checkbox'] + a.is_public = true + end + set_attachment_public(a) if a + next unless a + a.description = attachment['description'].to_s.strip + a.attachtype = @curattachment_type + if a.new_record? + unsaved_attachments << a + else + saved_attachments << a + end + end + end + {:files => saved_attachments, :unsaved => unsaved_attachments} + end + + def attach_saved_attachments saved_attachments.each do |attachment| self.attachments << attachment diff --git a/public/assets/wechat/edit_userinfo.html b/public/assets/wechat/edit_userinfo.html index e299b8feb..f4178fee4 100644 --- a/public/assets/wechat/edit_userinfo.html +++ b/public/assets/wechat/edit_userinfo.html @@ -11,7 +11,7 @@
    -
    姓名
    +
    姓名
    性别 @@ -33,6 +33,12 @@ 电子邮箱地址不合法
    +
    + 提示 +
      +
    • 您尚未完善您的基本资料,完善后可使用更多功能
    • +
    +
    取消 确定 diff --git a/public/assets/wechat/login.html b/public/assets/wechat/login.html index 05d844ca8..5f8595c3e 100644 --- a/public/assets/wechat/login.html +++ b/public/assets/wechat/login.html @@ -4,13 +4,13 @@
    绑定注册