Skip to content

Commit

Permalink
Do not show tooltip on listicons in GTLs when they're not clickable
Browse files Browse the repository at this point in the history
skateman committed Sep 13, 2018
1 parent f586c32 commit 7c89ed6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 7c89ed6

Please sign in to comment.