summaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-01-10 19:16:30 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-01-10 19:16:30 +0100
commit8bceecb344e055425dcbb25aae27d3736cd4de65 (patch)
tree617ddbc0a13534a90ffdd38b97ebcb0645c57ba0 /sonar-server
parentc8d150808ca30044b753923efa30a46ee7a9f1db (diff)
downloadsonarqube-8bceecb344e055425dcbb25aae27d3736cd4de65.tar.gz
sonarqube-8bceecb344e055425dcbb25aae27d3736cd4de65.zip
improve the date format in 'Time changes' select-box
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb5
2 files changed, 6 insertions, 5 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
index a3a982e0163..feff2e8e1ea 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
@@ -86,11 +86,11 @@ module ApplicationHelper
if mode=='days'
label = "over %s days" % mode_param
elsif mode=='version'
- label = "since version %s (%s)" % [mode_param, l(date)]
+ label = "since version %s (%s)" % [mode_param, (date.strftime("%Y %b %d"))]
elsif mode=='previous_analysis'
- label = "since previous analysis (%s)" % l(date)
+ label = "since previous analysis (%s)" % (date.strftime("%Y %b %d"))
elsif mode=='date'
- label = "since #{localize(date)}"
+ label = "since #{date.strftime("%Y %b %d")}"
end
end
label
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb
index fcab616168a..6fb2a240cb7 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb
@@ -23,6 +23,7 @@ module DrilldownHelper
return nil if snapshot.nil? || snapshot.project_snapshot.nil?
mode=snapshot.project_snapshot.send "period#{index}_mode"
mode_param=snapshot.project_snapshot.send "period#{index}_param"
+ date=snapshot.project_snapshot.send "period#{index}_date"
if mode
if mode=='days'
@@ -30,9 +31,9 @@ module DrilldownHelper
elsif mode=='version'
label = "Added since version %s" % mode_param
elsif mode=='previous_analysis'
- label = "Added since previous analysis (%s)" % localize(Date.parse(mode_param))
+ label = "Added since previous analysis (%s)" % date.strftime("%Y %b. %d")
elsif mode=='date'
- label = "Added since #{localize(Date.parse(mode_param))}"
+ label = "Added since #{date.strftime("%Y %b %d")}"
end
if label
selected=(params[:period]==index.to_s ? 'selected' : '')