mirror of
https://github.com/redmine/redmine.git
synced 2025-12-15 21:10:27 +01:00
shorten long line of lib/redmine/my_page.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20122 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -77,11 +77,14 @@ module Redmine
|
||||
|
||||
# Returns the additional blocks that are defined by plugin partials
|
||||
def self.additional_blocks
|
||||
@@additional_blocks ||= Dir.glob("#{Redmine::Plugin.directory}/*/app/views/my/blocks/_*.{rhtml,erb}").inject({}) do |h,file|
|
||||
name = File.basename(file).split('.').first.gsub(/^_/, '')
|
||||
h[name] = {:label => name.to_sym, :partial => "my/blocks/#{name}"}
|
||||
h
|
||||
end
|
||||
@@additional_blocks ||=
|
||||
Dir.glob(
|
||||
"#{Redmine::Plugin.directory}/*/app/views/my/blocks/_*.{rhtml,erb}"
|
||||
).inject({}) do |h, file|
|
||||
name = File.basename(file).split('.').first.gsub(/^_/, '')
|
||||
h[name] = {:label => name.to_sym, :partial => "my/blocks/#{name}"}
|
||||
h
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the default layout for My Page
|
||||
|
||||
Reference in New Issue
Block a user