修改个人动态显示内容
This commit is contained in:
parent
b9b089fb27
commit
0416902cde
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue