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

66 lines
3.4 KiB
Plaintext
Raw Normal View History

2016-11-09 13:34:03 +08:00
<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" >
2017-02-18 17:44:50 +08:00
<%# 实训项目和非实训项目,@type为true的时候为实训 %>
2017-02-20 14:23:02 +08:00
<% if @project.is_training_project? %>
2017-02-18 17:44:50 +08:00
<% if User.current.id == @project.user_id %>
2016-12-16 14:02:21 +08:00
<li class="center mb30" style="line-height:20px">
2017-02-18 17:44:50 +08:00
很抱歉,您不能在自己的实训项目中启动训练
2016-12-16 14:02:21 +08:00
</li>
2017-02-18 17:44:50 +08:00
<% 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) %>
2017-02-18 17:44:50 +08:00
您已经实训过该项目,点击“确定”将会跳转到您的实训项目主页,请问您是否继续?
<% 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" %>
2017-02-18 17:44:50 +08:00
<div class="cl"></div>
</li>
<% end %>
<% end %>
<% else %>
<% if User.current.id == @project.user_id %>
<li class="center mb30" style="line-height:20px">
自己不能Fork自己创建的项目
2016-12-16 14:02:21 +08:00
</li>
2017-02-18 17:44:50 +08:00
<% 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 %>
2017-02-18 17:44:50 +08:00
2016-11-09 13:34:03 +08:00
</ul>
</div>
</div>