parent
6c500109c9
commit
a62001c892
|
@ -232,6 +232,18 @@ module RepositoriesHelper
|
|||
:label => l(:label_git_report_last_commit)
|
||||
))
|
||||
end
|
||||
|
||||
# 判断项目是否有主版本库
|
||||
def judge_main_repository(pro)
|
||||
if pro.repositories.blank?
|
||||
return false
|
||||
else
|
||||
pro.repositories.sort.each do |rep|
|
||||
rep.is_default?
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
# def cvs_field_tags(form, repository)
|
||||
# content_tag('p', form.text_field(
|
||||
# :root_url,
|
||||
|
|
|
@ -72,10 +72,12 @@
|
|||
<span class="c_grey"><%= l(:text_scm_command_not_available) %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
<% unless judge_main_repository(@project) %>
|
||||
<li>
|
||||
<label class="label02"><%=l(:field_repository_is_default)%>:</label>
|
||||
<%= f.check_box :is_default, :label => "" %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span><%=l(:label_repository_name)%>:</label>
|
||||
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>""%>
|
||||
|
|
Loading…
Reference in New Issue