Atom feeds for events
[gitorious:yousource.git] / app / views / repositories / index.html.erb
1 <% @page_title = "Repositories in #{@project.title}" -%>
2 <h1>Repositories</h1>
3
4 <% @repositories.each do |repo| -%>
5   <table class="repository_meta">
6     <tr class="name">
7       <td colspan="3" class="<%= repo.mainline? ? "mainline" : "clone" -%>">
8         <h2><%= link_to h(repo.name), [@project, repo] -%></h2>
9         <%= link_to "Commits", project_repository_logs_path(@project, repo) -%> | 
10         <%= link_to "Tree", project_repository_trees_path(@project, repo) -%>
11       </td>
12     </tr>
13     <tr class="meta">
14       <td class="commit_count">
15         <span class="bignum"><%= repo.events.count -%></span> activities
16       </td>
17       <td class="branch_count">
18         <span class="bignum"><%= repo.ready? ? repo.git.heads.size : 0 -%></span> branches
19       </td>
20       <td class="author_count">
21         <span class="bignum">
22           <%= repo.ready? ? repo.commit_graph_data_by_author.keys.size : 0 -%>
23         </span> authors
24       </td>
25     </tr>
26     <tr class="graph">
27       <td colspan="3"><%= commit_graph_tag(repo) %></td>
28     </tr>
29     <% # TODO: Clone stats -%>
30     <% # TODO: divergence from mainline in +/- -%>
31   </table>
32 <% end -%>
33
34 <% content_for :sidebar do -%>
35   <h4>Repositories</h4>
36   <ul class="repository_list">
37     <% @repositories.each do |repos|-%>
38       <li class="<%= repos.mainline? ? "mainline" : "clone" -%>">
39         <div class="name">
40           <%= link_to h(repos.name), [@project, repos] -%>
41         </div>
42         <div class="user">
43           <%= gravatar(repos.user.email, :size => 16, :style => "tiny") %>
44           <%= link_to h(repos.user.login), repos.user -%>
45         </div>
46       </li>
47     <% end -%>
48     </li>
49   </ul>
50 <% end -%>