Commit d13a50fdef3a371a2382dd89c8471aaa280fec27

Project stats on frontpage

Signed-off-by: David A. Cuadrado <krawek@gmail.com>
TODO.txt
(0 / 2)
  
88* mandatory project descriptions, at least a sentence or two
99* tweak fonts-sizes and line-heights
1010* Clone stats graph on repositories#index
11* popular & active projects on frontpage
1211* make the top-header smaller (move gitorious logo to footer?)
1312
1413(in no particular order)
3939*a Tone down the "owner" of a repository, or implement a proper "mirror" project type.
4040*b be able to mark a project as a "mirror"
4141* Nicer diff stats
42* more interesting project stats on frontpage
4342* parse git submodule data and link to project if submodule is in gitorious
4443* add mainline as a remote branch in clones
4544* timezone support
  
2727 <% end -%>
2828</div>
2929
30<div id="newest_projects">
31 <h2>Newest projects</h2>
32 <ul>
33 <% @projects.each do |project| -%>
34 <li>
35 <strong><%= link_to h(project.title), project -%></strong>
36 <small class="hint"><%= truncate(h(project.stripped_description), 100) -%></small>
37 </li>
38 <% end -%>
39 </ul>
40 <p><%= link_to "View more &raquo;", projects_path -%></p>
41</div>
30<table class="repository_meta">
31 <tr>
32 <th><h2>Newest projects</h2></th>
33 <th><h2>Most active project</h2></th>
34 <th><h2>Most downloaded project</h2></th>
35 <th><h2>Most forked project</h2></th>
36 </tr>
37 <tr>
38 <td>
39 <div id="newest_projects">
40 <ul>
41 <% @projects.each do |project| -%>
42 <li>
43 <strong><%= link_to h(project.title), project -%></strong>
44 <small class="hint"><%= truncate(h(project.stripped_description), 100) -%></small>
45 </li>
46 <% end -%>
47 </ul>
48 </div>
49 </td>
50 <td>
51 <div id="newest_projects">
52 <ul>
53 <% ProjectStats.most_active_project.each do |stat| -%>
54 <li>
55 <strong><%= link_to h(stat.project.title), stat.project -%></strong>
56 <small class="hint"><%= truncate(h(stat.project.stripped_description), 100) -%></small>
57 </li>
58 <% end -%>
59 </ul>
60 </div>
61 </td>
62 <td>
63 <div id="newest_projects">
64 <ul>
65 <% ProjectStats.most_downloaded_project.each do |stat| -%>
66 <li>
67 <strong><%= link_to h(stat.project.title), stat.project -%></strong>
68 <small class="hint"><%= truncate(h(stat.project.stripped_description), 100) -%></small>
69 </li>
70 <% end -%>
71 </ul>
72 </div>
73 </td>
74 <td>
75 <div id="newest_projects">
76 <ul>
77 <% ProjectStats.most_forked_project.each do |stat| -%>
78 <li>
79 <strong><%= link_to h(stat.project.title), stat.project -%></strong>
80 <small class="hint"><%= truncate(h(stat.project.stripped_description), 100) -%></small>
81 </li>
82 <% end -%>
83 </ul>
84 </div>
85 </td>
86 </tr>
87</table>