diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 11d1d6e18..db212aef7 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -115,7 +115,7 @@ class MemosController < ApplicationController REPLIES_PER_PAGE = 20 unless const_defined?(:REPLIES_PER_PAGE) def show - #更新贴吧帖子留言对应的memo_messages的viewed字段 + # 更新贴吧帖子留言对应的memo_messages的viewed字段 query_memo_messages = @memo.memo_messages pre_count = REPLIES_PER_PAGE diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 1bbcf9bb4..a8f2a11f1 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -28,6 +28,7 @@ class PollController < ApplicationController render_403 return end + # 问卷消息状态更新 query_course_poll = @poll.course_messages query_course_poll.each do |query| if User.current.id == query.user_id diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 496565c23..76f36b34d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -756,16 +756,16 @@ module ApplicationHelper return ss end - # def time_tag(time, *args) - # options = args.extract_options! - # text = distance_of_time_in_words(Time.now, time) - # if @project - # content_tag('acronym', text, options.reverse_merge(:title => format_time(time))) - # # link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time))) - # else - # content_tag('acronym', text, options.reverse_merge(:title => format_time(time))) - # end - # end + def time_tag(time, *args) + options = args.extract_options! + text = distance_of_time_in_words(Time.now, time) + if @project + content_tag('acronym', text, options.reverse_merge(:title => format_time(time))) + # link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time))) + else + content_tag('acronym', text, options.reverse_merge(:title => format_time(time))) + end + end def syntax_highlight_lines(name, content) lines = []