修改个人动态显示内容
This commit is contained in:
parent
b9b089fb27
commit
0416902cde
|
@ -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 << " ".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)
|
||||||
when 'reply'
|
when 'reply' ,'Reply','Memo'
|
||||||
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(strip_tags(event.event_description), length: 30, omission:'...'), event.event_url)
|
||||||
else
|
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
|
end
|
||||||
str
|
str
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue