To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / vendor / plugins / redmine_checkout / app / views / redmine_checkout_hooks / _view_repositories_show_contextual.rhtml @ 443:350acce374a2

History | View | Annotate | Download (2.48 KB)

1 16:020926a36823 Chris
<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 319:614862ec2481 chris
21
    <p>
22
    <% if User.current.logged? %>
23 337:d67a7d67b159 chris
      <% if repository.is_external? %>
24
      <%=l :label_access_type_all, :type => l(:label_access_read_only) %>
25
      <% else %>
26 319:614862ec2481 chris
      <% if default_protocol %><%=l :label_access_type, :type => l(default_protocol.access_label(User.current)) %><% end %>
27 337:d67a7d67b159 chris
      <% end %>
28 320:5835a1beeb11 chris
    <% else %>
29
      &nbsp;
30 319:614862ec2481 chris
    <% end %>
31
    </p>
32
33 16:020926a36823 Chris
    <% 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 302:6508e99869a2 chris
  <% if repository.is_external? %>
41 319:614862ec2481 chris
    <div style="clear: left">
42
    </div>
43
    <p class="topline" style="padding-top: 1em"><%= l(:text_repository_external, :location => repository.external_url) %></p>
44 302:6508e99869a2 chris
  <% end %>
45 16:020926a36823 Chris
</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 302:6508e99869a2 chris
<% end %>