From: Jean-Philippe Lang Date: Sat, 14 Nov 2015 10:11:15 +0000 (+0000) Subject: Removed "Latest projects" from home page (#21148). X-Git-Tag: 3.2.0~31 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=47b162488c80e8e5bc3cda8bb7842148d1dd5aae;p=redmine.git Removed "Latest projects" from home page (#21148). git-svn-id: http://svn.redmine.org/redmine/trunk@14877 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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 @@
<%= textilizable Setting.welcome_text %>
+ <%= call_hook(:view_welcome_index_left) %> + + +
<% if @news.any? %>

<%=l(:label_news_latest)%>

@@ -11,28 +15,7 @@ <%= link_to l(:label_news_view_all), :controller => 'news' %>
<% end %> - <%= call_hook(:view_welcome_index_left, :projects => @projects) %> -
- -
- <% if @projects.any? %> -
-

<%=l(:label_project_latest)%>

-
    - <% for project in @projects %> - <% @project = project %> -
  • - <%= link_to_project project %> (<%= format_time(project.created_on) %>) -
    - <%= textilizable project.short_description, :project => project %> -
    -
  • - <% end %> - <% @project = nil %> -
-
- <% end %> - <%= call_hook(:view_welcome_index_right, :projects => @projects) %> + <%= call_hook(:view_welcome_index_right) %>
<% 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