summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2012-09-20 00:47:57 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2012-09-20 00:47:57 +0200
commitf91a2618212ead57c699b17215103d98cf781bc4 (patch)
tree150b0b1775d6b87678150e3f5106e95145808daf
parentd82d451848ce591722ffb1426b0d06454a358298 (diff)
downloadsonarqube-f91a2618212ead57c699b17215103d98cf781bc4.tar.gz
sonarqube-f91a2618212ead57c699b17215103d98cf781bc4.zip
SONAR-3802 prefix the breadcrumb with Projects (or Views/Developers)
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb21
1 files changed, 6 insertions, 15 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb
index f5838668d0e..4a4d32ade31 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb
@@ -13,26 +13,17 @@
resources=[]
s=displayed_resource.last_snapshot
while (s!=nil) do
- resources<<s.project
+ resources.insert(0, s.project)
s=s.parent
end
items_count = resources.size
items_count+=1 if @review
- resources.reverse.each_with_index do |resource, index|
- if items_count==1
- css_class='first-selected'
- else
- css_class=
- case index
- when 0 then
- 'first'
- when (items_count-1) then
- 'selected'
- else
- ''
- end
- end
+ %>
+ <li class="first"><%= message("qualifiers.#{resources[0].qualifier}") -%></li>
+ <%
+ resources.each_with_index do |resource, index|
+ css_class=(index==items_count-1 ? 'selected' : '')
%>
<li class="<%= css_class -%>">
<%= qualifier_icon(resource) -%>