modqueue: display pools for each post (fix #3125).
This commit is contained in:
@@ -81,3 +81,11 @@ div#c-pool-orders, div#c-favorite-group-orders {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.inline-pool-list {
|
||||||
|
display: inline;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1031,6 +1031,10 @@ class Post < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_active_pools?
|
||||||
|
pools.length > 0
|
||||||
|
end
|
||||||
|
|
||||||
def belongs_to_pool?(pool)
|
def belongs_to_pool?(pool)
|
||||||
pool_string =~ /(?:\A| )pool:#{pool.id}(?:\Z| )/
|
pool_string =~ /(?:\A| )pool:#{pool.id}(?:\Z| )/
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -34,6 +34,9 @@
|
|||||||
<strong>Hidden</strong>: <%= render "post_disapprovals/compact_counts", :disapprovals => post.disapprovals, :post => post %>
|
<strong>Hidden</strong>: <%= render "post_disapprovals/compact_counts", :disapprovals => post.disapprovals, :post => post %>
|
||||||
</li>
|
</li>
|
||||||
<li><strong>Source</strong>: <%= post.source %></li>
|
<li><strong>Source</strong>: <%= post.source %></li>
|
||||||
|
<% if post.has_active_pools? %>
|
||||||
|
<li><strong>Pools</strong>: <%= render "pools/inline_list", pools: post.pools %></li>
|
||||||
|
<% end %>
|
||||||
<li><strong>Tags</strong>: <%= post.presenter.inline_tag_list_html(self) %></li>
|
<li><strong>Tags</strong>: <%= post.presenter.inline_tag_list_html(self) %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
5
app/views/pools/_inline_list.html.erb
Normal file
5
app/views/pools/_inline_list.html.erb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<ul class="inline-pool-list">
|
||||||
|
<% pools.each do |pool| %>
|
||||||
|
<li><%= link_to pool.pretty_name, pool, :class => "pool-category-#{pool.category}" %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
Reference in New Issue
Block a user