aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-03-23 14:41:07 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-03-23 14:41:07 +0100
commit1d414016d33384d4346b2464db3f1a32d22fa4aa (patch)
tree83e2c553baede1cccaff0a83c17de85c87002760 /sonar-server/src/main
parentc1d76b6ef8255491134ff4c4c902090dc8b6f595 (diff)
downloadsonarqube-1d414016d33384d4346b2464db3f1a32d22fa4aa.tar.gz
sonarqube-1d414016d33384d4346b2464db3f1a32d22fa4aa.zip
Display resource viewers for projects and packages too
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb8
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb6
2 files changed, 10 insertions, 4 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb
index d0854f7855d..435c2c67952 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb
@@ -1 +1,7 @@
-<div id="resource_container"> </div> \ No newline at end of file
+<div id="resource_container"> </div>
+
+<% if @drilldown.highlighted_resource %>
+<script>
+ d(<%= @drilldown.highlighted_resource.id -%>);
+</script>
+<% end %> \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb
index a2d0beedaa4..37b30e047e5 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb
@@ -12,7 +12,7 @@
first=true
if @snapshot.source
%>
- <li class="<%= 'first' if first -%>"><a href="<%= ApplicationController.root_context -%>/api/sources?resource=<%= @resource.key -%>&format=txt">Raw</a></li>
+ <li class="<%= 'first' if first -%>"><a href="<%= ApplicationController.root_context -%>/api/sources?resource=<%= @resource.key -%>&amp;format=txt">Raw</a></li>
<% first=false
end
if request.xhr? %>
@@ -22,12 +22,12 @@
<ul class="tabs" >
<% if request.xhr? %>
<% @extensions.each do |extension| %>
- <li><a href="#" onclick="loadAjaxTab('<%= @resource.id -%>','<%= extension.getId() -%>')" class="<%= 'selected' if @extension.getId()==extension.getId() -%>"><%= extension.getTitle() -%></a></li>
+ <li><a href="#" onclick="loadAjaxTab('<%= @resource.id -%>','<%= extension.getId() -%>')" class="<%= 'selected' if @extension && @extension.getId()==extension.getId() -%>"><%= extension.getTitle() -%></a></li>
<% end %>
<% else %>
<script>function loadTab(url) {$('resource-loading').show();document.location.href=url;return false;}</script>
<% @extensions.each do |extension| %>
- <li><a href="#" onClick="loadTab('<%= url_for(:overwrite_params => {:tab => extension.getId(), :metric => nil}) -%>')" class="<%= 'selected' if @extension.getId()==extension.getId() -%>"><%= extension.getTitle() -%></a></li>
+ <li><a href="#" onClick="loadTab('<%= url_for(:overwrite_params => {:tab => extension.getId(), :metric => nil}) -%>')" class="<%= 'selected' if @extension && @extension.getId()==extension.getId() -%>"><%= extension.getTitle() -%></a></li>
<% end %>
<% end %>
<li>