项目增加fork于某项目功能
This commit is contained in:
parent
a5193cd266
commit
03dba25ab7
|
@ -49,6 +49,11 @@ module ApplicationHelper
|
|||
(hidden_info && hidden_info.value == "1") ? true : false
|
||||
end
|
||||
|
||||
# 获取当前用户的fork数量
|
||||
def get_fork_from_project forked_from_project_id
|
||||
Project.find(forked_from_project_id)
|
||||
end
|
||||
|
||||
# 通过系统外部邮箱查找用户,如果用户不存在则用邮箱替换
|
||||
def get_user_by_mail mail
|
||||
user = User.find_by_mail(mail)
|
||||
|
|
|
@ -17,9 +17,16 @@
|
|||
<div class="fr clear mr15">
|
||||
<ul><span id="join_in_project_applied"><%= render :partial => "projects/applied_status" %></span></ul>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="pro_new_topnav mt15">
|
||||
<% unless @project.forked_from_project_id.nil? %>
|
||||
<div class="fl pro_new_name ml15 clear mt5">
|
||||
<span class="vl_fork fl mr5 mt2">forked from</span> <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl" %>
|
||||
<%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
<div class="pro_new_topnav mt8">
|
||||
<ul>
|
||||
<li id="project_menu_01">
|
||||
<%= link_to "#{l(:label_activity)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k(project_acts)}</span>".html_safe, {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "pro_new_proname", :title => "#{project_acts}" %>
|
||||
|
@ -79,6 +86,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--新版项目头部结束-->
|
||||
<script>
|
||||
$(function(){
|
||||
|
|
|
@ -856,6 +856,7 @@ input.pro_newissue_con_check{ width: 15px; height: 15px;}
|
|||
.icons_newpro_lock{width: 22px; height: 23px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 -113px no-repeat;}
|
||||
.pro_new_name{width: 600px; }
|
||||
a.pro_new_username { font-size: 20px; color: #3b94d6; line-height: 24px; cursor: default;}
|
||||
a.pro_new_username_fork { font-size: 12px; color: #3b94d6; line-height: 24px; cursor: default;}
|
||||
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;}
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
.vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||
.vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||
.vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;}
|
||||
.vl_fork {background:url(../images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
|
||||
.vl_fork {background:url(/images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
|
||||
.vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;}
|
||||
.vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px}
|
||||
.mt1 {margin-top:1px;}
|
||||
|
|
Loading…
Reference in New Issue