-<%
-resource_link = {}
-only_resource = true
-if @review
- resource_link = {:controller => 'dashboard', :action => 'index'}
- only_resource = false
-end
+<% if @resource || @project %>
+ <div id="bc">
+ <ul>
+ <%
+ resource_link = {}
+ if @review
+ resource_link = {:controller => 'dashboard', :action => 'index'}
+ end
-# ======== Path for resources ========
-displayed_resource = @resource || @project
-if displayed_resource && displayed_resource.last_snapshot
- resources=[]
- s=displayed_resource.last_snapshot
- while (s!=nil) do
- resources<<s.project
- s=s.parent
- end
+ # ======== Path for resources ========
+ displayed_resource = @resource || @project
+ if displayed_resource && displayed_resource.last_snapshot
+ resources=[]
+ s=displayed_resource.last_snapshot
+ while (s!=nil) do
+ resources<<s.project
+ s=s.parent
+ end
- resources.reverse.each do |resource|
-%>
- <li>
- <%= qualifier_icon(resource) -%>
-
- <%= link_to( h(resource.name),
- {:overwrite_params => { :id => resource.key }.merge(resource_link)}
+ 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="<%= css_class -%>">
+ <%= qualifier_icon(resource) -%>
+
+ <%= link_to(h(resource.name),
+ {:overwrite_params => {:id => resource.key}.merge(resource_link)}
) -%>
-
- <% if resource==displayed_resource && only_resource %>
-
- <%= link_to( image_tag('permalink.gif'),
- {:overwrite_params => { :id => resource.key }.merge(resource_link)},
- {:title => message('layout.permalink')}
- ) -%>
- <% end %>
- </li>
-<%
- end
-end
+ </li>
+ <%
+ end
+ end
-# ======== Path for review ========
-if @review
-%>
- <li>
- ยป <%= link_to message('review') + ' #' + @review.id.to_s -%>
- </li>
-<%
-end
-%>
\ No newline at end of file
+ # ======== Path for review ========
+ if @review
+ %>
+ <li class="selected">
+ <%= link_to message('review') + ' #' + @review.id.to_s -%>
+ </li>
+ <%
+ end
+ %>
+ <li class="last"> </li>
+ </ul>
+ </div>
+<% end %>
\ No newline at end of file
text-decoration: underline;
}
-
#crumbs {
float: left;
vertical-align: middle;
padding: 0 0 0 10px;
}
+#bc {
+ color: #444;
+ background: #EFEFEF;
+ height: 22px;
+ line-height: 22px;
+ font-size: 93%;
+ margin: 0 10px;
+ border-bottom: 1px solid #CCC;
+ border-right: 2px solid #CCC;
+}
+
+#bc > ul > li {
+ float: left;
+ margin: 0;
+ background: #EFEFEF url("../images/bc-gray.png") no-repeat left;
+ border-bottom: 1px solid #CCC;
+ padding: 0 10px 0 20px;
+}
+
+#bc > ul > li.first {
+ background: #EFEFEF;
+ border-left: 2px solid #CCC;
+ padding: 0 10px 0 5px;
+}
+
+#bc > ul > li.first-selected {
+ background: #4B9FD5;
+ border-left: 2px solid #4B9FD5;
+ border-bottom: 1px solid #4B9FD5;
+ padding: 0 10px 0 5px;
+}
+
+#bc > ul > li.selected {
+ background: #4B9FD5 url("../images/bc-gray-blue.png") no-repeat left;
+}
+
+#bc > ul > li.last {
+ background: #EFEFEF url("../images/bc-blue-gray.png") no-repeat left;
+ border-bottom: #CCC;
+}
+
+#bc > ul > li img {
+ vertical-align: text-bottom;
+ margin-right: -5px;
+}
+
+#bc > ul > li.selected a, #bc > ul > li.first-selected a {
+ color: #FFF;
+}
+#bc > ul > li a {
+ text-decoration: none;
+}
+#bc > ul > li a:hover, #bc > ul > li a:focus {
+ text-decoration: underline;
+}
+
#nonav {
text-align: left;
margin: 50px 180px 0;
text-align: left;
line-height: 1.1em;
border: 2px solid #4b9fd5;
- border-top: 0;
+ border-top-width: 1px;
padding: 10px 0;
}
}
#sidebar .selected a, #sidebar .selected a:hover, #sidebar.selected a:visited {
- font-weight: bold;
color: #FEFEFE;
}
#sidebarconf {
background-color: #EFEFEF;
- border: 2px solid #DDD;
+ border: 2px solid #CCC;
color: #666;
line-height: 1.1em;
margin-top: 10px;