_repository.html.erb
39 lines
| 1.4 KiB
| text/plain
|
TextLexer
|
r8022 | <% labelled_remote_form_for :repository, @repository, | ||
:url => { :controller => 'repositories', :action => 'edit', :id => @project } do |f| %> | ||||
|
r714 | |||
<%= error_messages_for 'repository' %> | ||||
<div class="box tabular"> | ||||
|
r5511 | <p> | ||
<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %> | ||||
|
r5835 | <% if @repository && ! @repository.class.scm_available %> | ||
|
r7229 | <br /> | ||
<em><%= content_tag 'span', l(:text_scm_command_not_available), :class => 'error' %></em> | ||||
|
r5512 | <% end %> | ||
|
r5511 | </p> | ||
<% button_disabled = true %> | ||||
<% if @repository %> | ||||
|
r5512 | <% button_disabled = ! @repository.class.scm_available %> | ||
|
r5511 | <%= repository_field_tags(f, @repository)%> | ||
<% end %> | ||||
|
r714 | </div> | ||
<div class="contextual"> | ||||
|
r2004 | <% if @repository && !@repository.new_record? %> | ||
|
r5506 | <%= link_to(l(:label_user_plural), | ||
{ | ||||
:controller => 'repositories', | ||||
:action => 'committers', | ||||
:id => @project | ||||
}, | ||||
:class => 'icon icon-user') %> | ||||
|
r714 | <%= link_to(l(:button_delete), {:controller => 'repositories', :action => 'destroy', :id => @project}, | ||
:confirm => l(:text_are_you_sure), | ||||
|
r5506 | :method => :post, | ||
:class => 'icon icon-del') %> | ||||
|
r2004 | <% end %> | ||
|
r714 | </div> | ||
|
r5506 | <%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save), | ||
|
r5511 | :disabled => button_disabled) %> | ||
|
r714 | <% end %> | ||