Code cleanup (#14766).

Patch by Daniel Felix.

git-svn-id: http://svn.redmine.org/redmine/trunk@12658 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-01-11 13:29:53 +00:00
parent e9689f5fe3
commit b9f45c80c6
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ class MyController < ApplicationController
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT.dup @blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT.dup
@block_options = [] @block_options = []
BLOCKS.each do |k, v| BLOCKS.each do |k, v|
unless %w(top left right).detect {|f| (@blocks[f] ||= []).include?(k)} unless @blocks.values.flatten.include?(k)
@block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize] @block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]
end end
end end