From e8048f8eb71065fcc7d5b11e5ae9145478cc4488 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 21 Apr 2016 10:09:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=89=88=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=E6=97=B6=E9=97=B4UTC=E4=B8=8E=E5=8C=97=E4=BA=AC=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=9A=84=E8=BD=AC=E6=8D=A2=20=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/repositories_helper.rb | 6 ++++++ app/views/repositories/_dir_list_content.html.erb | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 8d1f11c57..3cf781f76 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -52,6 +52,12 @@ module RepositoriesHelper end end + def translate_time time + case time + when time.include("") + end + end + # 获取diff内容行号 def diff_line_num content content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i diff --git a/app/views/repositories/_dir_list_content.html.erb b/app/views/repositories/_dir_list_content.html.erb index 79ed44b99..60c4aa3bf 100644 --- a/app/views/repositories/_dir_list_content.html.erb +++ b/app/views/repositories/_dir_list_content.html.erb @@ -43,7 +43,11 @@ - + <%# end %>