+
<%= image_tag('/images/contest1.png')%>
@@ -192,7 +178,7 @@
-
+
问题和反馈动态
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
@@ -207,11 +193,11 @@
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
- <%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前
+ <%= l(:field_updated_on) %><%=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.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)
+ 回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)
<% end %>
@@ -228,7 +214,7 @@
<% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %>
-
+
<%= image_tag('/images/app1.png')%>
@@ -237,7 +223,7 @@
- ><%=softapplication.description.truncate(50, omission: '...')%>
+ ><%=softapplication.description.to_s.truncate(50, omission: '...')%>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 8e4db7fe6..81160fa93 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -609,6 +609,14 @@ function toggleAndSettingWordsVal(parent_widget, text_widget, value){
text_widget.val(value)
parent_widget.slideToggle(400)
}
+function transpotUrl (scope) {
+ $(scope).each(function(){
+ var tmpContent = $(this).html();
+ tmpContent = tmpContent.replace(/(^|[^\"\'])(http|ftp|mms|rstp|news|https)(\:\/\/[^<\s\+,,]+)/gi,"$1
$2$3<\/a>");
+ // tmpContent = tmpContent.replace(/(^|[^\/])(www\.[^<\s\+,,]+)/gi,"$1$2");
+ $(this).html(tmpContent);
+ });
+}
$(document).ready(setupAjaxIndicator);
$(document).ready(hideOnLoad);