项目头部样式修改,fork数目错误
This commit is contained in:
parent
23332c2821
commit
f1b6e67e50
|
@ -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
|
||||
|
|
|
@ -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))||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
||||
</li>
|
||||
<li class="mr5 fl">
|
||||
<a class="pro_new_topbtn_left fl "> 已加入</a>
|
||||
<a class="pro_new_topbtn_left fl " style="cursor:default;"> 已加入</a>
|
||||
<!-- <a href="<%= project_member_path(@project) %>" class=" pro_new_topbtn fl"><%= Member.where(:project_id => @project.id).count %></a>-->
|
||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
||||
</li>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="pro_new_topbtn_left fl" target="_blank">Fork</a>-->
|
||||
<%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", forked_pop_project_path(@project),
|
||||
:class=>"pro_new_topbtn_left fl", :remote => true %>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= @project.forked_count.to_i %></a>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= project_fork_count %></a>
|
||||
|
||||
</li>
|
||||
<% else%>
|
||||
|
@ -52,7 +52,7 @@
|
|||
<a href="javascript:void(0)" class="pro_new_grey_topbtn_left fl" >
|
||||
<span class='vl_fork'>Fork</span>
|
||||
</a>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= @project.forked_count.to_i %></a>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= project_fork_count %></a>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<h2 class="clear"><%= @subPage_title %>
|
||||
<% if is_project_manager?(User.current, @project) %>
|
||||
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
||||
<%=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;" %>
|
||||
</span>
|
||||
<% end %>
|
||||
</h2>
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue