diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 03900753..ea34c8aa 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -47,6 +47,26 @@ module WelcomeHelper def find_all_hot_contest sort_contest_by_hot end + + def find_all_event_type event + case event.event_type + when 'news' + '新闻' + when 'issue' + '缺陷' + when 'attachment' + '附件' + when 'message' + '主题' + when 'reply' + '回复' + when 'bid' + '众包' + else + event.event_type + end + end + def time_tag_welcome(time) text = distance_of_time_in_words(Time.now, time) content_tag('span', text, :title => format_time(time)) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 698e5c7b..2e645ddb 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -98,16 +98,21 @@
-