Skip to content

Commit

Permalink
Merge pull request #2316 from MushroomObserver/fix-tooltip-display
Browse files Browse the repository at this point in the history
Icon tooltips helper - straggler
  • Loading branch information
nimmolo authored Aug 19, 2024
2 parents 9e45f14 + 5531233 commit 78d2abf
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/views/controllers/application/top_nav/_user_nav.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<%
admin_title = in_admin_mode? ? :app_turn_admin_off.t : :app_turn_admin_on.t
admin_mode_args = in_admin_mode? ? { turn_off: true } : { turn_on: true }
%>

<ul class="nav navbar-nav navbar-right hidden-xs mr-0">
<% if @user.admin %>
<li>
<%= button_to(
in_admin_mode? ?
admin_mode_path(turn_off: true) : admin_mode_path(turn_on: true),
{ class: "btn btn-link navbar-btn",
id: "user_nav_admin_mode_link",
title: in_admin_mode? ? :app_turn_admin_off.t : :app_turn_admin_on.t,
data: { toggle: "tooltip", placement: "bottom" } }
) do
tag.span("", class: "glyphicon glyphicon-text-background")
end %>
<%= icon_link_to(
admin_title, admin_mode_path(**admin_mode_args),
{ icon: :admin, id: "user_nav_admin_mode_link", button_to: true,
class: "btn btn-link navbar-btn", data: { placement: "bottom" } }
) %>
</li>
<% end %>
<li>
Expand Down

0 comments on commit 78d2abf

Please sign in to comment.