socialforge/app/views/repositories/_forked_popbox.html.erb

66 lines
3.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div style="width:460px;">
<div class="sy_popup_top">
<h3 class="fl">提示</h3>
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
<div class="cl"></div>
</div>
<div class="sy_popup_con" style="width:380px;">
<ul class="sy_popup_add" >
<%# 实训项目和非实训项目,@type为true的时候为实训 %>
<% if @project.is_training_project? %>
<% if User.current.id == @project.user_id %>
<li class="center mb30" style="line-height:20px">
很抱歉,您不能在自己的实训项目中启动训练
</li>
<% else %>
<% if @project.gpid.blank? %>
<li class="center mb30" style="line-height:20px">
该项目还没有创建版本库,暂时不支持实训
</li>
<% else %>
<li class="center mb5" style="line-height:20px">
<% if has_forked_cur_project(@project) %>
您已经实训过该项目,点击“确定”将会跳转到您的实训项目主页,请问您是否继续?
<% else %>
实训将在后台为您创建一个新的同名项目,并为您推送第一个任务,请问您是否继续?
<% end %>
</li>
<li class="mt10">
<label class="mr27">&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a>
<%= link_to "确 定", {:controller => 'repositories', :action => 'training_task_execute'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %>
<div class="cl"></div>
</li>
<% end %>
<% end %>
<% else %>
<% if User.current.id == @project.user_id %>
<li class="center mb30" style="line-height:20px">
自己不能Fork自己创建的项目
</li>
<% else %>
<% 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">&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a>
<%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %>
<div class="cl"></div>
</li>
<% end %>
<% end %>
<% end %>
</ul>
</div>
</div>