diff app/controllers/my_controller.rb @ 909:cbb26bc654de redmine-1.3

Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author Chris Cannam
date Fri, 24 Feb 2012 19:09:32 +0000
parents 8661b858af72
children 5e80956cc792 433d4f72a19b
line wrap: on
line diff
--- a/app/controllers/my_controller.rb	Fri Feb 24 18:36:29 2012 +0000
+++ b/app/controllers/my_controller.rb	Fri Feb 24 19:09:32 2012 +0000
@@ -1,16 +1,16 @@
 # Redmine - project management software
-# Copyright (C) 2006-2009  Jean-Philippe Lang
+# Copyright (C) 2006-2011  Jean-Philippe Lang
 #
 # 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.
-# 
+#
 # 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.
-# 
+#
 # 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.
@@ -31,8 +31,8 @@
              'timelog' => :label_spent_time
            }.merge(Redmine::Views::MyPage::Block.additional_blocks).freeze
 
-  DEFAULT_LAYOUT = {  'left' => ['issuesassignedtome'], 
-                      'right' => ['issuesreportedbyme'] 
+  DEFAULT_LAYOUT = {  'left' => ['issuesassignedtome'],
+                      'right' => ['issuesreportedbyme']
                    }.freeze
 
   verify :xhr => true,
@@ -88,7 +88,7 @@
       end
     end
   end
-  
+
   # Create a new feeds key
   def reset_rss_key
     if request.post?
@@ -122,7 +122,7 @@
     @block_options = []
     BLOCKS.each {|k, v| @block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]}
   end
-  
+
   # Add a block to user's page
   # The block is added on top of the page
   # params[:block] : id of the block to add
@@ -136,10 +136,10 @@
     # add it on top
     layout['top'].unshift block
     @user.pref[:my_page_layout] = layout
-    @user.pref.save 
+    @user.pref.save
     render :partial => "block", :locals => {:user => @user, :block_name => block}
   end
-  
+
   # Remove a block to user's page
   # params[:block] : id of the block to remove
   def remove_block
@@ -149,7 +149,7 @@
     layout = @user.pref[:my_page_layout] || {}
     %w(top left right).each {|f| (layout[f] ||= []).delete block }
     @user.pref[:my_page_layout] = layout
-    @user.pref.save 
+    @user.pref.save
     render :nothing => true
   end
 
@@ -169,7 +169,7 @@
         }
         layout[group] = group_items
         @user.pref[:my_page_layout] = layout
-        @user.pref.save 
+        @user.pref.save
       end
     end
     render :nothing => true