Commit 5810dfa72254da8828ddcd68ccc68dc22540aa83

simplify frontpage

Commit diff

app/controllers/site_controller.rb

 
22 before_filter :login_required, :only => [:dashboard]
33
44 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")
76 end
87
98 def dashboard
toggle raw diff

app/views/site/index.html.erb

 
11<% @page_title = "Free open source project hosting" -%>
22<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
45 way of doing distributed opensource code collaboration
5 <small><%= link_to "more…", about_path -%></small></p>
6</p>
67</div>
78
89<div id="site_overview">
2626 </li>
2727 <% end -%>
2828 </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 &raquo;", projects_path -%></p>
3930</div>
toggle raw diff

spec/controllers/site_controller_spec.rb

 
88 response.should be_success
99 end
1010
11 it "gets the tag list" do
12 get :index
13 assigns[:tags].should == Project.tag_counts
14 end
15
1611 it "gets a list of the most recent projects" do
1712 get :index
1813 assigns[:projects].should == Project.find(:all, :limit => 5, :order => "id desc")
toggle raw diff