2011-05-03 11:33:46 +04:00
|
|
|
<% remote_form_for :repository, @repository,
|
2007-09-14 15:34:08 +04:00
|
|
|
:url => { :controller => 'repositories', :action => 'edit', :id => @project },
|
2008-02-13 01:43:37 +03:00
|
|
|
:builder => TabularFormBuilder,
|
|
|
|
:lang => current_language do |f| %>
|
2007-09-14 15:34:08 +04:00
|
|
|
|
|
|
|
<%= error_messages_for 'repository' %>
|
|
|
|
|
|
|
|
<div class="box tabular">
|
2011-05-04 10:35:49 +04:00
|
|
|
<p>
|
|
|
|
<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
|
2011-05-29 14:56:49 +04:00
|
|
|
<% if @repository && ! @repository.class.scm_available %>
|
2011-09-18 03:00:42 +04:00
|
|
|
<br />
|
|
|
|
<em><%= content_tag 'span', l(:text_scm_command_not_available), :class => 'error' %></em>
|
2011-05-04 11:49:02 +04:00
|
|
|
<% end %>
|
2011-05-04 10:35:49 +04:00
|
|
|
</p>
|
|
|
|
<% button_disabled = true %>
|
|
|
|
<% if @repository %>
|
2011-05-04 11:49:02 +04:00
|
|
|
<% button_disabled = ! @repository.class.scm_available %>
|
2011-05-04 10:35:49 +04:00
|
|
|
<%= repository_field_tags(f, @repository)%>
|
|
|
|
<% end %>
|
2007-09-14 15:34:08 +04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="contextual">
|
2008-11-10 21:59:06 +03:00
|
|
|
<% if @repository && !@repository.new_record? %>
|
2011-05-04 09:00:16 +04:00
|
|
|
<%= link_to(l(:label_user_plural),
|
|
|
|
{
|
|
|
|
:controller => 'repositories',
|
|
|
|
:action => 'committers',
|
|
|
|
:id => @project
|
|
|
|
},
|
|
|
|
:class => 'icon icon-user') %>
|
2007-09-14 15:34:08 +04:00
|
|
|
<%= link_to(l(:button_delete), {:controller => 'repositories', :action => 'destroy', :id => @project},
|
|
|
|
:confirm => l(:text_are_you_sure),
|
2011-05-04 09:00:16 +04:00
|
|
|
:method => :post,
|
|
|
|
:class => 'icon icon-del') %>
|
2008-11-10 21:59:06 +03:00
|
|
|
<% end %>
|
2007-09-14 15:34:08 +04:00
|
|
|
</div>
|
|
|
|
|
2011-05-04 09:00:16 +04:00
|
|
|
<%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save),
|
2011-05-04 10:35:49 +04:00
|
|
|
:disabled => button_disabled) %>
|
2007-09-14 15:34:08 +04:00
|
|
|
<% end %>
|