diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 93ae61d6a..3b63d954c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -42,7 +42,7 @@ class UsersController < ApplicationController :activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource, :user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction, :user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course,:user_courselist,:user_projectlist,:sort_syllabus_list, - :sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks, :cancel_or_collect,:expand_courses,:homepage, :user_issues] + :sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks, :cancel_or_collect,:expand_courses,:homepage, :user_issues, :course_community, :project_community] before_filter :auth_user_extension, only: :show #before_filter :rest_user_score, only: :show #before_filter :select_entry, only: :user_projects @@ -433,7 +433,8 @@ class UsersController < ApplicationController render_404 return end - @message_alls = paginateHelper @message_alls,25 + + @message_alls = paginateHelper @message_alls, 25 respond_to do |format| format.html{render :layout=>'new_base_user'} end @@ -1814,22 +1815,140 @@ class UsersController < ApplicationController end def show - #更新用户申请成为课程老师或教辅消息的状态 + if is_current_user + # 自己的主页显示消息 + # 系统消息为管理员发送,我的消息中包含有系统消息 + @message_alls = [] + messages = MessageAll.where("(user_id =? and message_type !=?) or message_type =?" ,@user.id, "SystemMessage", "SystemMessage").includes(:message).order("created_at desc") + messages.each do |message_all| + mess = message_all.message + unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1) + @message_alls << mess + end + end + @message_count = @message_alls.count + @message_alls = paginateHelper @message_alls, 20 + # 用户待解决的issue + @unsolved_issues = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 4, 6]) + # 用户待完成的作业 + @my_course = StudentsForCourse.where(:student_id => @user.id) + @unfinished_homework = 1 + # 用户待完成的测验 + @unfinished_test = 1 + # 用户待完成的问卷 + @unfinished_poll = 1 + # 用户待匿评的作业 + @anonymous_evaluation = 1 + # 待评阅的作业 + @unreview_homework = 1 + # 待审批的作业 + @unapproval_homework = 1 + else + # 看别人的主页显示动态 + #更新用户申请成为课程老师或教辅消息的状态 + if params[:course_id] != nil + join_course_messages = CourseMessage.where("course_id =? and course_message_type =? and user_id =? and course_message_id =? and viewed =?", + params[:course_id], 'JoinCourseRequest', User.current.id, @user.id, false) + join_course_messages.update_all(:viewed => true) + end + shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id) + shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id) + @page = params[:page] ? params[:page].to_i + 1 : 0 + user_project_ids = (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")" + user_course_ids = (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")" + course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')" + project_types = "('Message','Issue','Project')" + principal_types = "JournalsForMessage" + container_type = '' + act_type = '' + # 他的动态 + sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))" + if params[:type].present? + case params[:type] + when "course_homework" + container_type = 'Course' + act_type = 'HomeworkCommon' + when "course_news" + container_type = 'Course' + act_type = 'News' + when "course_message" + container_type = 'Course' + act_type = 'Message' + when "course_poll" + container_type = 'Course' + act_type = 'Poll' + when "course_journals" + container_type = 'Course' + act_type = 'JournalsForMessage' + when "project_issue" + container_type = 'Project' + act_type = 'Issue' + when "project_message" + container_type = 'Project' + act_type = 'Message' + when "user_journals" + container_type = 'Principal' + act_type = 'JournalsForMessage' + when "current_user" + container_type = 'Principal' + act_type = 'Principal' + when "all" + container_type = 'all' + act_type = 'all' + end + end + if container_type != '' && container_type != 'all' + if container_type == 'Course' + sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'" + elsif container_type == 'Project' + sql = "container_type = '#{container_type}' and container_id in #{user_project_ids} and act_type = '#{act_type}'" + elsif container_type == 'Principal' && act_type == 'JournalsForMessage' + sql = "container_type = '#{container_type}' and act_type= '#{act_type}' and container_id = #{@user.id}" + elsif container_type == 'Principal' && act_type == 'Principal' + sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))" + end + if User.current != @user + sql += " and user_id = #{@user.id}" + end + else + if User.current != @user + blog_ids = "("+@user.blog.id.to_s+")" + else + blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")" + end + sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" + + "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+ + "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " + + "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})" + if container_type != 'all' && User.current != @user + sql = "user_id = #{@user.id} and(" + sql + ")" + end + end + @user_activities_count = UserActivity.where("#{sql}").order('updated_at desc').count + @user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10) + @type = params[:type] + end + respond_to do |format| + format.js + format.html {render :layout => 'new_base_user'} + end + end + + # 课程社区 + def course_community if params[:course_id] != nil join_course_messages = CourseMessage.where("course_id =? and course_message_type =? and user_id =? and course_message_id =? and viewed =?", params[:course_id], 'JoinCourseRequest', User.current.id, @user.id, false) join_course_messages.update_all(:viewed => true) end - shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id) shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id) @page = params[:page] ? params[:page].to_i + 1 : 0 - user_project_ids = (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")" user_course_ids = (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")" course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')" - project_types = "('Message','Issue','Project')" principal_types = "JournalsForMessage" container_type = '' act_type = '' + if params[:type].present? case params[:type] when "course_homework" @@ -1847,6 +1966,63 @@ class UsersController < ApplicationController when "course_journals" container_type = 'Course' act_type = 'JournalsForMessage' + when "user_journals" + container_type = 'Principal' + act_type = 'JournalsForMessage' + when "current_user" + container_type = 'Principal' + act_type = 'Principal' + when "all" + container_type = 'all' + act_type = 'all' + end + end + if container_type != '' && container_type != 'all' + if container_type == 'Course' + sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'" + elsif container_type == 'Principal' && act_type == 'JournalsForMessage' + sql = "container_type = '#{container_type}' and act_type= '#{act_type}' and container_id = #{@user.id}" + elsif container_type == 'Principal' && act_type == 'Principal' + sql = "user_id = #{@user.id} and (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types})" + end + if User.current != @user + sql += " and user_id = #{@user.id}" + end + else + if User.current != @user + blog_ids = "("+@user.blog.id.to_s+")" + else + blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")" + end + sql = "(container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types})" + + "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " + + "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})" + if container_type != 'all' && User.current != @user + sql = "user_id = #{@user.id} and(" + sql + ")" + end + end + @user_activities_count = UserActivity.where("#{sql}").order('updated_at desc').count + @user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10) + @type = params[:type] + respond_to do |format| + format.js + format.html {render :layout => 'base_course_community'} + end + end + + # 项目社区 + def project_community + # 看别人的主页显示动态 + #更新用户申请成为课程老师或教辅消息的状态 + shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id) + @page = params[:page] ? params[:page].to_i + 1 : 0 + user_project_ids = (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")" + project_types = "('Message','Issue','Project')" + principal_types = "JournalsForMessage" + container_type = '' + act_type = '' + if params[:type].present? + case params[:type] when "project_issue" container_type = 'Project' act_type = 'Issue' @@ -1865,14 +2041,12 @@ class UsersController < ApplicationController end end if container_type != '' && container_type != 'all' - if container_type == 'Course' - sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'" - elsif container_type == 'Project' + if container_type == 'Project' sql = "container_type = '#{container_type}' and container_id in #{user_project_ids} and act_type = '#{act_type}'" elsif container_type == 'Principal' && act_type == 'JournalsForMessage' sql = "container_type = '#{container_type}' and act_type= '#{act_type}' and container_id = #{@user.id}" elsif container_type == 'Principal' && act_type == 'Principal' - sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))" + sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}))" end if User.current != @user sql += " and user_id = #{@user.id}" @@ -1884,19 +2058,18 @@ class UsersController < ApplicationController blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")" end sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" + - "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+ "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " + "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})" if container_type != 'all' && User.current != @user sql = "user_id = #{@user.id} and(" + sql + ")" end end - + @user_activities_count = UserActivity.where("#{sql}").order('updated_at desc').count @user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10) @type = params[:type] respond_to do |format| format.js - format.html {render :layout => 'new_base_user'} + format.html {render :layout => 'base_project_community'} end end @@ -3547,7 +3720,7 @@ class UsersController < ApplicationController # @syllabus = paginateHelper @syllabus,@limit respond_to do |format| - format.html {render :layout => 'new_base_user'} + format.html {render :layout => 'base_course_community'} end end @@ -3691,7 +3864,7 @@ class UsersController < ApplicationController @my_joined_projects_count = @my_joined_projects.count respond_to do |format| - format.html {render :layout => 'new_base_user'} + format.html {render :layout => 'base_project_community'} end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 35b96ce92..73b5e9b5f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -37,6 +37,11 @@ module ApplicationHelper # super # end + # 获取多种类型的user用户名 + def user_message_username user + user.try(:show_name) + end + # 超出1w后用k+形式显示 def switch_integer_into_k number number > 10000 ? (number.to_f / 1000).round.to_s + "k" : number @@ -2815,6 +2820,37 @@ module ApplicationHelper end technical_title end + # 用户项目总数 + def user_project_count + @my_projects = @user.projects.select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC") + @my_project_total = @my_projects.count + end + + # 用户的课程总数 + def user_course_count + @my_course_count = @user.syllabuses.count + + sy_courses = @user.courses.visible.not_deleted + syllabus_ids = sy_courses.empty? ? '(-1)' : "(" + sy_courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")" + syllabus_members = SyllabusMember.where("user_id = #{@user.id}") + syllabus_member_ids = syllabus_members.empty? ? "(-1)" : "(" + syllabus_members.map{|syl_mem| syl_mem.syllabus_id}.join(',') + ")" + @join_syllabuses = Syllabus.where("(id in #{syllabus_ids} or id in #{syllabus_member_ids}) and user_id != #{@user.id}") + @my_joined_course_count = @join_syllabuses.count + + @user_course_total = @my_joined_course_count + @my_course_count + end + + # 用户发布的issue数 + def issues_author_is_self_count + @issues = Issue.where( :author_id => @user.id ) + @issues_author_is_self_count = @issues.count + end + + # 用户收到的issue数 + def issues_assigned_is_self_count + @issues = Issue.where( :assigned_to_id => @user.id ) + @issues_assigned_is_self_count = @issues.count + end def get_user_roll user technical_title = "" diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 98024954d..879a7bb3c 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -94,13 +94,13 @@ module UsersHelper def pull_request_message_status ma case ma.status when 1 - "创建了PullRequest:" + "创建了PullRequest:" when 2 - "接受了PullRequest:" + "接受了PullRequest:" when 3 - "重新打开了PullRequest:" + "重新打开了PullRequest:" when 4 - "关闭了PullRequest:" + "关闭了PullRequest:" end end @@ -135,11 +135,11 @@ module UsersHelper def applied_project_tip applied_message case applied_message.status when 4 - "拒绝申请加入项目:" + "拒绝申请加入:" when 5,3,2,1,7 - "申请加入项目:" + "申请加入:" when 6 - "同意申请加入项目" + "同意申请加入:" end end @@ -159,6 +159,10 @@ module UsersHelper end end + def is_current_user + is_current_user = (User.current == @user) + end + def applied_project_tip_header applied_message case applied_message.status when 4 diff --git a/app/models/issue.rb b/app/models/issue.rb index b46e29104..6fdd978f3 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -135,6 +135,10 @@ class Issue < ActiveRecord::Base after_save :after_create_from_copy after_destroy :update_parent_attributes + def user + self.author + end + #动态的更新 def update_activity update_user_activity(self.class, self.id) diff --git a/app/models/message.rb b/app/models/message.rb index 1d76c8ef6..309291183 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -106,6 +106,10 @@ class Message < ActiveRecord::Base end } + def description + self.content + end + def topic? parent_id.nil? end diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index db1e4f1cc..5e1a79314 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -7,13 +7,19 @@ + + <% if hidden_unproject_infos %> - + <% memo = Memo.where(:id => 1168).first %> <% unless memo.nil? %> <% end %>
  • - <%= link_to "我的组织", user_organizations_user_path(:id => User.current), :class => "menuGrey"%> + <%= link_to '我的项目', {:controller => "users", :action => "user_projectlist", :id => @user}, :id => 'user_project_list', :class => "menuGrey" %>
  • - <%= link_to "新建组织", new_organization_path, :class => "menuGrey"%> + <%= link_to "我的组织", user_organizations_user_path(:id => User.current), :class => "menuGrey"%>
  • diff --git a/app/views/layouts/_user_brief_introduction.html.erb b/app/views/layouts/_user_brief_introduction.html.erb index fac5177a3..233d6115b 100644 --- a/app/views/layouts/_user_brief_introduction.html.erb +++ b/app/views/layouts/_user_brief_introduction.html.erb @@ -1,10 +1,10 @@ - <% if user.user_extensions && user.user_extensions.brief_introduction && !user.user_extensions.brief_introduction.empty? %> - <%= user.user_extensions.brief_introduction %> - <% else%> - 这个小伙伴很懒,什么都没留下~ + -<% if User.current == user%> - <%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_user_introduction();"%> -<% end %> +<%# if User.current == user%> + <%#= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_user_introduction();"%> +<%# end %> diff --git a/app/views/layouts/_user_watch_btn.html.erb b/app/views/layouts/_user_watch_btn.html.erb index 0e0ae1e1f..35436f83f 100644 --- a/app/views/layouts/_user_watch_btn.html.erb +++ b/app/views/layouts/_user_watch_btn.html.erb @@ -1,18 +1,18 @@ <% end %> + <% if ma.course_message_type == "Comment" && ma.course_message %> <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? && ma.course_message %> @@ -62,7 +63,7 @@
  • <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">发布了班级作业: + 发布了班级作业:
  • <% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %> @@ -114,7 +115,7 @@

    <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 && ma.course_message %> @@ -122,7 +123,7 @@
  • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
  • <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + '老师', user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :title => "#{ma.course_message.user.lastname + ma.course_message.user.firstname}老师", :target => '_blank' %> - ">发布的作业:
  • + 发布的作业:
  • <%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -148,7 +149,7 @@ <% end %>
  •    截止时间快到啦
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -160,7 +161,7 @@
  • <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">启动了作业匿评: + 启动了作业匿评:
  • <%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", @@ -183,7 +184,7 @@

    例如,您缺评了两份作品,则您的最终成绩将被扣除 <%= ma.course_message.homework_detail_manual.absence_penalty %> * 2 = <%= ma.course_message.homework_detail_manual.absence_penalty * 2 %>分

    <% end%> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -192,7 +193,8 @@
  • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
  • <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", - user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>">关闭了作业匿评:
  • + user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> + 关闭了作业匿评:
  • <%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -214,7 +216,7 @@

    祝您的教学活动高效、顺利、愉快!

    <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -226,7 +228,7 @@
  • <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">启动作业匿评失败 + 启动作业匿评失败:
  • <%= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}", :target => '_blank' %> @@ -245,7 +247,7 @@
  • 提交截止:<%= ma.course_message.end_time%>  23:59
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 %> @@ -293,7 +295,7 @@ -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% if ma.course_message_type == "Poll" && ma.course_message %> @@ -305,7 +307,7 @@
  • <%=link_to ma.course_message.user.try(:show_name), user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">发布了问卷: + 发布了问卷:
  • <%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id), @@ -316,7 +318,7 @@ -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% if ma.course_message_type == "Message" && !ma.nil? && !ma.course_message.nil? %> @@ -328,7 +330,7 @@
  • <%=link_to ma.course_message.author.try(:show_name), user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - "> + <%= ma.course_message.parent_id.nil? ? "发布了班级帖子:" : "评论了班级帖子:" %>
  • <% if ma.course_message.parent_id.nil? %>
  • @@ -359,7 +361,7 @@ <% end %> <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -410,7 +412,7 @@

    <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% if ma.course_message_type == "JournalsForMessage" && ma.course_message %> @@ -424,7 +426,7 @@
  • <%= link_to ma.course_message.user.try(:show_name), user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">在班级中留言了: + 在班级中留言了:
  • <%= link_to message_content(ma.course_message.notes), course_feedback_path(:id => ma.course_id), @@ -436,7 +438,7 @@ -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% elsif ma.course_message.jour_type == 'HomeworkCommon' %> @@ -452,7 +454,7 @@ <% if ma.course_message.m_parent_id.nil? %> 回复了您的作业: <% else %> - 在作业中回复了您: + 在作业中回复了您: <% end %> @@ -466,7 +468,7 @@ -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% else %>
    -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% end %> @@ -547,7 +549,7 @@
  • <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "同学", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">重新提交了作品: + 重新提交了作品:
  • <%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id), @@ -556,7 +558,7 @@
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -568,7 +570,7 @@
  • <%= link_to ma.course_message.user.show_name+ "同学", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">追加新附件了: + 追加新附件了:
  • <%= link_to "作业标题:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id), @@ -576,7 +578,7 @@
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -587,7 +589,7 @@
  • 系统提示 - ">您成功创建了班级: + 您成功创建了班级:
  • <%= link_to "班级名称:" + ma.course_message.name, course_path(ma.course_message), @@ -612,7 +614,7 @@

    您的班级是私有的,非班级成员不能访问您的班级。如果想设置为公开,您可以在配置中设置。

    <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -650,7 +652,7 @@
    <%= Course.find(ma.course_id).description.nil? ? "" : Course.find(ma.course_id).description.html_safe %>

    申请职位:<%= ma.content == '9' ? "教师" : "教辅"%>

    -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -662,7 +664,7 @@
  • <%=link_to User.find(ma.course_message_id).show_name, user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">将您加入了班级: + 将您加入了班级:
  • <%= link_to ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -684,7 +686,7 @@

    <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -696,7 +698,7 @@
  • 系统提示 - ">您增加了新的班级成员: + 您增加了新的班级成员:
  • <%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", {:controller => 'courses', :action => 'settings', :id => ma.course_id, :tab=>'member'}, :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -718,7 +720,7 @@

    <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -730,7 +732,7 @@
  • <%=link_to User.find(ma.course_message_id).show_name, user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">将您移出了班级: + 将您移出了班级:
  • <%= link_to ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -753,7 +755,7 @@

    <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -763,7 +765,9 @@
  • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
  • <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", - user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>">发布了班级测验 :
  • + user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> + 发布了班级测验: +
  • <%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -790,7 +794,7 @@ <% end %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -800,7 +804,8 @@
  • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
  • <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", - user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>">发布的测验:
  • + user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> + 发布的测验:
  • <%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -823,7 +828,7 @@
  • 截止时间快到啦
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% end %> \ No newline at end of file diff --git a/app/views/users/_user_message_forge.html.erb b/app/views/users/_user_message_forge.html.erb index 10a14ffa9..b3e058a82 100644 --- a/app/views/users/_user_message_forge.html.erb +++ b/app/views/users/_user_message_forge.html.erb @@ -3,11 +3,11 @@ <% if ma.forge_message_type == "AppliedProject" %> <% end %> @@ -27,7 +27,7 @@
  • <%=link_to User.find(ma.forge_message_id).show_name, user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">将您加入了项目: + 将您加入了项目:
  • <%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -35,7 +35,7 @@
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% end %> @@ -48,7 +48,7 @@
  • <%=link_to User.find(ma.forge_message_id).show_name, user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">将您移出了项目: + 将您移出了项目:
  • <%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> @@ -56,7 +56,7 @@
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% end %> @@ -123,7 +123,7 @@
  • <%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - "> + <%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%>
  • @@ -133,7 +133,7 @@ -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% end %> @@ -146,8 +146,7 @@
  • <%= link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - "> - 更新了问题状态: + 更新了问题状态:
  • <%= link_to ma.forge_message.journalized.subject, @@ -156,21 +155,21 @@
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% if ma.forge_message_type == "Message" %> <% end %> <% if ma.forge_message_type == "Comment" %> @@ -183,7 +182,7 @@
  • <%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - ">评论了新闻: + 评论了新闻:
  • <%= link_to "#{ma.forge_message.commented.title}", @@ -191,7 +190,7 @@
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> @@ -216,7 +215,7 @@ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% end %> \ No newline at end of file diff --git a/app/views/users/_user_message_org.html.erb b/app/views/users/_user_message_org.html.erb index 13c62318f..3d56f4b4a 100644 --- a/app/views/users/_user_message_org.html.erb +++ b/app/views/users/_user_message_org.html.erb @@ -6,21 +6,22 @@
  • <%=link_to ma.organization.name, organization_path(ma.organization_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - '>申请子域名: + 申请子域名:
  • <%= ma.content %>
  • -
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%=link_to (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准", agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ), :id => "agree_apply_subdomain_#{ma.id}", :method => 'post', :remote => true, - :class => "green_btn_cir ml10", - :style => "color:#fff" %> + :class => 'link-blue fr' + %>
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • + <% end %> <% if ma.message_type == 'AgreeApplySubdomain'%> @@ -29,12 +30,12 @@
  • - '>管理员同意了您的子域名申请: + 管理员同意了您的子域名申请:
  • <%= ma.content %>
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> <% end %> \ No newline at end of file diff --git a/app/views/users/_user_message_system.html.erb b/app/views/users/_user_message_system.html.erb index 6bc8f28f3..46e83a4e1 100644 --- a/app/views/users/_user_message_system.html.erb +++ b/app/views/users/_user_message_system.html.erb @@ -5,9 +5,9 @@
  • - Trustie平台发布新消息: + 系统消息: +
  • - 【系统消息】
  • <%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current, :anchor => "position_#{ma.id}"), @@ -15,7 +15,7 @@
  • -
  • <%= time_tag(ma.created_at).html_safe %>
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • <%# end %> <% end %> \ No newline at end of file diff --git a/app/views/users/_user_message_userfeedaback.html.erb b/app/views/users/_user_message_userfeedaback.html.erb index 00fa78eeb..664058461 100644 --- a/app/views/users/_user_message_userfeedaback.html.erb +++ b/app/views/users/_user_message_userfeedaback.html.erb @@ -9,7 +9,7 @@
  • <%=link_to User.find(ma.journals_for_message.user_id).show_name, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - "> + <%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
  • @@ -26,7 +26,7 @@
    <%= ma.journals_for_message.notes.html_safe %>
    <% end %> -
  • <%= time_tag(ma.journals_for_message.created_on).html_safe %>
  • +
  • <%= time_tag(ma.journals_for_message.created_on).html_safe %>
  • <% end %> <% end %> \ No newline at end of file diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 66aafcf46..43a86a930 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,51 +1,106 @@ - -
    -
    最新动态
    - -
    + +<% if is_current_user %> +
    +
    +
    +
  • 248
  • + 待解决Issue
    +
    +
    +
  • 21
  • + 待完成作业
    +
    +
    +
  • 18
  • + 待完成测验
    +
    +
    +
  • 11
  • + 待完成问卷
    +
    +
    +
  • 16
  • + 待匿评作业
    +
    +
    +
  • 13
  • + 待评阅作业
    +
    +
    +
  • 16
  • + 待审批申请
    +
    +
    +
    +
    +
    + 消息动态 +
    + + 共 <%= @message_count %> 个消息 + +
    +
    +
    + <%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %> +
    +
    - +<% else %> +
    +
    Ta的动态
    + +
    + + <%# if @user.blog.homepage_id and BlogComment.where("id=?", @user.blog.homepage_id).count > 0 %> <%# homepage = BlogComment.find(@user.blog.homepage_id) %> <%#= render :partial => 'blogs/homepage', :locals => {:activity => homepage, :user_activity_id => homepage.id} %> <%# end %> -<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id)} %> + <% if @user_activities_count > 0 %> + <%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities, :page => 0, :type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id)} %> + <% else %> +
    + <%= render :partial => 'users/no_data' %> +
    + <% end %> +<% end %> \ No newline at end of file diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index b1ae0aff2..73f0dfc0e 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -14,32 +14,7 @@ <% unless @message_alls.nil? %> - <% @message_alls.each do |ma| %> - <%# 系统消息 %> - <%= render :partial => 'users/user_message_system', :locals => {:ma => ma} %> - - <%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %> - - <%# 课程消息 %> - <%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %> - - - <%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %> - - - <%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %> - - - <%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %> - - <%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %> - - <%# 申请类消息 %> - <%= render :partial => 'users/user_message_applied', :locals => {:ma => ma} %> - <% end %> - + <%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %> <% end %> <% else %> diff --git a/config/routes.rb b/config/routes.rb index 4e01d006f..1fb72ee58 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -565,6 +565,9 @@ RedmineApp::Application.routes.draw do match 'courses/:course_id/news/new', :to => 'news#new', :via => [:get, :post] match 'users/:user_id/homepage/articles/:id', :to => 'article_homepages#show', :as => "user_homepage_show" + match 'users/:id/courses', :to => 'users#course_community', :as => "user_course_community" + match 'users/:id/projects', :to => 'users#project_community', :as => "user_project_community" + scope ":username" do resources :posts end diff --git a/public/images/user/female.jpg b/public/images/user/female.jpg index 219865572..499d2e5ac 100644 Binary files a/public/images/user/female.jpg and b/public/images/user/female.jpg differ diff --git a/public/images/user/male.jpg b/public/images/user/male.jpg index 46d58f26e..bd2597dd2 100644 Binary files a/public/images/user/male.jpg and b/public/images/user/male.jpg differ diff --git a/public/images/user/user_navmore_icons.png b/public/images/user/user_navmore_icons.png index 6ecd00566..5dcd2608b 100644 Binary files a/public/images/user/user_navmore_icons.png and b/public/images/user/user_navmore_icons.png differ diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index 71cd2a69e..9c44ea40d 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -142,6 +142,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/ .ml110{ margin-left:110px;} .ml125 { margin-left:125px;} .ml130 { margin-left:130px;} +.ml140 { margin-left:140px;} .ml150 { margin-left:150px;} .ml160 {margin-left:160px;} .ml250 {margin-left:250px;} @@ -823,22 +824,6 @@ a.sy_btn_pink{ } a:hover.sy_btn_pink{ background: #e64c4c;} -/* 我的缺陷列表*/ -.myissues_con{ width:968px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444; margin: 0 auto; } -.myissues_head{ width: 100%; height: 40px; line-height: 40px; background: #f4f4f4; } -.myissues_head h2{ font-size: 14px;} -select.issues_filter_active { font-weight: bold; color: #333;} -.issues_form_filter select.issues_filter_select_min02{width:60px; } -.issues_form_filter select.issues_filter_select_max{width:90px; } -.issues_list_txt li.issues_list_max{ width:90px } -.btn_newpro_grey{display: inline-block;color: #7b7b7b; border:1px solid #dbdbdb;background:#fff;text-align: center;font-size: 12px; padding:0 15px; height:24px; line-height: 24px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px;} -a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;} - -.my_issues_form_filter{ position: absolute; top:0; right: 0;} -.my_issues_form_filter select{ width:70px; height:30px; border:none; font-size:14px; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; text-align:center} -.my_issues_form_filter select.issues_filter_select_min{width:50px; } -.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;} - .ke-block pre{ font-size:9pt; font-family:Courier New,Arial; diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index a2506fe3f..54b34896c 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -1058,4 +1058,19 @@ table.text-file{} .old:hover{ background:#fffaf1; } .new{ background: #eaffea;} .new:hover{ background:#fffaf1; } -.commit_id_value{color: white !important;} \ No newline at end of file +.commit_id_value{color: white !important;} +/* 我的缺陷列表*/ +.myissues_con{ width:968px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444; margin: 0 auto; } +.myissues_head{ width: 100%; height: 40px; line-height: 40px; background: #f4f4f4; } +.myissues_head h2{ font-size: 14px;} +select.issues_filter_active { font-weight: bold; color: #333;} +.issues_form_filter select.issues_filter_select_min02{width:60px; } +.issues_form_filter select.issues_filter_select_max{width:90px; } +.issues_list_txt li.issues_list_max{ width:90px } +.btn_newpro_grey{display: inline-block;color: #7b7b7b; border:1px solid #dbdbdb;background:#fff;text-align: center;font-size: 12px; padding:0 15px; height:24px; line-height: 24px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px;} +a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;} + +.my_issues_form_filter{ position: absolute; top:0; right: 0;} +.my_issues_form_filter select{ width:70px; height:30px; border:none; font-size:14px; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; text-align:center} +.my_issues_form_filter select.issues_filter_select_min{width:50px; } +.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;} \ No newline at end of file diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index 0e12ebc27..6bf675de9 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -94,18 +94,18 @@ div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text- .newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;} .homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea;} .homepageNewsPortrait {width:40px; display:block; margin-top:7px;} -.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; } +.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; /*padding-left:5px;*/ overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; } .homepageNewsType {padding-left: 5px; font-size:12px; color:#888888; display:block;} .homepageNewsTypeHomework {width:160px; padding-left: 5px; font-size:12px; color:#888888; display:block; overflow:hidden; height:49px;word-break:break-all; word-wrap:break-word; text-overflow:ellipsis;} -.homepageNewsPubType {width:230px; font-size:12px; color:#888888; display: block;} +.homepageNewsPubType {auto-width:230px; font-size:12px; color:#888888; display: block;} .homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;} -.homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } -.homepageSystenMessageContent {width:281px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; } - -.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } -.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } -.homepageHomeworkContentWarn2 {width:60px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } -.homepageHomeworkContent2 {width:285px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } +.homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } +.homepageSystenMessageContent {width:281px; max-width:291px; margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; } +.homepageSystenMessageContent a:link{color:#1b1818;} +.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:14px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } +.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } +.homepageHomeworkContentWarn2 {width:70px; max-width:365px; margin-right:10px; font-size:14px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } +.homepageHomeworkContent2 {width:285px; max-width:365px; margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } .homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} .loadMore {font-size:14px;width:748px; text-align:center; display:block; border:1px solid #dddddd; background-color:#ffffff; float:right;padding:5px 0; letter-spacing: 1px;} @@ -342,6 +342,7 @@ a.homepageMenuControl {float:left; width:180px;} .homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;} .homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;} .homepageRightBanner {width:718px; margin:0px auto; float:right; background-color: #ffffff; padding:10px 15px; border:1px solid #dddddd;} +.homepagetopBanner {width:750px; height: 100px; margin:0px auto; float:right; background-color: #90C5EC; border:1px solid #dddddd;} .homepageRightBannerImg{width:1000px; margin:0px auto; height: 60px; margin-top: 10px; background:url(/images/TeachersDay.jpg)} a.homepageWhite {color:#ffffff;} a.homepageWhite:hover {color:#a1ebff} @@ -355,7 +356,7 @@ a.replyGrey1 {color:#888888;} a.replyGrey1:hover {color:#4b4b4b;} a.newsBlue {color:#269ac9;} a.newsBlue:hover {color:#297fb8;} -a.newsBlack {color:#4b4b4b; font-size:13px; font-weight:bold} +a.newsBlack {color:#4b4b4b; font-size:14px; font-weight:bold} a.menuGrey {color:#808080;} a.menuGrey:hover {color:#fe7d68;} .navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;} @@ -498,6 +499,19 @@ a.user_leftinfo_img { display:block; width:80px; height:80px; margin:15px auto;} .user_atten li a{ color:#333;} .user_atten li a:hover{ color:#3b94d6;} +.flex-container_homepage {display:flex;} +.flex-container_homepage div{ width:68px; float:left; border-right:1px solid #62ACE2; text-align:center; font-size:14px; height: 70px; margin:10px 0px; color: #ffffff;} +.flex-container_homepage div:last-child { border:none; } +.flex-cell_homepage {flex:1; text-align: center} +.homepage_review_tab{ display:block; background:url(/images/user/homepage_tab.png) -15px -185px no-repeat; width:32px; height:32px; } +.homepage_issue_tab { display:block; background:url(/images/user/homepage_tab.png) -15px -12px no-repeat; width:32px; height:32px; } +.homepage_work_tab { display:block; background:url(/images/user/homepage_tab.png) -15px -56px no-repeat; width:32px; height:32px; } +.homepage_test_tab { display:block; background:url(/images/user/homepage_tab.png) -15px -99px no-repeat; width:32px; height:32px; } +.homepage_poll_tab { display:block; background:url(/images/user/homepage_tab.png) -15px -142px no-repeat; width:32px; height:32px; } +.homepage_anonymity_tab { display:block; background:url(/images/user/homepage_tab.png) -15px -228px no-repeat; width:32px; height:32px; } +.homepage_apply_tab { display:block; background:url(/images/user/apply_tab.png) -10px -12px no-repeat; width:32px; height:32px; } + + /* 个人主页左侧导航 */ .user_leftnav{ width:240px;} .users_accordion li > a {