list series pools first on post pages; color collection pools purple
This commit is contained in:
@@ -161,12 +161,17 @@ class PostPresenter < Presenter
|
||||
return if pool.nil?
|
||||
html += pool_link_html(template, pool, :include_rel => true)
|
||||
|
||||
@post.pools.active.where("id <> ?", template.params[:pool_id]).each do |other_pool|
|
||||
other_pools = @post.pools.active.where("id <> ?", template.params[:pool_id])
|
||||
other_pools = other_pools.series + other_pools.collection
|
||||
|
||||
other_pools.each do |other_pool|
|
||||
html += pool_link_html(template, other_pool)
|
||||
end
|
||||
else
|
||||
pools = @post.pools.active
|
||||
pools = pools.series + pools.collection
|
||||
first = true
|
||||
@post.pools.active.each do |pool|
|
||||
pools.each do |pool|
|
||||
if first && template.params[:tags].blank?
|
||||
html += pool_link_html(template, pool, :include_rel => true)
|
||||
first = false
|
||||
@@ -187,11 +192,11 @@ class PostPresenter < Presenter
|
||||
if options[:include_rel]
|
||||
prev_rel = "prev"
|
||||
next_rel = "next"
|
||||
klass = "active"
|
||||
klass = "active pool-category-#{pool.category}"
|
||||
else
|
||||
prev_rel = nil
|
||||
next_rel = nil
|
||||
klass = ""
|
||||
klass = "pool-category-#{pool.category}"
|
||||
end
|
||||
|
||||
if pool.neighbors(@post).previous
|
||||
|
||||
Reference in New Issue
Block a user