Skip to content

Commit

Permalink
Highlight the currently selected locale instead of hiding it.
Browse files Browse the repository at this point in the history
I found the current behavior a bit confusing when working on thewca#2960. I
think it's pretty weird to select a locale, and then have it disappear
from the list. Now, we highlight the current locale in blue.
  • Loading branch information
jfly committed Jun 14, 2018
1 parent 2e70711 commit f216e7a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions WcaOnRails/app/views/layouts/_navigation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@
</a>
<ul class="dropdown-menu countries" role="menu">
<% Locales::AVAILABLE.each do |l, data| %>
<% unless l == I18n.locale %>
<li>
<%= link_to update_locale_path(l), method: :patch do %>
<%= flag_icon data[:flag_id] %> <%= data[:name] %>
<% end %>
</li>
<% end %>
<li class="<%= l == I18n.locale ? "active" : "" %>">
<%= link_to update_locale_path(l), method: :patch do %>
<%= flag_icon data[:flag_id] %> <%= data[:name] %>
<% end %>
</li>
<% end %>
</ul>
</li>
Expand Down

0 comments on commit f216e7a

Please sign in to comment.