Revision 918:04114f36670d vendor/plugins/redmine_checkout/app/views/redmine_checkout_hooks
| 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 %> |
|
Also available in: Unified diff