2009-02-26 19:36:56 +03:00
|
|
|
# Redmine - project management software
|
2013-01-12 13:29:31 +04:00
|
|
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
2009-02-26 19:36:56 +03:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2011-06-17 05:20:12 +04:00
|
|
|
#
|
2009-02-26 19:36:56 +03:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2011-06-17 05:20:12 +04:00
|
|
|
#
|
2009-02-26 19:36:56 +03:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
module Redmine
|
|
|
|
module Views
|
|
|
|
module MyPage
|
|
|
|
module Block
|
|
|
|
def self.additional_blocks
|
2012-04-25 21:17:49 +04:00
|
|
|
@@additional_blocks ||= Dir.glob("#{Redmine::Plugin.directory}/*/app/views/my/blocks/_*.{rhtml,erb}").inject({}) do |h,file|
|
2009-02-26 19:36:56 +03:00
|
|
|
name = File.basename(file).split('.').first.gsub(/^_/, '')
|
2009-04-05 17:33:54 +04:00
|
|
|
h[name] = name.to_sym
|
2009-02-26 19:36:56 +03:00
|
|
|
h
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|