Highlight current heading on results list

This commit is contained in:
Bertocq
2017-07-10 17:48:04 +02:00
parent 741a342bb0
commit 49f48ddf4b
2 changed files with 7 additions and 1 deletions

View File

@@ -236,6 +236,11 @@ a {
border-bottom: 2px solid $brand; border-bottom: 2px solid $brand;
color: $brand; color: $brand;
} }
&.bold {
font-weight: bold;
color: $brand;
}
} }
&.no-margin-top { &.no-margin-top {

View File

@@ -26,7 +26,8 @@
</li> </li>
<% @budget.headings.each do |heading| %> <% @budget.headings.each do |heading| %>
<li> <% active_class = heading.id.to_s == params[:heading_id] ? 'bold' : '' %>
<li class="<%= active_class %>">
<%= link_to heading.name, <%= link_to heading.name,
budget_results_path(@budget, heading_id: heading.id) %> budget_results_path(@budget, heading_id: heading.id) %>
</li> </li>