From: Jean-Philippe Lang Date: Thu, 7 Feb 2013 20:13:15 +0000 (+0000) Subject: Don't wrap watcher link with span. X-Git-Tag: 2.3.0~170 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8b205052a96416dd3313559343547fd850905921;p=redmine.git Don't wrap watcher link with span. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11334 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 10d5a66ce..5b3b1b7b4 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -20,19 +20,20 @@ module WatchersHelper def watcher_tag(object, user, options={}) - content_tag("span", watcher_link(object, user), :class => watcher_css(object)) + ActiveSupport::Deprecation.warn "#watcher_tag is deprecated and will be removed in Redmine 3.0. Use #watcher_link instead." + watcher_link(object, user) end def watcher_link(object, user) return '' unless user && user.logged? && object.respond_to?('watched_by?') watched = object.watched_by?(user) + css = [watcher_css(object), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ') url = {:controller => 'watchers', :action => (watched ? 'unwatch' : 'watch'), :object_type => object.class.to_s.underscore, :object_id => object.id} link_to((watched ? l(:button_unwatch) : l(:button_watch)), url, - :remote => true, :method => 'post', :class => (watched ? 'icon icon-fav' : 'icon icon-fav-off')) - + :remote => true, :method => 'post', :class => css) end # Returns the css class used to identify watch links for a given +object+ diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index 1a006a6ad..f5e9b1295 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -5,7 +5,7 @@ new_board_message_path(@board), :class => 'icon icon-add', :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %> -<%= watcher_tag(@board, User.current) %> +<%= watcher_link(@board, User.current) %>