OSDN Git Service

Merged r5887 from trunk.
[redminele/redmine.git] / app / views / projects / settings / _repository.rhtml
1 <% remote_form_for :repository, @repository,
2                    :url => { :controller => 'repositories', :action => 'edit', :id => @project },
3                    :builder => TabularFormBuilder,
4                    :lang => current_language do |f| %>
5
6 <%= error_messages_for 'repository' %>
7
8 <div class="box tabular">
9 <p>
10 <%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
11 <% if @repository %>
12 <br />
13 <%= image_tag((@repository.class.scm_available ? 'true.png' : 'exclamation.png'))%>
14 <%=  l(:text_scm_command) -%>: <%= @repository.class.scm_command %>
15 |
16 <%=  l(:text_scm_command_version) -%>: <%= @repository.class.scm_version_string %>
17 <% end %>
18 </p>
19 <% button_disabled = true %>
20 <% if @repository %>
21 <%   button_disabled = ! @repository.class.scm_available %>
22 <%=    repository_field_tags(f, @repository)%>
23 <% end %>
24 </div>
25
26 <div class="contextual">
27 <% if @repository && !@repository.new_record? %>
28 <%= link_to(l(:label_user_plural),
29                 {
30                 :controller => 'repositories',
31                 :action     => 'committers',
32                 :id         => @project
33                 },
34              :class => 'icon icon-user') %>
35 <%= link_to(l(:button_delete), {:controller => 'repositories', :action => 'destroy', :id => @project},
36             :confirm => l(:text_are_you_sure),
37             :method  => :post,
38             :class   => 'icon icon-del') %>
39 <% end %>
40 </div>
41
42 <%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save),
43                :disabled => button_disabled) %>
44 <% end %>