From 9bd1af954138fc5e54a61233fd108043ffe616d1 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 10 Nov 2014 15:09:48 +0800 Subject: [PATCH] =?UTF-8?q?=20#1480=20=E9=A1=B9=E7=9B=AE=E7=95=99=E8=A8=80?= =?UTF-8?q?=E5=8C=BA=E5=9B=9E=E5=A4=8D=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 7 ++++--- app/views/projects/_history.html.erb | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8544b2cf3..1d528c183 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -578,12 +578,13 @@ module ApplicationHelper return ss end - def time_tag(time) + def time_tag(time, *args) + options = args.extract_options! text = distance_of_time_in_words(Time.now, time) if @project - link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)}, :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, :title => format_time(time)) + content_tag('acronym', text, options.reverse_merge(:title => format_time(time))) end end diff --git a/app/views/projects/_history.html.erb b/app/views/projects/_history.html.erb index beb31f830..38ee59e38 100644 --- a/app/views/projects/_history.html.erb +++ b/app/views/projects/_history.html.erb @@ -30,7 +30,7 @@ <%= l(:label_bids_published) %>  - <%= time_tag(journal.created_on).html_safe %>  + <%= time_tag(journal.created_on,:style => "float:initial").html_safe %>  <%= l(:label_bids_published_ago) %>