89 |
89 |
end
|
90 |
90 |
|
91 |
91 |
Redmine::MenuManager.map :top_menu do |menu|
|
92 |
|
menu.push :home, :home_url, :html => { :class => 'home' }
|
93 |
|
menu.push :my_page, { :controller => 'my', :action => 'page' }, :html => { :class => 'mypage' }, :if => Proc.new { User.current.logged? }
|
|
92 |
menu.push :home, :home_url, :caption => :label_home, :html => { :class => 'home' }
|
|
93 |
menu.push :my_page, { :controller => 'my', :action => 'page' }, :caption => :label_my_page, :html => { :class => 'mypage' }, :if => Proc.new { User.current.logged? }
|
94 |
94 |
menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural, :html => { :class => 'projects' }
|
95 |
|
menu.push :administration, { :controller => 'admin', :action => 'index' }, :html => { :class => 'admin' }, :if => Proc.new { User.current.admin? }
|
96 |
|
menu.push :help, Redmine::Info.help_url, :html => { :class => 'help' }
|
|
95 |
menu.push :administration, { :controller => 'admin', :action => 'index' }, :caption => :label_administration, :html => { :class => 'admin' }, :if => Proc.new { User.current.admin? }
|
|
96 |
menu.push :help, Redmine::Info.help_url, :caption => :label_help, :html => { :class => 'help' }
|
97 |
97 |
end
|
98 |
98 |
|
99 |
99 |
Redmine::MenuManager.map :account_menu do |menu|
|
100 |
|
menu.push :login, :signin_url, :html => { :class => 'login' }, :if => Proc.new { !User.current.logged? }
|
101 |
|
menu.push :register, { :controller => 'account', :action => 'register' }, :html => { :class => 'register' }, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
102 |
|
menu.push :my_account, { :controller => 'my', :action => 'account' }, :html => { :class => 'myaccount' }, :if => Proc.new { User.current.logged? }
|
103 |
|
menu.push :logout, :signout_url, :html => { :class => 'logout' }, :if => Proc.new { User.current.logged? }
|
|
100 |
menu.push :login, :signin_url, :caption => :label_login, :html => { :class => 'login' }, :if => Proc.new { !User.current.logged? }
|
|
101 |
menu.push :register, { :controller => 'account', :action => 'register' }, :caption => :label_register, :html => { :class => 'register' }, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
|
102 |
menu.push :my_account, { :controller => 'my', :action => 'account' }, :caption=> :label_my_account, :html => { :class => 'myaccount' }, :if => Proc.new { User.current.logged? }
|
|
103 |
menu.push :logout, :signout_url, :caption => :label_logout, :html => { :class => 'logout' }, :if => Proc.new { User.current.logged? }
|
104 |
104 |
end
|
105 |
105 |
|
106 |
106 |
Redmine::MenuManager.map :application_menu do |menu|
|
... | ... | |
108 |
108 |
end
|
109 |
109 |
|
110 |
110 |
Redmine::MenuManager.map :project_menu do |menu|
|
111 |
|
menu.push :overview, { :controller => 'projects', :action => 'show' }
|
112 |
|
menu.push :activity, { :controller => 'projects', :action => 'activity' }
|
113 |
|
menu.push :roadmap, { :controller => 'projects', :action => 'roadmap' },
|
|
111 |
menu.push :overview, { :controller => 'projects', :action => 'show' }, :caption => :label_overview
|
|
112 |
menu.push :activity, { :controller => 'projects', :action => 'activity' }, :caption => :label_activity
|
|
113 |
menu.push :roadmap, { :controller => 'projects', :action => 'roadmap' }, :caption => :label_roadmap,
|
114 |
114 |
:if => Proc.new { |p| p.versions.any? }
|
115 |
115 |
menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
|
116 |
116 |
menu.push :new_issue, { :controller => 'issues', :action => 'new' }, :param => :project_id, :caption => :label_issue_new,
|
117 |
117 |
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
|
118 |
118 |
menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
|
119 |
119 |
menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
|
120 |
|
menu.push :wiki, { :controller => 'wiki', :action => 'index', :page => nil },
|
|
120 |
menu.push :wiki, { :controller => 'wiki', :action => 'index', :page => nil }, :caption => :label_wiki,
|
121 |
121 |
:if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
|
122 |
122 |
menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
|
123 |
123 |
:if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
|
124 |
124 |
menu.push :files, { :controller => 'projects', :action => 'list_files' }, :caption => :label_attachment_plural
|
125 |
|
menu.push :repository, { :controller => 'repositories', :action => 'show' },
|
|
125 |
menu.push :repository, { :controller => 'repositories', :action => 'show' }, :caption => :label_repository,
|
126 |
126 |
:if => Proc.new { |p| p.repository && !p.repository.new_record? }
|
127 |
|
menu.push :settings, { :controller => 'projects', :action => 'settings' }
|
|
127 |
menu.push :settings, { :controller => 'projects', :action => 'settings' }, :caption => :label_settings
|
128 |
128 |
end
|