Revision 918:04114f36670d vendor/plugins/redmine_checkout/app/views
| 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.html.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_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.html.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/redmine_checkout_hooks/_view_repositories_show_contextual.erb | ||
|---|---|---|
| 1 |
<div class="repository-info"> |
|
| 2 |
<% if repository.checkout_description.present? %> |
|
| 3 |
<div class="wiki<%= ' bottomline' if protocols.present? %>"><%= textilizable repository.checkout_description %></div> |
|
| 4 |
<% end %> |
|
| 5 |
<% if protocols.present? %> |
|
| 6 |
<div id="checkout_box"> |
|
| 7 |
<ul id="checkout_protocols"> |
|
| 8 |
<% protocols.each do |p| -%> |
|
| 9 |
<li> |
|
| 10 |
<a <%= 'class="selected"' if p == default_protocol %> id="checkout_protocol_<%= p.protocol.to_s.underscore %>" data-permission="<%= p.access_rw(User.current) %>" href="<%= URI.escape p.url(checkout_path) %>"><%=h p.protocol %></a> |
|
| 11 |
</li> |
|
| 12 |
<% end -%> |
|
| 13 |
</ul> |
|
| 14 |
<%= text_field_tag :checkout_url, h(default_protocol.full_command(checkout_path)), :readonly => true %> |
|
| 15 |
<%- if Setting.checkout_use_zero_clipboard? %> |
|
| 16 |
<div id="clipboard_container" title="<%= l(:label_copy_to_clipboard) %>" style="display: none;"> |
|
| 17 |
<div id="clipboard_button"><%= image_tag 'paste.png', :plugin => 'redmine_checkout' %></div> |
|
| 18 |
</div> |
|
| 19 |
<% end -%> |
|
| 20 |
|
|
| 21 |
<p> |
|
| 22 |
<% if User.current.logged? %> |
|
| 23 |
<% if repository.is_external? %> |
|
| 24 |
<%=l :label_access_type_all, :type => l(:label_access_read_only) %> |
|
| 25 |
<% else %> |
|
| 26 |
<% if default_protocol %><%=l :label_access_type, :type => l(default_protocol.access_label(User.current)) %><% end %> |
|
| 27 |
<% end %> |
|
| 28 |
<% else %> |
|
| 29 |
|
|
| 30 |
<% end %> |
|
| 31 |
</p> |
|
| 32 |
|
|
| 33 |
<% javascript_tag do %> |
|
| 34 |
var checkout_access = $H({<%= protocols.inject([]){|r,p| r << "'checkout_protocol_#{p.protocol.to_s.underscore}': '#{l(p.access_label(User.current))}'"}.join(', ') %>});
|
|
| 35 |
var checkout_commands = $H({<%= protocols.inject([]){|r,p| r << "'checkout_protocol_#{p.protocol.to_s.underscore}': '#{escape_javascript(p.full_command(checkout_path))}'"}.join(', ') %>});
|
|
| 36 |
<%- if Setting.checkout_use_zero_clipboard? %>ZeroClipboard.setMoviePath( '<%= image_path('ZeroClipboard.swf', :plugin => 'redmine_checkout') %>' );<% end %>
|
|
| 37 |
<% end %> |
|
| 38 |
</div> |
|
| 39 |
<% end%> |
|
| 40 |
<% if repository.is_external? %> |
|
| 41 |
<div style="clear: left"> |
|
| 42 |
</div> |
|
| 43 |
<p class="topline" style="padding-top: 1em"><%= l(:text_repository_external, :location => repository.external_url) %></p> |
|
| 44 |
<% end %> |
|
| 45 |
</div> |
|
| 46 |
<div style="clear: left"></div> |
|
| 47 |
|
|
| 48 |
<% content_for :header_tags do %> |
|
| 49 |
<%= stylesheet_link_tag 'checkout', :plugin => 'redmine_checkout' %> |
|
| 50 |
<%= javascript_include_tag 'checkout', :plugin => 'redmine_checkout' %> |
|
| 51 |
<%= (javascript_include_tag 'ZeroClipboard', :plugin => 'redmine_checkout') if Setting.checkout_use_zero_clipboard? %> |
|
| 52 |
<% end %> |
|
| vendor/plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.html.erb | ||
|---|---|---|
| 1 |
<div class="repository-info"> |
|
| 2 |
<% if repository.checkout_description.present? %> |
|
| 3 |
<div class="wiki<%= ' bottomline' if protocols.present? %>"><%= textilizable repository.checkout_description %></div> |
|
| 4 |
<% end %> |
|
| 5 |
<% if protocols.present? %> |
|
| 6 |
<div id="checkout_box"> |
|
| 7 |
<ul id="checkout_protocols"> |
|
| 8 |
<% protocols.each do |p| -%> |
|
| 9 |
<li> |
|
| 10 |
<a <%= 'class="selected"' if p == default_protocol %> id="checkout_protocol_<%= p.protocol.to_s.underscore %>" data-permission="<%= p.access_rw(User.current) %>" href="<%= URI.escape p.url(checkout_path) %>"><%=h p.protocol %></a> |
|
| 11 |
</li> |
|
| 12 |
<% end -%> |
|
| 13 |
</ul> |
|
| 14 |
<%= text_field_tag :checkout_url, h(default_protocol.full_command(checkout_path)), :readonly => true %> |
|
| 15 |
<%- if Setting.checkout_use_zero_clipboard? %> |
|
| 16 |
<div id="clipboard_container" title="<%= l(:label_copy_to_clipboard) %>" style="display: none;"> |
|
| 17 |
<div id="clipboard_button"><%= image_tag 'paste.png', :plugin => 'redmine_checkout' %></div> |
|
| 18 |
</div> |
|
| 19 |
<% end -%> |
|
| 20 |
|
|
| 21 |
<p> |
|
| 22 |
<% if User.current.logged? %> |
|
| 23 |
<% if repository.is_external? %> |
|
| 24 |
<%=l :label_access_type_all, :type => l(:label_access_read_only) %> |
|
| 25 |
<% else %> |
|
| 26 |
<% if default_protocol %><%=l :label_access_type, :type => l(default_protocol.access_label(User.current)) %><% end %> |
|
| 27 |
<% end %> |
|
| 28 |
<% else %> |
|
| 29 |
|
|
| 30 |
<% end %> |
|
| 31 |
</p> |
|
| 32 |
|
|
| 33 |
<% javascript_tag do %> |
|
| 34 |
var checkout_access = $H({<%= protocols.inject([]){|r,p| r << "'checkout_protocol_#{p.protocol.to_s.underscore}': '#{l(p.access_label(User.current))}'"}.join(', ') %>});
|
|
| 35 |
var checkout_commands = $H({<%= protocols.inject([]){|r,p| r << "'checkout_protocol_#{p.protocol.to_s.underscore}': '#{escape_javascript(p.full_command(checkout_path))}'"}.join(', ') %>});
|
|
| 36 |
<%- if Setting.checkout_use_zero_clipboard? %>ZeroClipboard.setMoviePath( '<%= image_path('ZeroClipboard.swf', :plugin => 'redmine_checkout') %>' );<% end %>
|
|
| 37 |
<% end %> |
|
| 38 |
</div> |
|
| 39 |
<% end%> |
|
| 40 |
<% if repository.is_external? %> |
|
| 41 |
<div style="clear: left"> |
|
| 42 |
</div> |
|
| 43 |
<p class="topline" style="padding-top: 1em"><%= l(:text_repository_external, :location => repository.external_url) %></p> |
|
| 44 |
<% end %> |
|
| 45 |
</div> |
|
| 46 |
<div style="clear: left"></div> |
|
| 47 |
|
|
| 48 |
<% content_for :header_tags do %> |
|
| 49 |
<%= stylesheet_link_tag 'checkout', :plugin => 'redmine_checkout' %> |
|
| 50 |
<%= javascript_include_tag 'checkout', :plugin => 'redmine_checkout' %> |
|
| 51 |
<%= (javascript_include_tag 'ZeroClipboard', :plugin => 'redmine_checkout') if Setting.checkout_use_zero_clipboard? %> |
|
| 52 |
<% end %> |
|
| vendor/plugins/redmine_checkout/app/views/settings/_checkout.erb | ||
|---|---|---|
| 1 |
<% form_tag({:action => 'edit', :tab => 'checkout'}) do %>
|
|
| 2 |
|
|
| 3 |
<% javascript_tag do %> |
|
| 4 |
protocolForms = $H(); |
|
| 5 |
|
|
| 6 |
document.observe("dom:loaded", function() {
|
|
| 7 |
$('tab-content-checkout').select('fieldset.collapsed').each(function(e){
|
|
| 8 |
e.down('div').hide();
|
|
| 9 |
}); |
|
| 10 |
<% |
|
| 11 |
CheckoutHelper.supported_scm.select{|scm| Setting.enabled_scm.include?(scm)}.each do |scm|
|
|
| 12 |
next if Setting.send("checkout_overwrite_description_#{scm}?")
|
|
| 13 |
-%> |
|
| 14 |
$('settings_checkout_description_<%= scm %>').up('div').up('div').hide();
|
|
| 15 |
<%- end %> |
|
| 16 |
}); |
|
| 17 |
<% end %> |
|
| 18 |
|
|
| 19 |
|
|
| 20 |
<div class="box tabular settings"> |
|
| 21 |
<p><%= setting_check_box :checkout_display_checkout_info %></p> |
|
| 22 |
|
|
| 23 |
<p><%= setting_text_area :checkout_description_Abstract, :cols => 60, :rows => 5, :class => 'wiki-edit', :label => :field_description %></p> |
|
| 24 |
<%= wikitoolbar_for 'settings_checkout_description_Abstract' %> |
|
| 25 |
|
|
| 26 |
<p><%= setting_check_box :checkout_use_zero_clipboard %></p> |
|
| 27 |
|
|
| 28 |
<% CheckoutHelper.supported_scm.select{|scm| Setting.enabled_scm.include?(scm)}.each do |scm| -%>
|
|
| 29 |
<fieldset class="collapsible collapsed"> |
|
| 30 |
<legend onclick="toggleFieldset(this);"><%= "Repository::#{scm}".constantize.scm_name %></legend>
|
|
| 31 |
<div><%= render :partial => 'checkout_scm', :locals => {:scm => scm} %></div>
|
|
| 32 |
</fieldset> |
|
| 33 |
<%- end %> |
|
| 34 |
|
|
| 35 |
</div> |
|
| 36 |
|
|
| 37 |
<%= submit_tag l(:button_save) %> |
|
| 38 |
<%- end %> |
|
| 39 |
|
|
| 40 |
<% content_for :header_tags do %> |
|
| 41 |
<%= javascript_include_tag 'subform', :plugin => 'redmine_checkout' %> |
|
| 42 |
<%= stylesheet_link_tag 'checkout', :plugin => 'redmine_checkout' %> |
|
| 43 |
<% end %> |
|
| vendor/plugins/redmine_checkout/app/views/settings/_checkout.html.erb | ||
|---|---|---|
| 1 |
<% form_tag({:action => 'edit', :tab => 'checkout'}) do %>
|
|
| 2 |
|
|
| 3 |
<% javascript_tag do %> |
|
| 4 |
protocolForms = $H(); |
|
| 5 |
|
|
| 6 |
document.observe("dom:loaded", function() {
|
|
| 7 |
$('tab-content-checkout').select('fieldset.collapsed').each(function(e){
|
|
| 8 |
e.down('div').hide();
|
|
| 9 |
}); |
|
| 10 |
<% |
|
| 11 |
CheckoutHelper.supported_scm.select{|scm| Setting.enabled_scm.include?(scm)}.each do |scm|
|
|
| 12 |
next if Setting.send("checkout_overwrite_description_#{scm}?")
|
|
| 13 |
-%> |
|
| 14 |
$('settings_checkout_description_<%= scm %>').up('div').up('div').hide();
|
|
| 15 |
<%- end %> |
|
| 16 |
}); |
|
| 17 |
<% end %> |
|
| 18 |
|
|
| 19 |
|
|
| 20 |
<div class="box tabular settings"> |
|
| 21 |
<p><%= setting_check_box :checkout_display_checkout_info %></p> |
|
| 22 |
|
|
| 23 |
<p><%= setting_text_area :checkout_description_Abstract, :cols => 60, :rows => 5, :class => 'wiki-edit', :label => :field_description %></p> |
|
| 24 |
<%= wikitoolbar_for 'settings_checkout_description_Abstract' %> |
|
| 25 |
|
|
| 26 |
<p><%= setting_check_box :checkout_use_zero_clipboard %></p> |
|
| 27 |
|
|
| 28 |
<% CheckoutHelper.supported_scm.select{|scm| Setting.enabled_scm.include?(scm)}.each do |scm| -%>
|
|
| 29 |
<fieldset class="collapsible collapsed"> |
|
| 30 |
<legend onclick="toggleFieldset(this);"><%= "Repository::#{scm}".constantize.scm_name %></legend>
|
|
| 31 |
<div><%= render :partial => 'checkout_scm', :locals => {:scm => scm} %></div>
|
|
| 32 |
</fieldset> |
|
| 33 |
<%- end %> |
|
| 34 |
|
|
| 35 |
</div> |
|
| 36 |
|
|
| 37 |
<%= submit_tag l(:button_save) %> |
|
| 38 |
<%- end %> |
|
| 39 |
|
|
| 40 |
<% content_for :header_tags do %> |
|
| 41 |
<%= javascript_include_tag 'subform', :plugin => 'redmine_checkout' %> |
|
| 42 |
<%= stylesheet_link_tag 'checkout', :plugin => 'redmine_checkout' %> |
|
| 43 |
<% end %> |
|
| vendor/plugins/redmine_checkout/app/views/settings/_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_#{scm}_#{index}" %>" class="<%= classes %>" <%= 'style="display:none"' if index == '--INDEX--' %>>
|
|
| 8 |
<td class="protocol_protocol" ><%= text_field_tag "settings[checkout_protocols_#{scm}][#{index}][protocol]", protocol.protocol, :size => 10 %></td>
|
|
| 9 |
<td class="protocol_command" ><%= text_field_tag "settings[checkout_protocols_#{scm}][#{index}][command]", protocol.command, :size => 15 %></td>
|
|
| 10 |
<td class="protocol_regex" ><%= text_field_tag "settings[checkout_protocols_#{scm}][#{index}][regex]", protocol.regex, :size => 30 %></td>
|
|
| 11 |
<td class="protocol_regex_replacement"><%= text_field_tag "settings[checkout_protocols_#{scm}][#{index}][regex_replacement]", protocol.regex_replacement, :size => 30 %></td>
|
|
| 12 |
<td class="protocol_access" ><%= select_tag "settings[checkout_protocols_#{scm}][#{index}][access]", options_for_select([
|
|
| 13 |
[l(:label_access_read_write), 'read+write'], |
|
| 14 |
[l(:label_access_read_only), 'read-only'], |
|
| 15 |
[l(:label_access_permission), 'permission']], protocol.access) %></td> |
|
| 16 |
<td class="protocol_append_path"><%= check_box_tag "settings[checkout_protocols_#{scm}][#{index}][append_path]", 1, protocol.append_path? %></td>
|
|
| 17 |
<td class="protocol_is_default"><%= check_box_tag "settings[checkout_protocols_#{scm}][#{index}][is_default]", 1, protocol.default? %></td>
|
|
| 18 |
<td class="protocol_delete"><%= image_to_function 'delete.png', "var e=$('checkout_protocols_#{scm}_#{index}');var parent=e.up(\"tbody\");e.remove();recalculate_even_odd(parent);return false" %></td>
|
|
| 19 |
</tr> |
|
| vendor/plugins/redmine_checkout/app/views/settings/_checkout_protocol.html.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_#{scm}_#{index}" %>" class="<%= classes %>" <%= 'style="display:none"' if index == '--INDEX--' %>>
|
|
| 8 |
<td class="protocol_protocol" ><%= text_field_tag "settings[checkout_protocols_#{scm}][#{index}][protocol]", protocol.protocol, :size => 10 %></td>
|
|
| 9 |
<td class="protocol_command" ><%= text_field_tag "settings[checkout_protocols_#{scm}][#{index}][command]", protocol.command, :size => 15 %></td>
|
|
| 10 |
<td class="protocol_regex" ><%= text_field_tag "settings[checkout_protocols_#{scm}][#{index}][regex]", protocol.regex, :size => 30 %></td>
|
|
| 11 |
<td class="protocol_regex_replacement"><%= text_field_tag "settings[checkout_protocols_#{scm}][#{index}][regex_replacement]", protocol.regex_replacement, :size => 30 %></td>
|
|
| 12 |
<td class="protocol_access" ><%= select_tag "settings[checkout_protocols_#{scm}][#{index}][access]", options_for_select([
|
|
| 13 |
[l(:label_access_read_write), 'read+write'], |
|
| 14 |
[l(:label_access_read_only), 'read-only'], |
|
| 15 |
[l(:label_access_permission), 'permission']], protocol.access) %></td> |
|
| 16 |
<td class="protocol_append_path"><%= check_box_tag "settings[checkout_protocols_#{scm}][#{index}][append_path]", 1, protocol.append_path? %></td>
|
|
| 17 |
<td class="protocol_is_default"><%= check_box_tag "settings[checkout_protocols_#{scm}][#{index}][is_default]", 1, protocol.default? %></td>
|
|
| 18 |
<td class="protocol_delete"><%= image_to_function 'delete.png', "var e=$('checkout_protocols_#{scm}_#{index}');var parent=e.up(\"tbody\");e.remove();recalculate_even_odd(parent);return false" %></td>
|
|
| 19 |
</tr> |
|
| vendor/plugins/redmine_checkout/app/views/settings/_checkout_scm.erb | ||
|---|---|---|
| 1 |
<div> |
|
| 2 |
<p><%= setting_check_box "checkout_overwrite_description_#{scm}", :label => :setting_checkout_overwrite_description, :onclick => <<-EOF
|
|
| 3 |
Effect.toggle($('settings_checkout_description_#{scm}').up("div").up("div"), 'slide', {duration:0.2});
|
|
| 4 |
EOF |
|
| 5 |
%></p> |
|
| 6 |
|
|
| 7 |
<div> |
|
| 8 |
<p><%= setting_text_area "checkout_description_#{scm}", :cols => 60, :rows => 5, :class => 'wiki-edit', :label => :field_description %></p>
|
|
| 9 |
<%= wikitoolbar_for "settings_checkout_description_#{scm}" %>
|
|
| 10 |
</div> |
|
| 11 |
|
|
| 12 |
<% if scm == 'Subversion' %> |
|
| 13 |
<p><%= setting_select "checkout_display_login",[ |
|
| 14 |
[l(:label_display_login_username), 'username'], |
|
| 15 |
[l(:label_display_login_password), 'password'] |
|
| 16 |
], |
|
| 17 |
:blank => :label_display_login_none %></p> |
|
| 18 |
<% end %> |
|
| 19 |
|
|
| 20 |
<p><%= setting_check_box "checkout_display_command_#{scm}", :label => :field_checkout_display_command %></p>
|
|
| 21 |
|
|
| 22 |
<% javascript_tag do %> |
|
| 23 |
<% repo = "Repository::#{scm}".constantize %>
|
|
| 24 |
var subform = new Subform('<%= escape_javascript(render(:partial => "checkout_protocol", :locals => {:protocol => Checkout::Protocol.new({:protocol => repo.scm_name, :append_path => (repo.allow_subtree_checkout? ? '1' : '0'), :command => repo.checkout_default_command}), :scm => scm})) %>',<%= Setting.send("checkout_protocols_#{scm}").length %>,'settings_checkout_protocols_<%= scm %>');
|
|
| 25 |
protocolForms.set('<%= scm %>', subform);
|
|
| 26 |
<% end %> |
|
| 27 |
<p><label><%=l :label_protocol_plural %></label><%=l :help_checkout_protocols %></p> |
|
| 28 |
<table class="list checkout_protocol_table"> |
|
| 29 |
<thead><tr> |
|
| 30 |
<th class="protocol_protocol" ><%= l(:setting_protocol)%></th> |
|
| 31 |
<th class="protocol_command" ><%= l(:setting_checkout_command)%></th> |
|
| 32 |
<th class="protocol_regex" ><%= l(:setting_checkout_url_regex) %></th> |
|
| 33 |
<th class="protocol_regex_replacement"><%= l(:setting_checkout_url_regex_replacement) %></th> |
|
| 34 |
<th class="protocol_access" ><%= l(:label_permissions) %></th> |
|
| 35 |
<th class="protocol_append_path" ><%= l(:label_append_path) %></th> |
|
| 36 |
<th class="protocol_is_default" ><%= l(:label_default) %></th> |
|
| 37 |
<th class="protocol_delete" ></th> |
|
| 38 |
</tr></thead> |
|
| 39 |
<tbody id="settings_checkout_protocols_<%= scm %>"> |
|
| 40 |
<% Setting.send("checkout_protocols_#{scm}").each_with_index do |protocol, index| %>
|
|
| 41 |
<%= render :partial => 'checkout_protocol', :locals => {:protocol => Checkout::Protocol.new(protocol), :scm => scm, :index => index, :classes => cycle('odd', 'even')} %>
|
|
| 42 |
<% end %> |
|
| 43 |
</tbody> |
|
| 44 |
</table> |
|
| 45 |
<div style="text-align: right"><%= link_to_function l(:button_add_protocol), "protocolForms.get('#{scm}').add()", {:class => "icon icon-add"} %></div>
|
|
| 46 |
</div> |
|
| vendor/plugins/redmine_checkout/app/views/settings/_checkout_scm.html.erb | ||
|---|---|---|
| 1 |
<div> |
|
| 2 |
<p><%= setting_check_box "checkout_overwrite_description_#{scm}", :label => :setting_checkout_overwrite_description, :onclick => <<-EOF
|
|
| 3 |
Effect.toggle($('settings_checkout_description_#{scm}').up("div").up("div"), 'slide', {duration:0.2});
|
|
| 4 |
EOF |
|
| 5 |
%></p> |
|
| 6 |
|
|
| 7 |
<div> |
|
| 8 |
<p><%= setting_text_area "checkout_description_#{scm}", :cols => 60, :rows => 5, :class => 'wiki-edit', :label => :field_description %></p>
|
|
| 9 |
<%= wikitoolbar_for "settings_checkout_description_#{scm}" %>
|
|
| 10 |
</div> |
|
| 11 |
|
|
| 12 |
<% if scm == 'Subversion' %> |
|
| 13 |
<p><%= setting_select "checkout_display_login",[ |
|
| 14 |
[l(:label_display_login_username), 'username'], |
|
| 15 |
[l(:label_display_login_password), 'password'] |
|
| 16 |
], |
|
| 17 |
:blank => :label_display_login_none %></p> |
|
| 18 |
<% end %> |
|
| 19 |
|
|
| 20 |
<p><%= setting_check_box "checkout_display_command_#{scm}", :label => :field_checkout_display_command %></p>
|
|
| 21 |
|
|
| 22 |
<% javascript_tag do %> |
|
| 23 |
<% repo = "Repository::#{scm}".constantize %>
|
|
| 24 |
var subform = new Subform('<%= escape_javascript(render(:partial => "checkout_protocol", :locals => {:protocol => Checkout::Protocol.new({:protocol => repo.scm_name, :append_path => (repo.allow_subtree_checkout? ? '1' : '0'), :command => repo.checkout_default_command}), :scm => scm})) %>',<%= Setting.send("checkout_protocols_#{scm}").length %>,'settings_checkout_protocols_<%= scm %>');
|
|
| 25 |
protocolForms.set('<%= scm %>', subform);
|
|
| 26 |
<% end %> |
|
| 27 |
<p><label><%=l :label_protocol_plural %></label><%=l :help_checkout_protocols %></p> |
|
| 28 |
<table class="list checkout_protocol_table"> |
|
| 29 |
<thead><tr> |
|
| 30 |
<th class="protocol_protocol" ><%= l(:setting_protocol)%></th> |
|
| 31 |
<th class="protocol_command" ><%= l(:setting_checkout_command)%></th> |
|
| 32 |
<th class="protocol_regex" ><%= l(:setting_checkout_url_regex) %></th> |
|
| 33 |
<th class="protocol_regex_replacement"><%= l(:setting_checkout_url_regex_replacement) %></th> |
|
| 34 |
<th class="protocol_access" ><%= l(:label_permissions) %></th> |
|
| 35 |
<th class="protocol_append_path" ><%= l(:label_append_path) %></th> |
|
| 36 |
<th class="protocol_is_default" ><%= l(:label_default) %></th> |
|
| 37 |
<th class="protocol_delete" ></th> |
|
| 38 |
</tr></thead> |
|
| 39 |
<tbody id="settings_checkout_protocols_<%= scm %>"> |
|
| 40 |
<% Setting.send("checkout_protocols_#{scm}").each_with_index do |protocol, index| %>
|
|
| 41 |
<%= render :partial => 'checkout_protocol', :locals => {:protocol => Checkout::Protocol.new(protocol), :scm => scm, :index => index, :classes => cycle('odd', 'even')} %>
|
|
| 42 |
<% end %> |
|
| 43 |
</tbody> |
|
| 44 |
</table> |
|
| 45 |
<div style="text-align: right"><%= link_to_function l(:button_add_protocol), "protocolForms.get('#{scm}').add()", {:class => "icon icon-add"} %></div>
|
|
| 46 |
</div> |
|
| vendor/plugins/redmine_checkout/app/views/settings/_redmine_checkout.erb | ||
|---|---|---|
| 1 |
<%=l(:help_moved_settings, :link => link_to(l(:label_settings_location), {:controller => 'settings', :action => 'index', :tab => 'checkout'})) %>
|
|
| vendor/plugins/redmine_checkout/app/views/settings/_redmine_checkout.html.erb | ||
|---|---|---|
| 1 |
<%=l(:help_moved_settings, :link => link_to(l(:label_settings_location), {:controller => 'settings', :action => 'index', :tab => 'checkout'})) %>
|
|
Also available in: Unified diff