diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 30d40bc6c..ad409774e 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -73,14 +73,14 @@ module WelcomeHelper end def show_user_content event - str = ''.html_safe + str = ' '.html_safe case event.event_type when 'news' , 'issue' , 'attachment' , 'message' , 'bid' , 'wiki-page' , 'document' - str << " ".html_safe << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) - when 'reply' - str << " ".html_safe << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_description, length: 30, omission:'...'), event.event_url) + str << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) + when 'reply' ,'Reply','Memo' + str << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(strip_tags(event.event_description), length: 30, omission:'...'), event.event_url) else - str << " ".html_safe << content_tag("span", "更新了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) + str << content_tag("span", "更新了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) end str end