]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3755 add link to component from issue detail
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 4 Jun 2013 09:11:18 +0000 (11:11 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 4 Jun 2013 09:11:18 +0000 (11:11 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/issue/_show.html.erb

index 432e0912f80d8a4f6a4ffff3658cfa2ae3f13889..3c739d0c44732754ed43aadf770d8d8b9ef8dc5b 100644 (file)
@@ -1,8 +1,17 @@
 <div class="source_title">
+  <%
+    project = @issue_results.project(@issue)
+     component = @issue_results.component(@issue)
+  %>
+
+  <% if component.key() != project.key() %>
   <div class="subtitle">
-    <%= h @issue_results.project(@issue).name() -%>
+    <%= h project.longName() -%>
   </div>
-  <span class="h1"><%= h @issue_results.component(@issue).longName() -%></span>
+  <% end %>
+  <span class="h1">
+    <a href="<%= ApplicationController.root_context -%>/resource/index/<%= component.key() -%>?layout=false&tab=issues" onclick="window.open(this.href,'resource-<%= component.key().parameterize -%>','height=800,width=900,scrollbars=1,resizable=1');return false;"><%= h component.longName() -%></a>
+  </span>
 </div>
 
 <div class="marginbottom10">