##// END OF EJS Templates
remove trailing white-spaces from app/helpers/watchers_helper.rb....
Toshi MARUYAMA -
r6800:42aac56a5582
parent child
Show More
@@ -5,22 +5,22
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.
17 17
18 18 module WatchersHelper
19
19
20 20 def watcher_tag(object, user, options={})
21 21 content_tag("span", watcher_link(object, user), :class => watcher_css(object))
22 22 end
23
23
24 24 def watcher_link(object, user)
25 25 return '' unless user && user.logged? && object.respond_to?('watched_by?')
26 26 watched = object.watched_by?(user)
@@ -32,14 +32,14 module WatchersHelper
32 32 {:url => url},
33 33 :href => url_for(url),
34 34 :class => (watched ? 'icon icon-fav' : 'icon icon-fav-off'))
35
35
36 36 end
37
37
38 38 # Returns the css class used to identify watch links for a given +object+
39 39 def watcher_css(object)
40 40 "#{object.class.to_s.underscore}-#{object.id}-watcher"
41 41 end
42
42
43 43 # Returns a comma separated list of users watching the given object
44 44 def watchers_list(object)
45 45 remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".to_sym, object.project)
General Comments 0
You need to be logged in to leave comments. Login now