From a67d809168ee53d9169ece8d7e782289a4b23591 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 16 Dec 2016 17:27:24 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=9C=A8=E5=AF=BC=E5=87=BA=E7=9A=84Excel?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=A6=82=E6=9E=9C=E7=94=A8=E6=88=B7=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E4=BA=86=E5=85=B6=E5=AE=83=EF=BC=8C=E5=88=99=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E5=9C=A8=E4=B8=8B=E6=96=B9=E7=9A=84=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E8=AE=B0=E5=BD=95=E2=80=9C=E5=85=B6=E5=AE=83=EF=BC=88?= =?UTF-8?q?=E6=88=91=E5=BD=95=E5=85=A5=E7=9A=84=E5=85=B6=E5=AE=83=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=EF=BC=89=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 2 +- config/locales/courses/zh.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 325517e4b..5059f5857 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -804,7 +804,7 @@ class PollController < ApplicationController current_index = 1 poll_questions.each_with_index do |poll_question, i| if poll_question.question_type == 1 || poll_question.question_type == 2 - sheet1[count_row ,current_index] = user.poll_votes.where(:poll_question_id => poll_question.id).map{|poll_vote| poll_vote.poll_answer.answer_text.gsub(/<\/?.*?>/,"").gsub(/ /," ") if poll_vote.poll_answer}.join(";") + sheet1[count_row ,current_index] = user.poll_votes.where(:poll_question_id => poll_question.id).map{|poll_vote| (poll_vote.vote_text.nil? ? poll_vote.poll_answer.answer_text.gsub(/<\/?.*?>/,"").gsub(/ /," ") : l(:label_other_answer) + " (" + poll_vote.vote_text.to_s + ") ") if poll_vote.poll_answer}.join(";") current_index += 1 elsif poll_question.question_type == 3 sheet1[count_row ,current_index] = user.poll_votes.where(:poll_question_id => poll_question.id).map{|poll_vote| poll_vote.vote_text.gsub(/<\/?.*?>/,"").gsub(/ /," ")}.join(";") diff --git a/config/locales/courses/zh.yml b/config/locales/courses/zh.yml index ac7e1b4a3..3cecad728 100644 --- a/config/locales/courses/zh.yml +++ b/config/locales/courses/zh.yml @@ -105,6 +105,7 @@ zh: label_user_name: "用户名称" #setting end - label_course_poll: 课程问卷 + label_course_poll: "课程问卷" + label_other_answer: "其他" - label_homework_committed: 你已经提交过作品,如果你想修改作品的话,可以在作品列表页面对作品信息进行修改。 \ No newline at end of file + label_homework_committed: "你已经提交过作品,如果你想修改作品的话,可以在作品列表页面对作品信息进行修改。" \ No newline at end of file From 7777e6364708203acf5dcf75c4cf5ddf33196994 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 16 Dec 2016 19:08:54 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_message_applied.html.erb | 8 +++++--- app/views/users/_user_message_course.html.erb | 11 ++++++----- app/views/users/_user_message_list.html.erb | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/views/users/_user_message_applied.html.erb b/app/views/users/_user_message_applied.html.erb index 47cda9697..20275ceef 100644 --- a/app/views/users/_user_message_applied.html.erb +++ b/app/views/users/_user_message_applied.html.erb @@ -29,7 +29,8 @@ <% elsif ma && ma.applied_type == "StudentWorksScoresAppeal" %> <% end %> diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index 0e3e3b508..c3566c39c 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -401,7 +401,7 @@
  • <% if ma.course_message.reviewer_role == 3 %> - <%= link_to image_tag(url_to_avatar(""), "javascript:void(0);", :width => "30", :height => "30"), :target => '_blank' %> + <%= link_to image_tag(url_to_avatar(""), :width => "30", :height => "30"),"javascript:void(0);", :target => '_blank' %> <% else %> <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %> <% end %> @@ -628,6 +628,7 @@ <% if ma.course_message_type == "StudentWorksScoresAppeal" && ma.course_message %>
      +
    • <%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30"), "javascript:void(0);", :target => '_blank' %>
    • @@ -648,11 +649,12 @@ <% end %> -
    • +
    • <%= link_to ma.course_message.student_works_score.student_work.homework_common.name, student_work_index_path(:homework => ma.course_message.student_works_score.student_work.homework_common_id, :show_work_id => ma.course_message.student_works_score.student_work_id, :tab => 2), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
    • -
    • <%= time_tag(ma.created_at).html_safe %>
    • +
      +
    • <%= time_tag(ma.created_at).html_safe %>
    <% end %> @@ -666,8 +668,7 @@ 系统提示 您成功创建了班级:
  • -
  • +
  • <%= link_to "班级名称:" + ma.course_message.name, course_path(ma.course_message), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> diff --git a/app/views/users/_user_message_list.html.erb b/app/views/users/_user_message_list.html.erb index 4cf520ff6..833b424ed 100644 --- a/app/views/users/_user_message_list.html.erb +++ b/app/views/users/_user_message_list.html.erb @@ -16,7 +16,7 @@ var parentWidth = $(this).parent().width(); var eq0Width = $(this).parent().children().eq(0).width(); var eq1Width = $(this).parent().children().eq(1).width(); - var classWidth = parentWidth - eq0Width - eq1Width; + var classWidth = parentWidth - eq0Width - eq1Width - 10; $(this).css("max-width",classWidth + "px"); }); //$(".messageInformationContents").width() From 48045cf85b8e9e65f36795ff4efb32958436ad7e Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 16 Dec 2016 19:55:38 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_anonymous_evaluation_list.html.erb | 2 +- app/views/users/_unapproval_applied_list.html.erb | 14 +++++++++++++- app/views/users/_user_message_course.html.erb | 4 ++-- app/views/users/_user_message_list.html.erb | 3 +-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/views/users/_anonymous_evaluation_list.html.erb b/app/views/users/_anonymous_evaluation_list.html.erb index 3a6be81ff..4fc1d9fe1 100644 --- a/app/views/users/_anonymous_evaluation_list.html.erb +++ b/app/views/users/_anonymous_evaluation_list.html.erb @@ -19,7 +19,7 @@
  • - <%= link_to ae.course.try(:name),"", :target => "_blank", :class => "homepageTabTitle ml5"%> + <%= link_to ae.course.name, course_path(ae.course), :target => "_blank", :class => "homepageTabTitle ml5"%>
  • diff --git a/app/views/users/_unapproval_applied_list.html.erb b/app/views/users/_unapproval_applied_list.html.erb index 5256b1082..362307d43 100644 --- a/app/views/users/_unapproval_applied_list.html.erb +++ b/app/views/users/_unapproval_applied_list.html.erb @@ -5,4 +5,16 @@
  • <%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %> -
    \ No newline at end of file + + + \ No newline at end of file diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index c3566c39c..411ff64c9 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -38,7 +38,7 @@ <%=link_to User.find(ma.course_message.author_id).show_name, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> 评论了通知: -
  • +
  • <%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id }, :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" , :target => '_blank', @@ -820,7 +820,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' %> diff --git a/app/views/users/_user_message_list.html.erb b/app/views/users/_user_message_list.html.erb index 833b424ed..1cea4f989 100644 --- a/app/views/users/_user_message_list.html.erb +++ b/app/views/users/_user_message_list.html.erb @@ -16,9 +16,8 @@ var parentWidth = $(this).parent().width(); var eq0Width = $(this).parent().children().eq(0).width(); var eq1Width = $(this).parent().children().eq(1).width(); - var classWidth = parentWidth - eq0Width - eq1Width - 10; + var classWidth = parentWidth - eq0Width - eq1Width - 20; $(this).css("max-width",classWidth + "px"); }); - //$(".messageInformationContents").width() }); \ No newline at end of file From b661593e29fad8c6495a398e79f9e15dd1a30272 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 17 Dec 2016 09:37:26 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=80=85=E4=B8=8D=E5=BA=94=E5=A1=AB=E9=97=AE=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 2 +- app/views/poll/show.html.erb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 5059f5857..b88ecf775 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -42,7 +42,7 @@ class PollController < ApplicationController if has_commit_poll?(@poll.id,User.current.id) && (!User.current.admin?) redirect_to poll_index_url(:polls_type => "Course", :polls_group_id => @course.id) else - @can_edit_poll = (!has_commit_poll?(@poll.id,User.current.id)) || User.current.admin? + @can_edit_poll = @poll.user != User.current && ((!has_commit_poll?(@poll.id,User.current.id)) || User.current.admin?) @percent = get_percent(@poll,User.current) @poll_questions = @poll.poll_questions @left_nav_type = 7 diff --git a/app/views/poll/show.html.erb b/app/views/poll/show.html.erb index 2ef7c4a26..85ed34fc7 100644 --- a/app/views/poll/show.html.erb +++ b/app/views/poll/show.html.erb @@ -303,6 +303,7 @@ <% end %> <% end %> +<% if @can_edit_poll %>
    <% if @poll.polls_status == 2 %> <%=l(:button_submit) %> @@ -316,6 +317,7 @@ <%= format "%.2f", @percent %>%
    +<% end %> From 2275a0ecaee4612eaf0a9956c5b85a07d0fb667c Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 17 Dec 2016 09:38:32 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E3=80=81=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=A4=BE=E5=8C=BA=E3=80=81=E9=A1=B9=E7=9B=AE=E7=A4=BE?= =?UTF-8?q?=E5=8C=BA=E7=9A=84=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 38 +------------------ .../layouts/base_course_community.html.erb | 14 +++---- app/views/users/_user_activities.html.erb | 3 +- app/views/users/course_community.html.erb | 2 +- app/views/users/project_community.html.erb | 2 +- app/views/users/show.html.erb | 2 +- app/views/users/show.js.erb | 2 +- 7 files changed, 15 insertions(+), 48 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 5ddf69a2d..4ed7804ea 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2128,12 +2128,6 @@ 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' @@ -2142,23 +2136,12 @@ class UsersController < ApplicationController 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})" + sql = "(container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types})" if container_type != 'all' && User.current != @user sql = "user_id = #{@user.id} and(" + sql + ")" end @@ -2191,12 +2174,6 @@ class UsersController < ApplicationController 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' @@ -2205,23 +2182,12 @@ class UsersController < ApplicationController if container_type != '' && container_type != 'all' 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}))" 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 = '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})" + sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" if container_type != 'all' && User.current != @user sql = "user_id = #{@user.id} and(" + sql + ")" end diff --git a/app/views/layouts/base_course_community.html.erb b/app/views/layouts/base_course_community.html.erb index c6bcc8925..f92a9e2fe 100644 --- a/app/views/layouts/base_course_community.html.erb +++ b/app/views/layouts/base_course_community.html.erb @@ -82,13 +82,13 @@ <% end %> -
    -
      -
    • - <%= link_to '留言', feedback_path(@user, :host=> Setting.host_user)%> -
    • -
    -
    + + + + + + + <%# 更新访问数,刷新的时候更新访问次数 %> <% update_visiti_count @user %>
    访问计数 <%= @user.visits.to_i %> (自2016年5月)
    diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index e8a3143e3..54eeffbd7 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -109,7 +109,8 @@ - <%= link_to "点击展开更多", user_activities_path(@user.id,:type => type,:page => page), :id => "show_more_activities", :remote => "true", :class => "loadMore mt10 f_grey"%> + <%= link_to "点击展开更多", action == "project_community" ? user_project_community_path(@user.id, :type => type, :page => page) : (action == "course_community" ? user_course_community_path(@user.id, :type => type,:page => page) : user_activities_path(@user.id,:type => type,:page => page)), + :id => "show_more_activities", :remote => "true", :class => "loadMore mt10 f_grey" %> <% end%> <% 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)} %> + <%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities, :page => 0, :type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id), :action => "user_activities"} %> <% else %>
    <%= render :partial => 'users/no_data' %> diff --git a/app/views/users/show.js.erb b/app/views/users/show.js.erb index 0c0fa2310..20e515859 100644 --- a/app/views/users/show.js.erb +++ b/app/views/users/show.js.erb @@ -1,5 +1,5 @@ <% if is_current_user %> $("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/user_message_list') %>"); <% else %> - $("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page,:type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id)} )%>"); + $("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page,:type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id), :action => "user_activities"} )%>"); <% end %> From 16fe5f58a1f9e50d504c29889766ad8b810b115c Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 17 Dec 2016 09:38:48 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E8=AF=A6=E7=BB=86=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_message_course.html.erb | 2 +- public/stylesheets/css/structure.css | 2 +- public/stylesheets/css/user.css | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index 411ff64c9..edc94d6cc 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -177,7 +177,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 + "老师", + <%= link_to ma.course_message.user.show_name + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> 启动了作业匿评:
  • diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index 44268348b..6bacebe59 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -565,7 +565,7 @@ a.user_leftinfo_img { display:block; width:80px; height:80px; margin:15px auto;} left: 0; content: ''; width: 24px; - height: 50px; + height: 40px; margin: 4px 8px; background-repeat: no-repeat; background-image:url(/images/user/icons_user_leftnav.png); diff --git a/public/stylesheets/css/user.css b/public/stylesheets/css/user.css index 0743dc192..8957de38f 100644 --- a/public/stylesheets/css/user.css +++ b/public/stylesheets/css/user.css @@ -113,7 +113,7 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex .users_accordion > li:target > a span, .users_accordion > li > a.active span {margin-left:10px;color: #333;background: #dbdbdb;} /* Images */ -.users_accordion > li > a:before {position: absolute;top: 0;left: 0;content: '';width: 24px;height: 50px;margin: 4px 8px;background-repeat: no-repeat;background-image:url(/images/user/icons_user_leftnav.png);background-position: 5px 15px;} +.users_accordion > li > a:before {position: absolute;top: 0;left: 0;content: '';width: 24px;height: 40px;margin: 4px 8px;background-repeat: no-repeat;background-image:url(/images/user/icons_user_leftnav.png);background-position: 5px 15px;} .users_accordion li.user_icons_course > a:before { background-position: 5px 15px; } .users_accordion li.user_icons_course:hover > a:before, .users_accordion li.user_icons_course:target > a:before, @@ -168,7 +168,7 @@ a.user_navmorebox .user_icons_closeclass{display:block;position: absolute;top:5p .user_navmore_txt li a.user_navmore_li {font-size:12px;color:#888; display:block; width:75px;height:24px;line-height:24px; } .user_navmore_txt li a.user_navmore_add{ width:10px;color:#888; padding:0 5px; } .user_navmore_txt li:hover,.user_navmore_txt li a:hover{background-color:#f0f0f0;} - + /* 新版个人主页 */ #messageTabList li { float:left; padding:10px 15px; text-align:center; } .homepageTabTitle { max-width:330px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} From d876962f0513497e02942a8bb2053af738f3f950 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 17 Dec 2016 09:53:23 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E5=92=8C=E9=A1=B9=E7=9B=AE=E7=A4=BE=E5=8C=BA=E7=9A=84=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=88=97=E8=A1=A8=E6=97=A0=E6=B3=95=E6=94=B6=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layouts/base_course_community.html.erb | 11 +++++++++++ .../layouts/base_project_community.html.erb | 11 +++++++++++ app/views/layouts/new_base_user.html.erb | 17 ----------------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/app/views/layouts/base_course_community.html.erb b/app/views/layouts/base_course_community.html.erb index f92a9e2fe..f902ae2d5 100644 --- a/app/views/layouts/base_course_community.html.erb +++ b/app/views/layouts/base_course_community.html.erb @@ -109,5 +109,16 @@ + + \ No newline at end of file diff --git a/app/views/layouts/base_project_community.html.erb b/app/views/layouts/base_project_community.html.erb index f1b2e20ba..e61bd67cf 100644 --- a/app/views/layouts/base_project_community.html.erb +++ b/app/views/layouts/base_project_community.html.erb @@ -92,5 +92,16 @@ + + \ No newline at end of file diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index c636ea701..35b106059 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -309,23 +309,6 @@ $("#projectMenu").mouseleave(function(){ $("#topnav_project_menu").hide(); }); - function leftCourseslistChange(){ - var target = $('#user_courses_li>li'); - for(var i = 10; i < target.length; i++){ - target.eq(i).slideToggle(); - } - $('#hide_show_courseicon').toggleClass("user_icons_closeclass"); - $('#hide_show_courseicon').toggleClass("user_icons_moreclass"); - - } - function leftProjectslistChange(){ - var target = $('#user_projects_li>li'); - for(var i = 10; i < target.length; i++){ - target.eq(i).slideToggle(); - } - $('#hide_show_projecticon').toggleClass("user_icons_closeclass"); - $('#hide_show_projecticon').toggleClass("user_icons_moreclass"); - } \ No newline at end of file From e29eb67f6896247c08cfdb7ba27ac05fa4bffce8 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 17 Dec 2016 10:07:51 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E5=88=A0=E9=99=A4=E8=AF=BE=E7=A8=8B=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E4=B8=AD=E2=80=9C=E5=85=B3=E9=97=AD=E2=80=9D?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E2=80=9C=E5=8F=96=E6=B6=88=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/syllabuses/_delete_syllabus.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/syllabuses/_delete_syllabus.html.erb b/app/views/syllabuses/_delete_syllabus.html.erb index a72a87c03..d0a143551 100644 --- a/app/views/syllabuses/_delete_syllabus.html.erb +++ b/app/views/syllabuses/_delete_syllabus.html.erb @@ -10,8 +10,8 @@
    <% if @syllabus.courses.not_deleted.empty? %> <%=link_to '确认', syllabus_path(@syllabus), :class => 'Blue-btn fl', :method => 'delete'%> - 关闭 + 取消 <% else %> - 关闭 + 取消 <% end %>
    \ No newline at end of file From d6c51cce2a571db1f9c410890af03f7a4b6a1a18 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 17 Dec 2016 10:20:08 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E9=A6=96=E9=A1=B5=EF=BC=9A=E5=A6=82?= =?UTF-8?q?=E5=9B=BE=E5=85=B3=E6=B3=A8=E5=88=97=E8=A1=A8=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=B3=E6=B3=A8=E3=80=81=E5=8F=96=E6=B6=88=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E5=90=8E=E5=85=B3=E6=B3=A8=E6=95=B0=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=9C=AA=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/new_base_user.html.erb | 2 +- app/views/watchers/_set_watcher.js.erb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 35b106059..dfa6afb0a 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -143,7 +143,7 @@
  • 关注
    - <%= User.watched_by(@user).count %> + <%= User.watched_by(@user).count %>
  • diff --git a/app/views/watchers/_set_watcher.js.erb b/app/views/watchers/_set_watcher.js.erb index 83358b049..016465391 100644 --- a/app/views/watchers/_set_watcher.js.erb +++ b/app/views/watchers/_set_watcher.js.erb @@ -14,6 +14,8 @@ $("#fans_user_number_div").html('<%= escape_javascript ( link_to User.find(params[:target_id]).watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>params[:target_id]},:class=>"homepageImageNumber", :id => "user_fans_number") %>'); $("#fans_span").html('<%= count %>'); $("#watch_span").html('<%= count %>'); + $("#user_watchers_number").html('<%= User.watched_by(User.current).count %>'); + $("#user_fans_number").html('<%= User.current.watcher_users.count %>'); //在其他用户的粉丝、关注页面 <% else %> $("#users_list").html("<%= escape_javascript (render :partial => 'users/user_fans_item', :locals => {:list => list,:target=>User.find(params[:target_id]),:action_name=>action_name,:page=>params[:page]}) %>");