Revision 915:2a68662d5adf vendor/plugins/redmine_checkout/app/views/projects
| vendor/plugins/redmine_checkout/app/views/projects/settings/_repository_checkout.erb | ||
|---|---|---|
| 1 |
<p><%= form.select(:checkout_overwrite, [ |
|
| 2 |
[l(:general_text_Yes), "1"], |
|
| 3 |
[l(:general_text_No), "0"] |
|
| 4 |
], |
|
| 5 |
{},
|
|
| 6 |
:onchange => <<-EOF |
|
| 7 |
Effect.toggle($('checkout_settings'), 'slide', {duration:0.2});
|
|
| 8 |
EOF |
|
| 9 |
)%></p> |
|
| 10 |
|
|
| 11 |
<div id="checkout_settings" <%= 'style="display:none;"' unless form.object.checkout_overwrite? %>><fieldset> |
|
| 12 |
<legend><%=l :label_checkout %></legend> |
|
| 13 |
|
|
| 14 |
<p><%= form.text_area :checkout_description, :cols => 60, :rows => 5, :class => 'wiki-edit', :label => :field_description %></p> |
|
| 15 |
<%= wikitoolbar_for 'repository_checkout_description' %> |
|
| 16 |
|
|
| 17 |
<% if form.object.scm_name == 'Subversion' %> |
|
| 18 |
<p><%= form.select :checkout_display_login,[ |
|
| 19 |
[l(:label_display_login_none), ''], |
|
| 20 |
[l(:label_display_login_username), 'username'], |
|
| 21 |
[l(:label_display_login_password), 'password'] |
|
| 22 |
], |
|
| 23 |
:label => :setting_checkout_display_login %></p> |
|
| 24 |
<% end %> |
|
| 25 |
|
|
| 26 |
<p><%= form.check_box :checkout_display_command %></p> |
|
| 27 |
|
|
| 28 |
<% javascript_tag do %> |
|
| 29 |
protocolForm = new Subform( |
|
| 30 |
'<%= escape_javascript(render(:partial => "projects/settings/repository_checkout_protocol", :locals => {:protocol => Checkout::Protocol.new({:protocol => form.object.scm_name, :append_path => form.object.allow_subtree_checkout? ? 1: 0, :repository => form.object})})) %>',
|
|
| 31 |
<%= form.object.checkout_protocols.length %>, |
|
| 32 |
'checkout_protocol_table' |
|
| 33 |
); |
|
| 34 |
<% end %> |
|
| 35 |
<p><label><%=l :label_protocol_plural %></label><%=l :help_repository_checkout_protocols %></p> |
|
| 36 |
<%= hidden_field_tag 'repository[checkout_protocols][-1][protocol]', 'empty' %> |
|
| 37 |
<table class="list checkout_protocol_table"> |
|
| 38 |
<thead><tr> |
|
| 39 |
<th class="protocol_protocol" ><%= l(:setting_protocol)%></th> |
|
| 40 |
<th class="protocol_command" ><%= l(:setting_checkout_command)%></th> |
|
| 41 |
<th class="protocol_fixed_url" ><%= l(:setting_checkout_fixed_url) %></th> |
|
| 42 |
<th class="protocol_access" ><%= l(:label_permissions) %></th> |
|
| 43 |
<th class="protocol_append_path"><%= l(:label_append_path) %></th> |
|
| 44 |
<th class="protocol_is_default" ><%= l(:label_default) %></th> |
|
| 45 |
<th class="protocol_delete" ></th> |
|
| 46 |
</tr></thead> |
|
| 47 |
<tbody id="checkout_protocol_table"> |
|
| 48 |
<% form.object.checkout_protocols.each_with_index do |protocol, index| %> |
|
| 49 |
<%= render :partial => 'projects/settings/repository_checkout_protocol', :locals => {:protocol => protocol, :index => index, :classes => cycle('odd', 'even')} %>
|
|
| 50 |
<% end %> |
|
| 51 |
</tbody> |
|
| 52 |
</table> |
|
| 53 |
<div style="text-align: right"><%= link_to_function l(:button_add_protocol), "protocolForm.add()", {:class => "icon icon-add"} %></div>
|
|
| 54 |
</fieldset></div> |
|
| vendor/plugins/redmine_checkout/app/views/projects/settings/_repository_checkout.rhtml | ||
|---|---|---|
| 1 |
<p><%= form.select(:checkout_overwrite, [ |
|
| 2 |
[l(:general_text_Yes), "1"], |
|
| 3 |
[l(:general_text_No), "0"] |
|
| 4 |
], |
|
| 5 |
{},
|
|
| 6 |
:onchange => <<-EOF |
|
| 7 |
Effect.toggle($('checkout_settings'), 'slide', {duration:0.2});
|
|
| 8 |
EOF |
|
| 9 |
)%></p> |
|
| 10 |
|
|
| 11 |
<div id="checkout_settings" <%= 'style="display:none;"' unless form.object.checkout_overwrite? %>><fieldset> |
|
| 12 |
<legend><%=l :label_checkout %></legend> |
|
| 13 |
|
|
| 14 |
<p><%= form.text_area :checkout_description, :cols => 60, :rows => 5, :class => 'wiki-edit', :label => :field_description %></p> |
|
| 15 |
<%= wikitoolbar_for 'repository_checkout_description' %> |
|
| 16 |
|
|
| 17 |
<% if form.object.scm_name == 'Subversion' %> |
|
| 18 |
<p><%= form.select :checkout_display_login,[ |
|
| 19 |
[l(:label_display_login_none), ''], |
|
| 20 |
[l(:label_display_login_username), 'username'], |
|
| 21 |
[l(:label_display_login_password), 'password'] |
|
| 22 |
], |
|
| 23 |
:label => :setting_checkout_display_login %></p> |
|
| 24 |
<% end %> |
|
| 25 |
|
|
| 26 |
<p><%= form.check_box :checkout_display_command %></p> |
|
| 27 |
|
|
| 28 |
<% javascript_tag do %> |
|
| 29 |
protocolForm = new Subform( |
|
| 30 |
'<%= escape_javascript(render(:partial => "projects/settings/repository_checkout_protocol", :locals => {:protocol => Checkout::Protocol.new({:protocol => form.object.scm_name, :append_path => form.object.allow_subtree_checkout? ? 1: 0, :repository => form.object})})) %>',
|
|
| 31 |
<%= form.object.checkout_protocols.length %>, |
|
| 32 |
'checkout_protocol_table' |
|
| 33 |
); |
|
| 34 |
<% end %> |
|
| 35 |
<p><label><%=l :label_protocol_plural %></label><%=l :help_repository_checkout_protocols %></p> |
|
| 36 |
<%= hidden_field_tag 'repository[checkout_protocols][-1][protocol]', 'empty' %> |
|
| 37 |
<table class="list checkout_protocol_table"> |
|
| 38 |
<thead><tr> |
|
| 39 |
<th class="protocol_protocol" ><%= l(:setting_protocol)%></th> |
|
| 40 |
<th class="protocol_command" ><%= l(:setting_checkout_command)%></th> |
|
| 41 |
<th class="protocol_fixed_url" ><%= l(:setting_checkout_fixed_url) %></th> |
|
| 42 |
<th class="protocol_access" ><%= l(:label_permissions) %></th> |
|
| 43 |
<th class="protocol_append_path"><%= l(:label_append_path) %></th> |
|
| 44 |
<th class="protocol_is_default" ><%= l(:label_default) %></th> |
|
| 45 |
<th class="protocol_delete" ></th> |
|
| 46 |
</tr></thead> |
|
| 47 |
<tbody id="checkout_protocol_table"> |
|
| 48 |
<% form.object.checkout_protocols.each_with_index do |protocol, index| %> |
|
| 49 |
<%= render :partial => 'projects/settings/repository_checkout_protocol', :locals => {:protocol => protocol, :index => index, :classes => cycle('odd', 'even')} %>
|
|
| 50 |
<% end %> |
|
| 51 |
</tbody> |
|
| 52 |
</table> |
|
| 53 |
<div style="text-align: right"><%= link_to_function l(:button_add_protocol), "protocolForm.add()", {:class => "icon icon-add"} %></div>
|
|
| 54 |
</fieldset></div> |
|
| vendor/plugins/redmine_checkout/app/views/projects/settings/_repository_checkout_protocol.erb | ||
|---|---|---|
| 1 |
<% |
|
| 2 |
index ||= "--INDEX--" |
|
| 3 |
classes ||= "" |
|
| 4 |
|
|
| 5 |
protocol = Checkout::Protocol.new(protocol) unless protocol.is_a? Checkout::Protocol |
|
| 6 |
%> |
|
| 7 |
<tr id="<%= "checkout_protocols_#{index}" %>" class="<%= classes %>" <%= 'style="display:none"' if index == '--INDEX--' %>>
|
|
| 8 |
<td class="protocol_protocol"><%= text_field_tag "repository[checkout_protocols][#{index}][protocol]", protocol.protocol, :size => 10 %></td>
|
|
| 9 |
<td class="protocol_command"><%= text_field_tag "repository[checkout_protocols][#{index}][command]", protocol.command, :size => 15 %></td>
|
|
| 10 |
<td class="protocol_fixed_url"><%= text_field_tag "repository[checkout_protocols][#{index}][fixed_url]", protocol.fixed_url, :size => 60 %></td>
|
|
| 11 |
<td class="protocol_access"><%= select_tag "repository[checkout_protocols][#{index}][access]", options_for_select([
|
|
| 12 |
[l(:label_access_read_write), 'read+write'], |
|
| 13 |
[l(:label_access_read_only), 'read-only'], |
|
| 14 |
[l(:label_access_permission), 'permission']], protocol.access) %></td> |
|
| 15 |
<td class="protocol_append_path"><%= check_box_tag "repository[checkout_protocols][#{index}][append_path]", 1, protocol.append_path? %></td>
|
|
| 16 |
<td class="protocol_is_default"><%= check_box_tag "repository[checkout_protocols][#{index}][is_default]", 1, protocol.default? %></td>
|
|
| 17 |
<td class="protocol_delete"><%= image_to_function 'delete.png', "var e=$('checkout_protocols_#{index}');var parent=e.up(\"tbody\");e.remove();recalculate_even_odd(parent);return false" %></td>
|
|
| 18 |
</tr> |
|
| vendor/plugins/redmine_checkout/app/views/projects/settings/_repository_checkout_protocol.rhtml | ||
|---|---|---|
| 1 |
<% |
|
| 2 |
index ||= "--INDEX--" |
|
| 3 |
classes ||= "" |
|
| 4 |
|
|
| 5 |
protocol = Checkout::Protocol.new(protocol) unless protocol.is_a? Checkout::Protocol |
|
| 6 |
%> |
|
| 7 |
<tr id="<%= "checkout_protocols_#{index}" %>" class="<%= classes %>" <%= 'style="display:none"' if index == '--INDEX--' %>>
|
|
| 8 |
<td class="protocol_protocol"><%= text_field_tag "repository[checkout_protocols][#{index}][protocol]", protocol.protocol, :size => 10 %></td>
|
|
| 9 |
<td class="protocol_command"><%= text_field_tag "repository[checkout_protocols][#{index}][command]", protocol.command, :size => 15 %></td>
|
|
| 10 |
<td class="protocol_fixed_url"><%= text_field_tag "repository[checkout_protocols][#{index}][fixed_url]", protocol.fixed_url, :size => 60 %></td>
|
|
| 11 |
<td class="protocol_access"><%= select_tag "repository[checkout_protocols][#{index}][access]", options_for_select([
|
|
| 12 |
[l(:label_access_read_write), 'read+write'], |
|
| 13 |
[l(:label_access_read_only), 'read-only'], |
|
| 14 |
[l(:label_access_permission), 'permission']], protocol.access) %></td> |
|
| 15 |
<td class="protocol_append_path"><%= check_box_tag "repository[checkout_protocols][#{index}][append_path]", 1, protocol.append_path? %></td>
|
|
| 16 |
<td class="protocol_is_default"><%= check_box_tag "repository[checkout_protocols][#{index}][is_default]", 1, protocol.default? %></td>
|
|
| 17 |
<td class="protocol_delete"><%= image_to_function 'delete.png', "var e=$('checkout_protocols_#{index}');var parent=e.up(\"tbody\");e.remove();recalculate_even_odd(parent);return false" %></td>
|
|
| 18 |
</tr> |
|
Also available in: Unified diff