fork项目提示
This commit is contained in:
parent
c0391b967f
commit
ac803cab63
|
@ -26,33 +26,18 @@
|
|||
</li>
|
||||
<li class="mr5 fl">
|
||||
<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>-->
|
||||
<!-- <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>
|
||||
<%#= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<!--项目fork-->
|
||||
<% if @project.gpid && User.current.id != @project.user_id %>
|
||||
<!-- <div class="fr mt5"><%#= link_to "<span class='vl_fork'></span>".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'},
|
||||
:class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %>
|
||||
<span href="javascript:void(0);" class="vl_btn_2 fb"><%#= link_to @project.forked_count.to_i, member_forked_project_path(@project) %></span>
|
||||
</div>-->
|
||||
<li class="mr5 fl">
|
||||
<!-- <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_fork_count %></a>
|
||||
|
||||
</li>
|
||||
<% else%>
|
||||
<li class="mr5 fl">
|
||||
<%#= link_to "<span class='vl_fork '></span>".html_safe+"Fork","#",
|
||||
:class=>"pro_new_grey_topbtn_left fl"%>
|
||||
<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_fork_count %></a>
|
||||
<% end %>
|
||||
<li class="mr5 fl">
|
||||
<%= 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_fork_count %></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -6,20 +6,31 @@
|
|||
</div>
|
||||
<div class="sy_popup_con" style="width:380px;">
|
||||
<ul class="sy_popup_add" >
|
||||
<li class="center mb5" style="line-height:20px">
|
||||
<% if has_forked_cur_project(@project) %>
|
||||
您已经Fork过该项目,点击“确定”将会跳入您Fork的项目主页,请问是否继续?
|
||||
<% if User.current.id == @project.user_id %>
|
||||
<li class="center mb30" style="line-height:20px">
|
||||
自己不能Fork自己创建的项目
|
||||
</li>
|
||||
<% else %>
|
||||
Fork将在后台执行<br>平台将为您创建一个新的同名项目和版本库,请问是否继续?
|
||||
<% if @project.gpid.blank? %>
|
||||
<li class="center mb30" style="line-height:20px">
|
||||
该项目还没有创建版本库,暂时不能Fork
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="center mb5" style="line-height:20px">
|
||||
<% if has_forked_cur_project(@project) %>
|
||||
您已经Fork过该项目,点击“确定”将会跳入您Fork的项目主页,请问是否继续?
|
||||
<% else %>
|
||||
Fork将在后台执行<br>平台将为您创建一个新的同名项目和版本库,请问是否继续?
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="mt10">
|
||||
<label class="mr27"> </label>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取 消</a>
|
||||
<%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="mt10">
|
||||
<label class="mr27"> </label>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取 消</a>
|
||||
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确 定</a>-->
|
||||
<%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue