| 1 |
<% @page_title = "#{@repository.name} in #{@project.title}" -%> |
| 2 |
<h1> |
| 3 |
"<%= h(@repository.name) -%>" repository in <%= h(@repository.project.title) -%> |
| 4 |
</h1> |
| 5 |
|
| 6 |
<% render_if_ready(@repository) do -%> |
| 7 |
|
| 8 |
<%= render :partial => "infobox" -%> |
| 9 |
|
| 10 |
<%#= render_readme(@repository) %> |
| 11 |
|
| 12 |
<h2>Activities <%= feed_icon @atom_auto_discovery_url %></h2> |
| 13 |
<%= render :partial => "events/events", :locals => { :events => @events } -%> |
| 14 |
<% end -%> |
| 15 |
|
| 16 |
<% content_for :submenu do -%> |
| 17 |
<%= render :partial => "context_menu" -%> |
| 18 |
<% end -%> |
| 19 |
|
| 20 |
<% content_for :sidebar do -%> |
| 21 |
<ul> |
| 22 |
<li><strong>Project:</strong> <%= link_to h(@repository.project.title), @repository.project -%></li> |
| 23 |
<li><strong>Maintainer:</strong> <%= link_to h(@repository.user.login), user_path(@repository.user) -%></li> |
| 24 |
<% if @repository.parent -%> |
| 25 |
<li><strong>Clone of:</strong> |
| 26 |
<%= link_to h(@repository.parent.gitdir), project_repository_path(@project, @repository.parent) -%> |
| 27 |
<% end -%> |
| 28 |
<li><strong>Created:</strong> <%= @repository.created_at.to_s(:short) -%></li> |
| 29 |
</li> |
| 30 |
|
| 31 |
<ul class="links"> |
| 32 |
<% if @repository.ready? -%> |
| 33 |
<li><%= link_to "Clone repository", new_project_repository_path(@project, @repository) -%></li> |
| 34 |
<% end -%> |
| 35 |
<% if @repository.user == current_user -%> |
| 36 |
<li><%= link_to "Request merge", new_project_repository_merge_request_path(@project, @repository) -%></li> |
| 37 |
<li><%= link_to "Add committer", |
| 38 |
{ :controller => "committers", :action => "new", :project_id => @project, |
| 39 |
:repository_id => @repository } -%></li> |
| 40 |
<% end -%> |
| 41 |
<% if @repository.can_be_deleted_by?(current_user) -%> |
| 42 |
<li><%= link_to "Delete repository", confirm_delete_project_repository_path(@project, @repository) -%></li> |
| 43 |
<% end -%> |
| 44 |
</ul> |
| 45 |
|
| 46 |
<h4>Committers</h4> |
| 47 |
<ul> |
| 48 |
<% @repository.committers.each do |user| -%> |
| 49 |
<li> |
| 50 |
<%= link_to h(user.login), user -%> |
| 51 |
<% if @repository.user == user -%> |
| 52 |
<small>(owner)</small> |
| 53 |
<% end -%> |
| 54 |
<% if @repository.user == current_user -%> |
| 55 |
<small> |
| 56 |
<%= link_to "Remove", |
| 57 |
{ :controller => "committers", :action => "destroy", :id => user.id, |
| 58 |
:project_id => @project, :repository_id => @repository}, # FIXME: meh! |
| 59 |
:confirm => "Are you sure?", :method => :delete unless user == current_user -%> |
| 60 |
</small> |
| 61 |
<% end -%> |
| 62 |
</li> |
| 63 |
<% end -%> |
| 64 |
</ul> |
| 65 |
|
| 66 |
<% unless @commits.blank? -%> |
| 67 |
<h4>Branches:</h4> |
| 68 |
<ul> |
| 69 |
<% @repository.git.branches.each do |branch| -%> |
| 70 |
<% if namespaced_branch?(branch.name) -%> |
| 71 |
<li><%= link_to h(branch.name), project_repository_log_path(@project, @repository, branch.commit.id) -%></li> |
| 72 |
<% else -%> |
| 73 |
<li><%= link_to h(branch.name), project_repository_log_path(@project, @repository, branch.name) -%></li> |
| 74 |
<% end -%> |
| 75 |
<% end -%> |
| 76 |
</ul> |
| 77 |
<% end -%> |
| 78 |
<% end -%> |