diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index f862ce30f..ff2801a53 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -75,13 +75,13 @@ module WelcomeHelper str = ' '.html_safe case event.event_type when 'news' , 'issue', 'message' , 'bid' , 'wiki-page' , 'document' - 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) + 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, :target => "_blank" ) 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) + 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, :target => "_blank" ) when 'attachment' 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) << link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container)) else - 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) + 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, :target => "_blank" ) end str rescue Exception => e @@ -92,9 +92,9 @@ module WelcomeHelper str = "回复(" case event.event_type when "issue" - str << link_to(cal_issues_count(event), issue_path(event)) << ")" + str << link_to(cal_issues_count(event), issue_path(event), :target => "_blank" ) << ")" when "Memo" - str << link_to(cal_memos_count(event), forum_memo_path(event.forum_id,event.id)) << ")" + str << link_to(cal_memos_count(event), forum_memo_path(event.forum_id,event.id), :target => "_blank" ) << ")" else str = "" end diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 32cb43167..2f0279578 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -97,7 +97,7 @@

贴吧动态

- <%= link_to "更多>>", forums_path %> + <%= link_to "更多>>", forums_path, :target => "_blank" %>
@@ -105,14 +105,14 @@
  •       - <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;"%> + <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %>
    <%=time_tag_welcome(topic_last_time topic)%>前 - 由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);"%> 发表 + 由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);", :target => "_blank" %> 发表 - 回复(<%= link_to topic.replies_count, topic.event_url %>) + 回复(<%= link_to topic.replies_count, topic.event_url, :target => "_blank" %>)
  • <% end %> @@ -123,7 +123,7 @@