post tooltips: add disable option (#3689).

* Add "disable post tooltips" account setting.
* Add back title attribute for when fancy tooltips are disabled.
This commit is contained in:
evazion
2018-04-28 23:18:49 -05:00
parent 1a29b96579
commit a6499b5169
7 changed files with 20 additions and 3 deletions

View File

@@ -40,7 +40,8 @@ class PostPresenter < Presenter
src = post.preview_file_url
end
html << %{<img itemprop="thumbnailUrl" src="#{src}" alt="#{h(post.tag_string)}">}
tooltip = "#{post.tag_string} rating:#{post.rating} score:#{post.score}"
html << %{<img itemprop="thumbnailUrl" src="#{src}" title="#{h(tooltip)}" alt="#{h(post.tag_string)}">}
html << %{</a>}
if options[:pool]