| |   |
| 6 | 6 | <%= link_to h(@repository.parent.gitdir), project_repository_path(@project, @repository.parent) -%> |
| 7 | 7 | <% end -%> |
| 8 | 8 | <li><strong>Created:</strong> <%= @repository.created_at.to_s(:short) -%></li> |
| 9 | | <li><strong>Mirror url:</strong> <code><%=h @repository.clone_url -%></code></li> |
| 9 | <li> |
| 10 | <strong>Clone url:</strong> <code><%=h @repository.clone_url -%></code> |
| 11 | <small><%= link_to_function "More info…", "$('detailed_clone_info').toggle()" -%></small> |
| 12 | <div id="detailed_clone_info" class="info_hint" style="display:none"> |
| 13 | You can clone this repository with the following command: |
| 14 | <% if logged_in? && current_user.can_write_to?(@repository) -%> |
| 15 | <code>git clone <%= @repository.push_url -%></code> |
| 16 | <% else -%> |
| 17 | <code>git clone <%= @repository.clone_url -%></code> |
| 18 | <% end -%> |
| 19 | </div> |
| 20 | </li> |
| 10 | 21 | <% if logged_in? && current_user.can_write_to?(@repository) -%> |
| 11 | | <li><strong>push url:</strong> <code><%=h @repository.push_url -%></code></li> |
| 22 | <li> |
| 23 | <strong>Push url:</strong> <code><%=h @repository.push_url -%></code> |
| 24 | <small><%= link_to_function "More info…", "$('detailed_push_info').toggle()" -%></small> |
| 25 | <div id="detailed_push_info" class="info_hint" style="display:none"> |
| 26 | You can run "<code>git push git@gitorious.org:tumbline/mainline.git</code>", or |
| 27 | you can setup a remote by doing the following: |
| 28 | <pre> |
| 29 | git remote add origin <%= @repository.push_url %> |
| 30 | # to push the master branch to the origin remote we added above: |
| 31 | git push origin master |
| 32 | # after that you can just do: |
| 33 | git push |
| 34 | </pre> |
| 35 | </div> |
| 36 | </li> |
| 12 | 37 | <% end -%> |
| 13 | 38 | </ul> |
| toggle raw diff |
--- a/app/views/repositories/_infobox.html.erb
+++ b/app/views/repositories/_infobox.html.erb
@@ -6,8 +6,33 @@
<%= link_to h(@repository.parent.gitdir), project_repository_path(@project, @repository.parent) -%>
<% end -%>
<li><strong>Created:</strong> <%= @repository.created_at.to_s(:short) -%></li>
- <li><strong>Mirror url:</strong> <code><%=h @repository.clone_url -%></code></li>
+ <li>
+ <strong>Clone url:</strong> <code><%=h @repository.clone_url -%></code>
+ <small><%= link_to_function "More info…", "$('detailed_clone_info').toggle()" -%></small>
+ <div id="detailed_clone_info" class="info_hint" style="display:none">
+ You can clone this repository with the following command:
+ <% if logged_in? && current_user.can_write_to?(@repository) -%>
+ <code>git clone <%= @repository.push_url -%></code>
+ <% else -%>
+ <code>git clone <%= @repository.clone_url -%></code>
+ <% end -%>
+ </div>
+ </li>
<% if logged_in? && current_user.can_write_to?(@repository) -%>
- <li><strong>push url:</strong> <code><%=h @repository.push_url -%></code></li>
+ <li>
+ <strong>Push url:</strong> <code><%=h @repository.push_url -%></code>
+ <small><%= link_to_function "More info…", "$('detailed_push_info').toggle()" -%></small>
+ <div id="detailed_push_info" class="info_hint" style="display:none">
+You can run "<code>git push git@gitorious.org:tumbline/mainline.git</code>", or
+you can setup a remote by doing the following:
+<pre>
+git remote add origin <%= @repository.push_url %>
+# to push the master branch to the origin remote we added above:
+git push origin master
+# after that you can just do:
+git push
+</pre>
+ </div>
+ </li>
<% end -%>
</ul>
\ No newline at end of file |
| |   |
| 7 | 7 | <% render_if_ready(@repository) do -%> |
| 8 | 8 | |
| 9 | 9 | <%= render :partial => "infobox" -%> |
| 10 | | |
| 11 | | <p>You can clone this repository with the following command:</p> |
| 12 | | <% if logged_in? && current_user.can_write_to?(@repository) -%> |
| 13 | | <pre>git clone <%= @repository.push_url -%></pre> |
| 14 | | <% else -%> |
| 15 | | <pre>git clone <%= @repository.clone_url -%></pre> |
| 16 | | <% end -%> |
| 17 | 10 | |
| 18 | 11 | <ul class="tab_menu"> |
| 19 | 12 | <li class="selected">Recent commits</li> |
| toggle raw diff |
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -7,13 +7,6 @@
<% render_if_ready(@repository) do -%>
<%= render :partial => "infobox" -%>
-
- <p>You can clone this repository with the following command:</p>
- <% if logged_in? && current_user.can_write_to?(@repository) -%>
- <pre>git clone <%= @repository.push_url -%></pre>
- <% else -%>
- <pre>git clone <%= @repository.clone_url -%></pre>
- <% end -%>
<ul class="tab_menu">
<li class="selected">Recent commits</li> |