##// END OF EJS Templates
scm: refactor projects/settings/_repository.rhtml....
Toshi MARUYAMA -
r5511:fb6c9a1396ec
parent child
Show More
@@ -1,31 +1,37
1 <% remote_form_for :repository, @repository,
1 <% remote_form_for :repository, @repository,
2 :url => { :controller => 'repositories', :action => 'edit', :id => @project },
2 :url => { :controller => 'repositories', :action => 'edit', :id => @project },
3 :builder => TabularFormBuilder,
3 :builder => TabularFormBuilder,
4 :lang => current_language do |f| %>
4 :lang => current_language do |f| %>
5
5
6 <%= error_messages_for 'repository' %>
6 <%= error_messages_for 'repository' %>
7
7
8 <div class="box tabular">
8 <div class="box tabular">
9 <p><%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %></p>
9 <p>
10 <%= repository_field_tags(f, @repository) if @repository %>
10 <%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
11 </p>
12 <% button_disabled = true %>
13 <% if @repository %>
14 <% button_disabled = false %>
15 <%= repository_field_tags(f, @repository)%>
16 <% end %>
11 </div>
17 </div>
12
18
13 <div class="contextual">
19 <div class="contextual">
14 <% if @repository && !@repository.new_record? %>
20 <% if @repository && !@repository.new_record? %>
15 <%= link_to(l(:label_user_plural),
21 <%= link_to(l(:label_user_plural),
16 {
22 {
17 :controller => 'repositories',
23 :controller => 'repositories',
18 :action => 'committers',
24 :action => 'committers',
19 :id => @project
25 :id => @project
20 },
26 },
21 :class => 'icon icon-user') %>
27 :class => 'icon icon-user') %>
22 <%= link_to(l(:button_delete), {:controller => 'repositories', :action => 'destroy', :id => @project},
28 <%= link_to(l(:button_delete), {:controller => 'repositories', :action => 'destroy', :id => @project},
23 :confirm => l(:text_are_you_sure),
29 :confirm => l(:text_are_you_sure),
24 :method => :post,
30 :method => :post,
25 :class => 'icon icon-del') %>
31 :class => 'icon icon-del') %>
26 <% end %>
32 <% end %>
27 </div>
33 </div>
28
34
29 <%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save),
35 <%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save),
30 :disabled => @repository.nil?) %>
36 :disabled => button_disabled) %>
31 <% end %>
37 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now