From a12608357918ef4b2e43c57a270ae35d733c795f Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Mon, 19 Aug 2013 16:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=BB=E9=A1=B5=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E6=98=BE=E7=A4=BA=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d268e1007..e99ff4eee 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1311,6 +1311,9 @@ module ApplicationHelper def show_watcher_profile(obj) count = 0 html = '' + if User.watched_by(obj.id).count == 0 + html << (content_tag "span", l(:label_no_current_watchers)) + end for user in User.watched_by(obj.id) html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}") count = count + 1 @@ -1333,6 +1336,9 @@ module ApplicationHelper def show_fans_picture(obj) html = '' count = 0 + if obj.watcher_users.count == 0 + html << (content_tag "span", l(:label_no_current_fans)) + end for user in obj.watcher_users html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}") count = count + 1