| |   |
| 2 | 2 | before_filter :login_required, :only => [:dashboard] |
| 3 | 3 | |
| 4 | 4 | def index |
| 5 | | @tags = Project.tag_counts |
| 6 | | @projects = Project.find(:all, :limit => 5, :order => "id desc") |
| 5 | @projects = Project.find(:all, :limit => 10, :order => "id desc") |
| 7 | 6 | end |
| 8 | 7 | |
| 9 | 8 | def dashboard |
| toggle raw diff |
--- a/app/controllers/site_controller.rb
+++ b/app/controllers/site_controller.rb
@@ -2,8 +2,7 @@ class SiteController < ApplicationController
before_filter :login_required, :only => [:dashboard]
def index
- @tags = Project.tag_counts
- @projects = Project.find(:all, :limit => 5, :order => "id desc")
+ @projects = Project.find(:all, :limit => 10, :order => "id desc")
end
def dashboard |
| |   |
| 1 | 1 | <% @page_title = "Free open source project hosting" -%> |
| 2 | 2 | <div id="site_intro"> |
| 3 | | <p><strong>Gitorious</strong> aims to provide a great |
| 3 | <p> |
| 4 | <strong>Gitorious</strong> aims to provide a great |
| 4 | 5 | way of doing distributed opensource code collaboration |
| 5 | | <small><%= link_to "more…", about_path -%></small></p> |
| 6 | </p> |
| 6 | 7 | </div> |
| 7 | 8 | |
| 8 | 9 | <div id="site_overview"> |
| … | … | |
| 26 | 26 | </li> |
| 27 | 27 | <% end -%> |
| 28 | 28 | </ul> |
| 29 | | </div> |
| 30 | | |
| 31 | | <div id="site_project_list"> |
| 32 | | <h2>Project categories</h2> |
| 33 | | |
| 34 | | <ul class="tag_list large_tags"> |
| 35 | | <% tag_cloud @tags, default_css_tag_sizes do |tag, css_class| %> |
| 36 | | <li><%= link_to h(tag.name), projects_category_path(tag.name), :class => css_class %></li> |
| 37 | | <% end %> |
| 38 | | </ul> |
| 29 | <p><%= link_to "View more »", projects_path -%></p> |
| 39 | 30 | </div> |
| toggle raw diff |
--- a/app/views/site/index.html.erb
+++ b/app/views/site/index.html.erb
@@ -1,8 +1,9 @@
<% @page_title = "Free open source project hosting" -%>
<div id="site_intro">
-<p><strong>Gitorious</strong> aims to provide a great
+<p>
+ <strong>Gitorious</strong> aims to provide a great
way of doing distributed opensource code collaboration
- <small><%= link_to "more…", about_path -%></small></p>
+</p>
</div>
<div id="site_overview">
@@ -25,14 +26,5 @@
</li>
<% end -%>
</ul>
-</div>
-
-<div id="site_project_list">
- <h2>Project categories</h2>
-
- <ul class="tag_list large_tags">
- <% tag_cloud @tags, default_css_tag_sizes do |tag, css_class| %>
- <li><%= link_to h(tag.name), projects_category_path(tag.name), :class => css_class %></li>
- <% end %>
- </ul>
+ <p><%= link_to "View more »", projects_path -%></p>
</div> |
| |   |
| 8 | 8 | response.should be_success |
| 9 | 9 | end |
| 10 | 10 | |
| 11 | | it "gets the tag list" do |
| 12 | | get :index |
| 13 | | assigns[:tags].should == Project.tag_counts |
| 14 | | end |
| 15 | | |
| 16 | 11 | it "gets a list of the most recent projects" do |
| 17 | 12 | get :index |
| 18 | 13 | assigns[:projects].should == Project.find(:all, :limit => 5, :order => "id desc") |
| toggle raw diff |
--- a/spec/controllers/site_controller_spec.rb
+++ b/spec/controllers/site_controller_spec.rb
@@ -8,11 +8,6 @@ describe SiteController do
response.should be_success
end
- it "gets the tag list" do
- get :index
- assigns[:tags].should == Project.tag_counts
- end
-
it "gets a list of the most recent projects" do
get :index
assigns[:projects].should == Project.find(:all, :limit => 5, :order => "id desc") |