diff -Nur sonar-2.12.ori/war/sonar-server/WEB-INF/app/views//resource/index.html.erb sonar-2.12/war/sonar-server/WEB-INF/app/views//resource/index.html.erb
--- sonar-2.12.ori/war/sonar-server/WEB-INF/app/views//resource/index.html.erb 2011-11-28 11:51:54.000000000 +0100
+++ sonar-2.12/war/sonar-server/WEB-INF/app/views//resource/index.html.erb 2012-03-05 10:09:12.276728700 +0100
@@ -9,6 +9,16 @@
<% end %>
<% end %>
+<%
+scmRevisionUrl='#'
+if @scm_available
+ r = @resource.root
+ while scmRevisionUrl=='#' and not r.nil? do
+ r.custom_links.each do |custom_link|
+ if custom_link.name.upcase == 'SCMREVISIONURL'
+ scmRevisionUrl = custom_link.href
+ break
+ end
+ end
+ r = r.root
+ end
+end
+%>
<% if @lines && @lines.size>0 %>
<%
@@ -64,8 +74,9 @@
if current_revision!=line.revision
current_revision=line.revision
title = "Revision #{h(line.revision)}"
+href = "#{scmRevisionUrl}#{h(line.revision)}"
%>
-| <%= Java::OrgSonarApiUtils::DateUtils.formatDate(line.datetime) if line.datetime -%> <%= h(line.author) -%> |
+<%= Java::OrgSonarApiUtils::DateUtils.formatDate(line.datetime) if line.datetime -%> <%= h(line.author) -%> |
<% else %>
|
<% end
diff -Nur sonar-2.12.ori/war/sonar-server/WEB-INF/app/views//source/_source.html.erb sonar-2.12/war/sonar-server/WEB-INF/app/views//source/_source.html.erb
--- sonar-2.12.ori/war/sonar-server/WEB-INF/app/views//source/_source.html.erb 2011-11-28 11:51:54.000000000 +0100
+++ sonar-2.12/war/sonar-server/WEB-INF/app/views//source/_source.html.erb 2012-03-05 10:09:26.433431700 +0100
@@ -1,4 +1,14 @@
<% if !panel.empty? %>
+<%
+scmRevisionUrl='#'
+if @scm_available
+ r = @resource.root
+ while scmRevisionUrl=='#' and not r.nil? do
+ r.custom_links.each do |custom_link|
+ if custom_link.name.upcase == 'SCMREVISIONURL'
+ scmRevisionUrl = custom_link.href
+ break
+ end
+ end
+ r = r.root
+ end
+end
+%>