diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-02-05 19:38:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-02-05 19:38:19 +0000 |
commit | 92725e5803e403891e415ca3cc5be6c1e44ebb46 (patch) | |
tree | 7c381a67c047024fdb3caa560f22357fa9cee270 /app | |
parent | 73510949bacbce2cb0a25116c11834bf8b4a2391 (diff) | |
download | redmine-92725e5803e403891e415ca3cc5be6c1e44ebb46.tar.gz redmine-92725e5803e403891e415ca3cc5be6c1e44ebb46.zip |
check that block is defined before rendering it (my/page_layout)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@244 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/views/my/page_layout.rhtml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/views/my/page_layout.rhtml b/app/views/my/page_layout.rhtml index 4ad4c8e71..6856ee51d 100644 --- a/app/views/my/page_layout.rhtml +++ b/app/views/my/page_layout.rhtml @@ -55,19 +55,22 @@ function removeBlock(block) { <h2><%=l(:label_my_page)%></h2>
<div id="list-top" class="block-receiver">
- <% @blocks['top'].each do |b| %>
+ <% @blocks['top'].each do |b|
+ next unless MyController::BLOCKS.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['top'] %>
</div>
<div id="list-left" class="splitcontentleft block-receiver">
- <% @blocks['left'].each do |b| %>
+ <% @blocks['left'].each do |b|
+ next unless MyController::BLOCKS.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['left'] %>
</div>
<div id="list-right" class="splitcontentright block-receiver">
- <% @blocks['right'].each do |b| %>
+ <% @blocks['right'].each do |b|
+ next unless MyController::BLOCKS.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['right'] %>
</div>
|