修改个人动态显示内容

This commit is contained in:
nieguanghui 2013-12-12 09:19:31 +08:00
parent b9b089fb27
commit 0416902cde
1 changed files with 5 additions and 5 deletions

View File

@ -73,14 +73,14 @@ module WelcomeHelper
end end
def show_user_content event def show_user_content event
str = ''.html_safe str = ' '.html_safe
case event.event_type case event.event_type
when 'news' , 'issue' , 'attachment' , 'message' , 'bid' , 'wiki-page' , 'document' when 'news' , 'issue' , 'attachment' , 'message' , 'bid' , 'wiki-page' , 'document'
str << "&nbsp;".html_safe << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ':&nbsp;'.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)) << ':&nbsp;'.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
when 'reply' when 'reply' ,'Reply','Memo'
str << "&nbsp;".html_safe << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ':&nbsp;'.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)) << ':&nbsp;'.html_safe << link_to(truncate(strip_tags(event.event_description), length: 30, omission:'...'), event.event_url)
else else
str << "&nbsp;".html_safe << content_tag("span", "更新了") << content_tag("span", find_all_event_type(event)) << ':&nbsp;'.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)) << ':&nbsp;'.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
end end
str str
end end