2016-10-12 16:09:17 +08:00
|
|
|
|
<div class="pro_new_prompt ml15 mr15 mb10"><p>温馨提示:每个项目只能创建一个版本库</p></div>
|
|
|
|
|
<% if @gitlab_repository.nil? %>
|
2016-10-12 17:02:51 +08:00
|
|
|
|
<div class=" sy_new_tchbox clear " >
|
2016-10-12 16:09:17 +08:00
|
|
|
|
<a href="javascript:void(0);" class=" sy_btn_green mb10">新建版本库</a>
|
|
|
|
|
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %>
|
|
|
|
|
<ul class="pro_newsetting_con mb15">
|
|
|
|
|
<li style="display: none">
|
|
|
|
|
<label class="label02"><%=l(:label_scm)%>:</label>
|
|
|
|
|
<%= select_tag('repository_scm', options_for_select(["Git"],@repository.class.name.demodulize), :data => {:remote => true, :method => 'get'}) %>
|
|
|
|
|
<% if @repository && ! @repository.class.scm_available %>
|
|
|
|
|
<span class="c_grey"><%= l(:text_scm_command_not_available) %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
|
|
|
|
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
|
|
|
|
<label class=" fl"><span class="c_red f12">*</span> 版本库名称 : </label>
|
2016-10-20 13:33:25 +08:00
|
|
|
|
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style=>"height: 28px;" %>
|
2016-10-12 16:09:17 +08:00
|
|
|
|
</li>
|
|
|
|
|
<li class="clear">
|
|
|
|
|
<label class=" fl"> </label>
|
|
|
|
|
<p class=" fl c_grey pro_new_grey">1.长度必须在1到254个字符之间<br/>
|
|
|
|
|
2.仅限使用小写字母(a-z)、数字、破折号(-)和下划线(_)<br>
|
|
|
|
|
3.一旦保存,标识无法修改</p>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<a href="<%= settings_project_path(@project, :tab => 'repositories')%>" class="fr sy_btn_grey"><%=l(:button_cancel)%></a>
|
|
|
|
|
<a href="#" onclick="$('#repository-form').submit();" class="fr sy_btn_blue mr5"><%=l(:lable_project_rep_create) %></a>
|
|
|
|
|
<% end %>
|
2016-10-12 17:02:51 +08:00
|
|
|
|
</div>
|
2016-10-12 16:09:17 +08:00
|
|
|
|
<% else %>
|
2016-10-12 17:02:51 +08:00
|
|
|
|
<div class=" clear ml15 mr15" >
|
|
|
|
|
<table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="w150 hidden">版本库名</th>
|
|
|
|
|
<th class="w100 hidden">管理系统</th>
|
|
|
|
|
<th class="w536 hidden">库路径</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="w150 hidden"><%= @gitlab_repository.identifier %></th>
|
|
|
|
|
<th class="w100 hidden">Git</th>
|
|
|
|
|
<th class="w536 hidden db"><%=h @repos_url %></th>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2016-10-12 16:09:17 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
|
2015-04-16 14:59:05 +08:00
|
|
|
|
<script>
|
|
|
|
|
function pro_st_show_ku()
|
|
|
|
|
{
|
|
|
|
|
$("#pro_st_edit_ku").toggle();
|
|
|
|
|
}
|
|
|
|
|
</script>
|