From b1ae697c3d393067cb19aaea9d26811c84110d16 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 25 Nov 2016 16:00:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=BC=A9=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=E9=A1=B5=E9=9D=A2=E4=B8=8B=E6=96=B9=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=B7=A6=E5=8F=B3=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/css/public.css | 2 +- public/stylesheets/css/structure.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index 96abaf93d..28934b0c5 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -117,7 +117,7 @@ a.resourcesTypeUser {background:url(../images/homepage_icon.png) -178px -453px n .softwareIcon {background:url(/images/hwork_icon.png) -5px -254px no-repeat; padding-left:23px;} /*意见反馈*/ -html{ overflow-x:hidden;} +html{ overflow-x:auto;} .scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } .side_content{width:180px; height:auto; overflow:hidden; float:left;} .side_content .side_list {width:180px;overflow:hidden;} diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index dffa0f97b..c350da05c 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -455,7 +455,7 @@ a.topnav_login_box:hover {color:#a1ebff;} .portraitRadius {border-radius: 3px;} /*底部*/ -#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ +#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;min-width: 1000px;} /*margin-bottom:10px;*/ .footerAboutContainer {width:auto; border-bottom:1px solid #efefef; text-align:center;} .footerAbout{margin:0 auto;height:35px; line-height:35px; padding-top: 10px; display:inline-block;} .languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} From f1b6e67e507304d787d0bcda335a838fd1844223 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 25 Nov 2016 17:10:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=A4=B4=E9=83=A8?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9=EF=BC=8Cfork=E6=95=B0?= =?UTF-8?q?=E7=9B=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- app/helpers/application_helper.rb | 6 ++++++ app/views/projects/_applied_status.html.erb | 6 +++--- app/views/projects/member.html.erb | 2 +- public/stylesheets/css/project.css | 4 ++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 09cede45a..322c21f0a 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -603,7 +603,7 @@ class ProjectsController < ApplicationController @limit = 20 @is_remote = true - @forked_count = @project.forked_count + @forked_count = @forked_projects.count @forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1 @offset ||= @forked_pages.offset @forked_projects = paginateHelper @forked_projects, @limit diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ad3d2c61d..a1a5ecacb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2837,6 +2837,12 @@ module ApplicationHelper tag_list end + # 获取项目fork成员数 + def project_fork_count + @forked_projects = Project.where(:forked_from_project_id => @project.id) + @forked_count = @forked_projects.count + end + def get_org_subfield_tag_list org_subfield all_attachments = org_subfield.attachments.select{|attachment| attachment.is_public? || (attachment.container_type == "OrgSubfield" && User.current.member_of_org?(org_subfield.organization))|| diff --git a/app/views/projects/_applied_status.html.erb b/app/views/projects/_applied_status.html.erb index 55190c613..5b769927e 100644 --- a/app/views/projects/_applied_status.html.erb +++ b/app/views/projects/_applied_status.html.erb @@ -25,7 +25,7 @@ :id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>