<% content_for(:sidebar) do %>
  <h3><%= l(:label_repository_url) %></h3>

  <% if repository.created_with_scm && (interface = ScmCreator.interface(repository)) %>
    <% repository_url = interface.external_url(repository) || repository.url %>
  <% else %>
    <% repository_url = repository.url %>
  <% end %>
  <%= text_field_tag('repository_url', repository_url, :size => 50, :readonly => true) %>

  <%= javascript_tag("$(function() { $('#repository_url').on('click', function() { $(this).select(); }); });") %>
<% end %>
