Skip to content

Commit

Permalink
Fix wrongly highlighted advanced tabs
Browse files Browse the repository at this point in the history
The meta and pulse tabs for projects were wrongly highlighted,
because the controller names did not match anymore. This was caused
by moving pulse and meta related actions to individual controllers.

Fixes #6504
  • Loading branch information
bgeuken committed Dec 12, 2018
1 parent 80d3869 commit 96d232c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/app/helpers/webui/webui_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def tab(id, text, opts)
opts[:package] = @package.to_s if @package
opts[:project] = @project.to_s if @project
link_opts = { id: "tab-#{id}" }
if (action_name == opts[:action].to_s && opts[:controller].to_s.include?(controller_name)) || opts[:selected]

if (action_name == opts[:action].to_s && opts[:controller].to_s.ends_with?(controller_name)) || opts[:selected]
link_opts[:class] = 'selected'
end
content_tag('li', link_to(h(text), opts), link_opts)
Expand Down

0 comments on commit 96d232c

Please sign in to comment.