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
This commit is contained in:
Jean-Philippe Lang 2007-02-05 19:38:19 +00:00
parent 73510949ba
commit 92725e5803
1 changed files with 6 additions and 3 deletions

View File

@ -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>