socialforge/app/views/projects/settings/_new_repositories.html.erb

58 lines
2.8 KiB
Plaintext
Raw Normal View History

<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 " >
<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>&nbsp;版本库名称&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style=>"height: 28px;" %>
</li>
<li class="clear">
<label class=" fl">&nbsp;&nbsp;</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>
<% 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>
<% end %>
<script>
function pro_st_show_ku()
{
$("#pro_st_edit_ku").toggle();
}
</script>