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 / plugins / redmine_checkout / app / views / redmine_checkout_hooks / _view_repositories_show_contextual.html.erb @ 1310:c0eedaadb1f2

History | View | Annotate | Download (1.97 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 319:614862ec2481 chris
16
    <p>
17
    <% if User.current.logged? %>
18 337:d67a7d67b159 chris
      <% if repository.is_external? %>
19 1310:c0eedaadb1f2 chris
      <%= (l :label_access_type_all, :type => l(:label_access_read_only)).html_safe %>
20 337:d67a7d67b159 chris
      <% else %>
21 1310:c0eedaadb1f2 chris
      <% if default_protocol %><%= (l :label_access_type, :type => l(default_protocol.access_label(User.current))).html_safe %><% end %>
22 337:d67a7d67b159 chris
      <% end %>
23 320:5835a1beeb11 chris
    <% else %>
24
      &nbsp;
25 319:614862ec2481 chris
    <% end %>
26
    </p>
27
28 16:020926a36823 Chris
    <% javascript_tag do %>
29
      var checkout_access   = $H({<%= protocols.inject([]){|r,p| r << "'checkout_protocol_#{p.protocol.to_s.underscore}': '#{l(p.access_label(User.current))}'"}.join(', ') %>});
30
      var checkout_commands = $H({<%= protocols.inject([]){|r,p| r << "'checkout_protocol_#{p.protocol.to_s.underscore}': '#{escape_javascript(p.full_command(checkout_path))}'"}.join(', ') %>});
31
    <% end %>
32 1137:66b9ab6cf9d7 chris
33 16:020926a36823 Chris
  </div>
34
  <% end%>
35 302:6508e99869a2 chris
  <% if repository.is_external? %>
36 319:614862ec2481 chris
    <div style="clear: left">
37
    </div>
38 1310:c0eedaadb1f2 chris
    <p class="topline" style="padding-top: 1em"><%= (l(:text_repository_external, :location => repository.external_url)).html_safe %></p>
39 302:6508e99869a2 chris
  <% end %>
40 16:020926a36823 Chris
</div>
41
<div style="clear: left"></div>
42
43
<% content_for :header_tags do %>
44
  <%= stylesheet_link_tag 'checkout', :plugin => 'redmine_checkout' %>
45
  <%= javascript_include_tag 'checkout', :plugin => 'redmine_checkout' %>
46 302:6508e99869a2 chris
<% end %>