Patch #29184 » diff.patch
| app/controllers/welcome_controller.rb | ||
|---|---|---|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
class WelcomeController < ApplicationController
|
||
|
self.main_menu = false
|
||
|
menu_item :home
|
||
|
def index
|
||
|
@news = News.latest User.current
|
||
| lib/redmine.rb | ||
|---|---|---|
|
end
|
||
|
Redmine::MenuManager.map :application_menu do |menu|
|
||
|
menu.push :home, :home_path
|
||
|
menu.push :projects, {:controller => 'projects', :action => 'index'},
|
||
|
:permission => nil,
|
||
|
:caption => :label_project_plural
|
||
| test/functional/welcome_controller_test.rb | ||
|---|---|---|
|
get :index
|
||
|
assert_response :success
|
||
|
assert_select 'h3', :text => 'Latest news'
|
||
|
assert_select '#main-menu' do
|
||
|
assert_select 'a.home.selected', 1
|
||
|
end
|
||
|
end
|
||
|
def test_browser_language
|
||