Project

General

Profile

« Previous | Next » 

Revision 2059

Adds a css class on menu items in order to apply item specific styles (eg. icons).

View differences:

redmine.rb
106 106
end
107 107

  
108 108
Redmine::MenuManager.map :top_menu do |menu|
109
  menu.push :home, :home_path, :html => { :class => 'home' }
110
  menu.push :my_page, { :controller => 'my', :action => 'page' }, :html => { :class => 'mypage' }, :if => Proc.new { User.current.logged? }
111
  menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural, :html => { :class => 'projects' }
112
  menu.push :administration, { :controller => 'admin', :action => 'index' }, :html => { :class => 'admin' }, :if => Proc.new { User.current.admin? }, :last => true
113
  menu.push :help, Redmine::Info.help_url, :html => { :class => 'help' }, :last => true
109
  menu.push :home, :home_path
110
  menu.push :my_page, { :controller => 'my', :action => 'page' }, :if => Proc.new { User.current.logged? }
111
  menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural
112
  menu.push :administration, { :controller => 'admin', :action => 'index' }, :if => Proc.new { User.current.admin? }, :last => true
113
  menu.push :help, Redmine::Info.help_url, :last => true
114 114
end
115 115

  
116 116
Redmine::MenuManager.map :account_menu do |menu|
117
  menu.push :login, :signin_path, :html => { :class => 'login' }, :if => Proc.new { !User.current.logged? }
118
  menu.push :register, { :controller => 'account', :action => 'register' }, :html => { :class => 'register' }, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
119
  menu.push :my_account, { :controller => 'my', :action => 'account' }, :html => { :class => 'myaccount' }, :if => Proc.new { User.current.logged? }
120
  menu.push :logout, :signout_path, :html => { :class => 'logout' }, :if => Proc.new { User.current.logged? }
117
  menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? }
118
  menu.push :register, { :controller => 'account', :action => 'register' }, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
119
  menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? }
120
  menu.push :logout, :signout_path, :if => Proc.new { User.current.logged? }
121 121
end
122 122

  
123 123
Redmine::MenuManager.map :application_menu do |menu|

Also available in: Unified diff