| 1 |
<% @page_title = "#{@repository.name} in #{@project.title}" -%> |
| 2 |
<h1> |
| 3 |
"<%= h(@repository.name) -%>" repository in |
| 4 |
<%= link_to h(@repository.project.title), @repository.project -%> |
| 5 |
</h1> |
| 6 |
|
| 7 |
<% render_if_ready(@repository) do -%> |
| 8 |
|
| 9 |
<%= render :partial => "infobox" -%> |
| 10 |
|
| 11 |
<ul class="tab_menu"> |
| 12 |
<li class="selected">Recent commits</li> |
| 13 |
<li><%= link_to "comments (#{@comment_count})", project_repository_comments_path(@project, @repository) -%></li> |
| 14 |
</ul> |
| 15 |
|
| 16 |
<h2> |
| 17 |
Recent commits |
| 18 |
<small> |
| 19 |
(<%= link_to "Shortlog", project_repository_browse_path(@project, @repository) -%> | |
| 20 |
<%= link_to "HEAD tree", project_repository_tree_path(@project, @repository, "HEAD", []) -%>) |
| 21 |
</small> |
| 22 |
</h2> |
| 23 |
<ul> |
| 24 |
<% if @commits.blank? -%> |
| 25 |
<li><em>No commits yet…</em></li> |
| 26 |
<% end -%> |
| 27 |
<% @commits.each do |commit| -%> |
| 28 |
<li class="commit_item"> |
| 29 |
<a href=""><%= link_to truncate(h(commit.sha), 16), |
| 30 |
project_repository_commit_path(@project, @repository, commit.sha) -%></a> |
| 31 |
by <strong><%=h commit.author.name -%></strong> <%=h time_ago_in_words(commit.author.date) -%> ago<br /> |
| 32 |
<pre class="commit_message"><%= word_wrap(h(commit.message)) -%></pre> |
| 33 |
</li> |
| 34 |
<% end -%> |
| 35 |
</ul> |
| 36 |
|
| 37 |
<% end -%> |
| 38 |
|
| 39 |
<%= render :partial => "submenu" -%> |
| 40 |
|
| 41 |
<% content_for :sidebar do -%> |
| 42 |
<div class="user_list"> |
| 43 |
<h4>Committers</h4> |
| 44 |
<ul> |
| 45 |
<% @repository.committers.each do |user| -%> |
| 46 |
<li> |
| 47 |
<%= link_to h(user.login), user -%> |
| 48 |
<% if @repository.user == user -%> |
| 49 |
<small>(owner)</small> |
| 50 |
<% end -%> |
| 51 |
<% if @repository.user == current_user -%> |
| 52 |
<small> |
| 53 |
<%= link_to "Remove", |
| 54 |
{ :controller => "committers", :action => "destroy", :id => user.id, |
| 55 |
:project_id => @project, :repository_id => @repository}, # FIXME: meh! |
| 56 |
:confirm => "Are you sure?", :method => :delete unless user == current_user -%> |
| 57 |
</small> |
| 58 |
<% end -%> |
| 59 |
</li> |
| 60 |
<% end -%> |
| 61 |
</ul> |
| 62 |
</div> |
| 63 |
<% end -%> |