diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-13 17:45:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-13 17:45:41 +0000 |
commit | e605973ec4f5915abbfc14aea742cb5aff4bbb99 (patch) | |
tree | 527742add46de917397d56a6cb2585175ed581e4 /app/helpers | |
parent | 8cc519e7637d463462e8c8298669fddeaabacb49 (diff) | |
download | redmine-e605973ec4f5915abbfc14aea742cb5aff4bbb99.tar.gz redmine-e605973ec4f5915abbfc14aea742cb5aff4bbb99.zip |
Move issue watchers to the sidebar.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3579 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/watchers_helper.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 3529b8e00..2695ce9f6 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -48,8 +48,8 @@ module WatchersHelper # Returns a comma separated list of users watching the given object def watchers_list(object) remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".to_sym, object.project) - object.watcher_users.collect do |user| - s = content_tag('span', link_to_user(user), :class => 'user') + lis = object.watcher_users.collect do |user| + s = avatar(user, :size => "16").to_s + link_to_user(user, :class => 'user').to_s if remove_allowed url = {:controller => 'watchers', :action => 'destroy', @@ -59,9 +59,11 @@ module WatchersHelper s += ' ' + link_to_remote(image_tag('delete.png'), {:url => url}, :href => url_for(url), - :style => "vertical-align: middle") + :style => "vertical-align: middle", + :class => "delete") end - s - end.join(",\n") + "<li>#{ s }</li>" + end + lis.empty? ? "" : "<ul>#{ lis.join("\n") }</ul>" end end |