##// END OF EJS Templates
remove trailing white-spaces from app/controllers/my_controller.rb....
Toshi MARUYAMA -
r6680:b840af0db061
parent child
Show More
@@ -1,16 +1,16
1 1 # Redmine - project management software
2 # Copyright (C) 2006-2009 Jean-Philippe Lang
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 #
8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 #
13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -31,8 +31,8 class MyController < ApplicationController
31 31 'timelog' => :label_spent_time
32 32 }.merge(Redmine::Views::MyPage::Block.additional_blocks).freeze
33 33
34 DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'],
35 'right' => ['issuesreportedbyme']
34 DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'],
35 'right' => ['issuesreportedbyme']
36 36 }.freeze
37 37
38 38 verify :xhr => true,
@@ -88,7 +88,7 class MyController < ApplicationController
88 88 end
89 89 end
90 90 end
91
91
92 92 # Create a new feeds key
93 93 def reset_rss_key
94 94 if request.post?
@@ -122,7 +122,7 class MyController < ApplicationController
122 122 @block_options = []
123 123 BLOCKS.each {|k, v| @block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]}
124 124 end
125
125
126 126 # Add a block to user's page
127 127 # The block is added on top of the page
128 128 # params[:block] : id of the block to add
@@ -136,10 +136,10 class MyController < ApplicationController
136 136 # add it on top
137 137 layout['top'].unshift block
138 138 @user.pref[:my_page_layout] = layout
139 @user.pref.save
139 @user.pref.save
140 140 render :partial => "block", :locals => {:user => @user, :block_name => block}
141 141 end
142
142
143 143 # Remove a block to user's page
144 144 # params[:block] : id of the block to remove
145 145 def remove_block
@@ -149,7 +149,7 class MyController < ApplicationController
149 149 layout = @user.pref[:my_page_layout] || {}
150 150 %w(top left right).each {|f| (layout[f] ||= []).delete block }
151 151 @user.pref[:my_page_layout] = layout
152 @user.pref.save
152 @user.pref.save
153 153 render :nothing => true
154 154 end
155 155
@@ -169,7 +169,7 class MyController < ApplicationController
169 169 }
170 170 layout[group] = group_items
171 171 @user.pref[:my_page_layout] = layout
172 @user.pref.save
172 @user.pref.save
173 173 end
174 174 end
175 175 render :nothing => true
General Comments 0
You need to be logged in to leave comments. Login now