diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb
index 1723dcc55..da99b6f9c 100644
--- a/app/helpers/welcome_helper.rb
+++ b/app/helpers/welcome_helper.rb
@@ -52,7 +52,7 @@ module WelcomeHelper
end
def topic_last_time topic
- return topic.event_datetime if ( !(topic.methods.to_s =~ %r[last_reply]) && topic.last_reply.nil? )
+ return topic.event_datetime if ( !(topic.methods.to_s =~ %r[last_reply]) || topic.last_reply.nil? )
topic.last_reply.event_datetime
end
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index ee495d1fa..5aa2cdb76 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -123,38 +123,105 @@
// var id=$(this).attr('id');
// alert(id);
// });
-
+ // $(function(){
+ // $(".welcome-box-list-new").hide();
+ // $("#hot-topic").bind("click", function(){
+ // $(".welcome-box-list-new").hide();
+ // $(".welcome-box-list").show();
+ // $(this).css({
+ // "border-top": "1px solid #717171",
+ // "border-left": "1px solid #717171",
+ // "border-bottom": "1px solid #FFFFFF",
+ // "border-right": "1px solid #FFFFFF"
+ // });
+ // $("#new-topic").css({
+ // "border-top": "1px solid #FFFFFF",
+ // "border-left": "1px solid #FFFFFF",
+ // "border-bottom": "1px solid #717171",
+ // "border-right": "1px solid #717171"
+ // });
+ // });
+//
+ // $("#new-topic").bind("click", function(){
+ // $(".welcome-box-list").hide();
+ // $(".welcome-box-list-new").show();
+ // $(this).css({
+ // "border-top": "1px solid #717171",
+ // "border-left": "1px solid #717171",
+ // "border-bottom": "1px solid #FFFFFF",
+ // "border-right": "1px solid #FFFFFF"
+ // });
+ // $("#hot-topic").css({
+ // "border-top": "1px solid #FFFFFF",
+ // "border-left": "1px solid #FFFFFF",
+ // "border-bottom": "1px solid #717171",
+ // "border-right": "1px solid #717171"
+ // });
+//
+ // });
+ // // $("#panel h5.head").bind("mouseout", function(){
+ // // $(this).next().fadeOut();
+ // // });
+ // })
+// $(function(){
+ // $("#new-topic").hover(function(){
+ // $(this).css({
+ // "border-top": "1px solid #717171",
+ // "border-left": "1px solid #717171",
+ // "border-bottom": "1px solid #FFFFFF",
+ // "border-right": "1px solid #FFFFFF"
+ // }),
+ // $(this).css({
+ // "border-top": "1px solid #FFFFFF",
+ // "border-left": "1px solid #FFFFFF",
+ // "border-bottom": "1px solid #717171",
+ // "border-right": "1px solid #717171"
+ // });
+ // });
+ // $("#hot-topic").hover(function(){
+ // $(this).css({
+ // "border-top": "1px solid #717171",
+ // "border-left": "1px solid #717171",
+ // "border-bottom": "1px solid #FFFFFF",
+ // "border-right": "1px solid #FFFFFF"
+ // }),
+ // $(this).css({
+ // "border-top": "1px solid #FFFFFF",
+ // "border-left": "1px solid #FFFFFF",
+ // "border-bottom": "1px solid #717171",
+ // "border-right": "1px solid #717171"
+ // });
+ // });
+// })
-
+
<%= stylesheet_link_tag 'welcome' %>
-
-
+
+
+
+ <% find_new_forum_topics.each do |topic|%>
+
-
+
+
+ <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;"%>
+
+
+ <%=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.replies_count, topic.event_url %>)
+
+
+ <% end %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 36b69e6ea..96ee9dbd6 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -43,37 +43,37 @@ zh:
distance_in_words:
half_a_minute: "半分钟"
less_than_x_seconds:
- one: "一秒内"
+ one: "1秒内"
other: "少于 %{count} 秒"
x_seconds:
- one: "一秒"
+ one: "1秒"
other: "%{count} 秒"
less_than_x_minutes:
- one: "一分钟内"
+ one: "1分钟内"
other: "少于 %{count} 分钟"
x_minutes:
- one: "一分钟"
+ one: "1分钟"
other: "%{count} 分钟"
about_x_hours:
- one: "大约一小时"
+ one: "大约1小时"
other: "大约 %{count} 小时"
x_hours:
one: "1 小时"
other: "%{count} 小时"
x_days:
- one: "一天"
+ one: "1天"
other: "%{count} 天"
about_x_months:
- one: "大约一个月"
+ one: "大约1个月"
other: "大约 %{count} 个月"
x_months:
- one: "一个月"
+ one: "1个月"
other: "%{count} 个月"
about_x_years:
- one: "大约一年"
+ one: "大约1年"
other: "大约 %{count} 年"
over_x_years:
- one: "超过一年"
+ one: "超过1年"
other: "超过 %{count} 年"
almost_x_years:
one: "将近 1 年"
diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css
index f4feb824d..85249e614 100644
--- a/public/stylesheets/welcome.css
+++ b/public/stylesheets/welcome.css
@@ -88,6 +88,7 @@ ul.welcome-message-list{
border-bottom: 1.5px solid rgb(21, 165, 200);
padding: 2px;
margin-left: 10px;
+ font-size: 16px;
}
/*鍚勭鍒楄〃鏄剧ず*/
.d-p-index-box{
@@ -103,14 +104,15 @@ ul.welcome-message-list{
color: #999999;
}
.d-p-index-box h3{
- height: 35px;
- line-height: 35px;
+ height: 25px;
+ line-height: 25px;
background-color: rgb(252, 252, 252);
color: green;
/*text-indent: 8px;*/
margin: 0;
- padding: 0;
+ padding: 0px;
display: block;
+ font-size: 16px;
/*font-size: 1em;*/
border-top: none;
border-bottom: 1px solid rgb(21, 165, 200);
@@ -265,4 +267,44 @@ div#tooltip::after {
}
+.inner-content {
+ position: absolute;
+ margin-top: -32px;
+ margin-left: 230px;
+}
+.inner-content li {
+ float: left;
+ list-style-type: none;
+ white-space: nowrap;
+ margin-right: 0px;
+ background: none repeat scroll 0% 0% rgb(255, 255, 255);
+ position: relative;
+ margin-bottom: -1px;
+ /*padding-left: 6px;
+ padding-right: 6px;*/
+}
+
+.inner-content a:link, .inner-content a:visited{
+ margin-right: 0.2em;
+ padding: 0.1em 0.2em 0.1em 0.2em;
+ color: #A62020;
+ background-color: #FCE6EA;
+ text-decoration: none;
+ border-top: 1px solid #FFFFFF;
+ border-left: 1px solid #FFFFFF:
+ border-bottom: 1px solid #717171;
+ border-right: 1px solid #717171;
+}
+.inner-content a:hover{
+ border-top: 1px solid #717171;
+ border-left: 1px solid #717171;
+ border-bottom: 1px solid #FFFFFF;
+ border-right: 1px solid #FFFFFF;
+}
+{
+ border-top: 1px solid #717171;
+ border-left: 1px solid #717171;
+ border-bottom: 1px solid #FFFFFF;
+ border-right: 1px solid #FFFFFF;
+}