summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/welcome_controller.rb1
-rw-r--r--app/views/welcome/index.html.erb27
-rw-r--r--test/functional/welcome_controller_test.rb1
3 files changed, 5 insertions, 24 deletions
diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
index fb478b827..5afbe41ac 100644
--- a/app/controllers/welcome_controller.rb
+++ b/app/controllers/welcome_controller.rb
@@ -20,7 +20,6 @@ class WelcomeController < ApplicationController
def index
@news = News.latest User.current
- @projects = Project.latest User.current
end
def robots
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index dab9bff38..ba0924a7c 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -4,6 +4,10 @@
<div class="wiki">
<%= textilizable Setting.welcome_text %>
</div>
+ <%= call_hook(:view_welcome_index_left) %>
+</div>
+
+<div class="splitcontentright">
<% if @news.any? %>
<div class="news box">
<h3><%=l(:label_news_latest)%></h3>
@@ -11,28 +15,7 @@
<%= link_to l(:label_news_view_all), :controller => 'news' %>
</div>
<% end %>
- <%= call_hook(:view_welcome_index_left, :projects => @projects) %>
-</div>
-
-<div class="splitcontentright">
- <% if @projects.any? %>
- <div class="projects box">
- <h3><%=l(:label_project_latest)%></h3>
- <ul>
- <% for project in @projects %>
- <% @project = project %>
- <li>
- <%= link_to_project project %> (<%= format_time(project.created_on) %>)
- <div class="wiki">
- <%= textilizable project.short_description, :project => project %>
- </div>
- </li>
- <% end %>
- <% @project = nil %>
- </ul>
- </div>
- <% end %>
- <%= call_hook(:view_welcome_index_right, :projects => @projects) %>
+ <%= call_hook(:view_welcome_index_right) %>
</div>
<% content_for :header_tags do %>
diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb
index 73434dfbb..2a8064fea 100644
--- a/test/functional/welcome_controller_test.rb
+++ b/test/functional/welcome_controller_test.rb
@@ -30,7 +30,6 @@ class WelcomeControllerTest < ActionController::TestCase
assert_response :success
assert_template 'index'
assert_not_nil assigns(:news)
- assert_not_nil assigns(:projects)
assert !assigns(:projects).include?(Project.where(:is_public => false).first)
end