Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not show tooltip on listicons in GTLs when they're not clickable #4653

Merged
merged 1 commit into from
Sep 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -987,10 +987,17 @@ def view_to_hash(view, fetch_data = false)
icon, icon2, image = fonticon_or_fileicon(item)
# FIXME: adding exceptions here is a wrong approach
icon = nil if params[:controller] == 'pxe'
new_row[:cells] << {:title => _('View this item'),
:image => ActionController::Base.helpers.image_path(image.to_s),
:icon => icon,
:icon2 => icon2}

# Clickable should be false only when it's explicitly set to false
not_clickable = if params
(params.fetch_path(:additional_options, :clickable) == false)
else
false
end
new_row[:cells] << {:title => not_clickable ? nil : _('View this item'),
:image => ActionController::Base.helpers.image_path(image.to_s),
:icon => icon,
:icon2 => icon2}.compact

view.col_order.each_with_index do |col, col_idx|
next if view.column_is_hidden?(col)
Expand Down