Refactor tag_list_html, split_tag_list_html, and inline_tag_list_html to take the `show_extra_links` and `current_query` options explicitly, rather than implicitly relying on CurrentUser or taking `params[:tags]` from the template.
51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
<div class="post-tooltip-header">
|
|
<span class="post-tooltip-header-left">
|
|
<% if CurrentUser.is_moderator? && @post.uploader != @post.keeper %>
|
|
<%= link_to_user @post.uploader %> +
|
|
<% end %>
|
|
|
|
<%= link_to_user @post.keeper %>
|
|
|
|
<%= link_to time_ago_in_words_tagged(@post.created_at, compact: true), posts_path(tags: "date:#{@post.created_at.strftime("%Y-%m-%d")}"), class: "post-tooltip-date post-tooltip-info" %>
|
|
|
|
<span class="post-tooltip-favorites post-tooltip-info">
|
|
<span><%= @post.fav_count %></span>
|
|
<i class="far fa-star fa-xs"></i>
|
|
</span>
|
|
|
|
<span class="post-tooltip-score post-tooltip-info">
|
|
<span><%= @post.score %></span>
|
|
<i class="far fa-thumbs-up fa-xs"></i>
|
|
</span>
|
|
|
|
<% if @post.last_commented_at.present? %>
|
|
<span class="post-tooltip-comments post-tooltip-info">
|
|
<span><%= @post.comments.count %></span>
|
|
<i class="far fa-comments fa-xs"></i>
|
|
</span>
|
|
<% end %>
|
|
</span>
|
|
|
|
<span class="post-tooltip-header-right">
|
|
<%= link_to @post.source_domain, @post.normalized_source, class: "post-tooltip-source post-tooltip-info" if @post.source_domain.present? %>
|
|
<%= link_to "#{@post.pretty_rating.downcase}", posts_path(tags: "rating:#{@post.rating}"), class: "post-tooltip-rating post-tooltip-info" %>
|
|
<%= link_to "#{@post.image_width}x#{@post.image_height}", @post.file_url, class: "post-tooltip-dimensions post-tooltip-info" %>
|
|
|
|
<%= link_to "#", class: "post-tooltip-disable", title: "Disable enhanced tooltips" do %>
|
|
<i class="fas fa-times-circle"></i>
|
|
<% end %>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="post-tooltip-body">
|
|
<div class="post-tooltip-pools">
|
|
<% @post.pools.series.undeleted.each do |pool| %>
|
|
<%= link_to pool, class: "pool-category-#{pool.category}" do %>
|
|
<%= "pool:#{pool.pretty_name} [#{pool.page_number(@post.id)}/#{pool.post_count}]" %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= @post.presenter.inline_tag_list_html(humanize_tags: false) %>
|
|
</div>
|