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 => "关注成员列表" %>
  • - 已加入 + 已加入 <%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
  • @@ -42,7 +42,7 @@ <%= link_to "".html_safe+"Fork", forked_pop_project_path(@project), :class=>"pro_new_topbtn_left fl", :remote => true %> - <%= @project.forked_count.to_i %> + <%= project_fork_count %> <% else%> @@ -52,7 +52,7 @@ Fork - <%= @project.forked_count.to_i %> + <%= project_fork_count %> <% end %> diff --git a/app/views/projects/member.html.erb b/app/views/projects/member.html.erb index 49ab1ac68..83fcf7752 100644 --- a/app/views/projects/member.html.erb +++ b/app/views/projects/member.html.erb @@ -3,7 +3,7 @@

    <%= @subPage_title %> <% if is_project_manager?(User.current, @project) %> - <%=link_to "成员管理", {:controller => 'projects', :action => 'settings'}, :id => @project.id, :tab => 'members', :class => "sy_cblue", :style => "font-weight: normal;" %> + <%=link_to "成员管理", settings_project_url(@project, :tab => 'members'), :id => @project.id, :class => "sy_cblue", :style => "font-weight: normal;" %> <% end %>

    diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index 5af60925c..530287ed4 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -865,9 +865,9 @@ a.pro_new_username_fork { font-size: 12px; color: #3b94d6; line-height: 24px;} a.pro_new_proname{ overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;} a.pro_new_project_name{ width: 250px; overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;} a.pro_new_topbtn{ padding: 3px 7px; font-size: 12px; line-height: 20px; color: #333;vertical-align: middle;background-color: #fff; border: 1px solid #ddd; border-left: 0; border-top-right-radius: 3px; border-bottom-right-radius: 3px; color: #333;} -a.pro_new_topbtn_left { padding: 3px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #333; } +a.pro_new_topbtn_left { padding: 3px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #333;} a:hover.pro_new_topbtn_left{background-image: linear-gradient(#ededed, #dddddd);} -a.pro_new_grey_topbtn_left{padding: 3px 10px; font-size: 12px;line-height: 20px; background: #fff; border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #888888; } +a.pro_new_grey_topbtn_left{padding: 3px 10px; font-size: 12px;line-height: 20px; background: #fff; border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #888888; cursor:default;} .pro_new_topnav ul{border-bottom: 3px solid #fff; height: 30px; line-height: 30px;} .pro_new_topnav ul li{ float: left;padding:0 15px; height: 30px; line-height: 30px;text-align: center; } .pro_new_topnav_active{border-bottom: 3px solid #3b94d6; }