From 8f0fdbdb759ad3b024cc4b619d7ce9496a797cab Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 14:05:45 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=A1=B5=E9=9D=A2=E6=94=B9?=
=?UTF-8?q?=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/welcome/index.html.erb | 99 ++++++++++++++++++++------------
config/locales/zh.yml | 5 +-
2 files changed, 67 insertions(+), 37 deletions(-)
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index 025f24ab1..c4f7f27a7 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -42,7 +42,6 @@
<% unless @first_page.nil? %>
-
<%= @first_page.description.html_safe %>
<% end %>
@@ -57,14 +56,23 @@
- 热门项目
+ <%= l(:lable_hot_projects)%>
<% if User.current.logged? %>
- <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type =>( @project_type||=0)}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
+ <%= link_to(l(:label_project_new), {:controller => 'projects',
+ :action => 'new',
+ :course => 0,
+ :project_type =>( @project_type||=0)},
+ :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
<% end %>
- <%= link_to l(:label_more), { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %>
+ <%= link_to l(:label_more), { :controller => 'projects',
+ :action => 'index',
+ :project_type => 0,
+ :host => Setting.project_domain},
+ :target => "_blank" %>
+
<% #projects = find_miracle_project(10, 3) %>
@@ -83,7 +91,9 @@
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
- <%=project.description.truncate(100, omission: '...')%>
+
+ <%=project.description.truncate(100, omission: '...')%>
+
<%= content_tag "span", l(:label_project_score)+ ":" + red_project_scores(project).to_i.to_s,
@@ -101,8 +111,8 @@
- 用户动态
- <%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %>
+ <%= l(:lable_user_active)%>
+ <%= link_to l(:label_more), { :controller => 'users', :action => 'index'}, :target => "_blank" %>
<%activities = find_all_activities%>
<% activities.each do |event| %>
@@ -113,11 +123,23 @@
-
<%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;", :target => "_blank" %><%= show_user_content event %>
-
<%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前 <%= show_event_reply event %>
+
+ <%= link_to event.event_author, (user_path(event.event_author) if event.event_author),
+ :style => "color:green;", :target => "_blank" %>
+
+ <%= show_user_content event %>
+
+
+ <%= l(:field_updated_on) %>
+ <%= time_tag_welcome event.event_datetime %>前
+
+
+
+ <%= show_event_reply event %>
+
+
-
<% end %>
@@ -128,35 +150,41 @@
- 贴吧动态
- <%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
- <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
- <%= link_to "更多>>", forums_path %>
+ <%= l(:lable_bar_active)%>
+ <%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
+ <%= link_to l(:label_my_feedback) , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
+
+ <%= link_to l(:label_more), forums_path %>
-
<% topics = find_new_forum_topics(7) %>
- <% topics.includes(:forum, :last_reply, :author).each do |topic|%>
+ <% topics.includes(:forum, :last_reply, :author).each do |topic|%>
-
-
- <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>
-
-
-
- <%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
-
-
- 楼主: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
-
-
- 最后回复:<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %><%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%><% end %>
-
-
- 回复(<%= link_to topic.try(:replies_count), topic.event_url %>)
-
-
-
+
+
+ <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
+ <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>
+
+
+
+ <%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
+
+
+ <%= l(:label_question_sponsor)%>:
+ <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
+
+
+ <%= l(:label_final_reply)%>:
+ <% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %>
+ <%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%>
+ <% end %>
+
+
+ <%= l(:label_reply)%>
+ (<%= link_to topic.try(:replies_count), topic.event_url %>)
+
+
+
<% end %>
@@ -164,5 +192,4 @@
-
<%= render partial: 'link_to_another' %>
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 3bd25ceef..9bf050113 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2121,4 +2121,7 @@ zh:
label_select_province: 请选择省份
label_search_conditions_not_null: 搜索条件不能为空
- lable_hot_course: 活跃课程
\ No newline at end of file
+ lable_hot_course: 活跃课程
+ lable_hot_projects: 热门项目
+ lable_user_active: 用户动态
+ lable_bar_active: 贴吧动态
\ No newline at end of file