diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb
index 5f8bceced..50c0370eb 100644
--- a/app/presenters/post_presenter.rb
+++ b/app/presenters/post_presenter.rb
@@ -42,4 +42,46 @@ class PostPresenter < Presenter
@tag_set_presenter ||= TagSetPresenter.new(@post.tag_array)
@tag_set_presenter.tag_list_html(template, options.merge(:show_extra_links => CurrentUser.user.is_privileged?))
end
+
+ def pool_html(template)
+ html = ["
"]
+
+ if template.params[:pool_id]
+ pool = Pool.where(:id => template.params[:pool_id]).first
+ return if pool.nil?
+ html = pool_link_html(html, template, pool)
+
+ @post.pools.active.where("id <> ?", template.params[:pool_id]).each do |other_pool|
+ html = pool_link_html(html, template, other_pool)
+ end
+ else
+ @post.pools.active.each do |pool|
+ html = pool_link_html(html, template, pool)
+ end
+ end
+
+ html << "
"
+ html.join("\n").html_safe
+ end
+
+ def pool_link_html(html, template, pool)
+ html << ""
+
+ if pool.neighbors(@post).previous
+ html << template.link_to("«".html_safe, template.post_path(pool.neighbors(@post).previous, :pool_id => pool.id))
+ else
+ html << "«"
+ end
+
+ if pool.neighbors(@post).next
+ html << template.link_to("»".html_safe, template.post_path(pool.neighbors(@post).next, :pool_id => pool.id))
+ else
+ html << "»"
+ end
+
+ html << " "
+ html << template.link_to(pool.name, template.pool_path(pool))
+ html << ""
+ html
+ end
end
diff --git a/app/views/posts/partials/show/_pools.html.erb b/app/views/posts/partials/show/_pools.html.erb
deleted file mode 100644
index f5432beaf..000000000
--- a/app/views/posts/partials/show/_pools.html.erb
+++ /dev/null
@@ -1,17 +0,0 @@
-
- <% post.pools.each do |pool| %>
- -
- <% if pool.neighbors(post).previous %>
- <%= link_to "«".html_safe, post_path(pool.neighbors(post).previous) %>
- <% else %>
- «
- <% end %>
- <% if pool.neighbors(post).next %>
- <%= link_to "»".html_safe, post_path(pool.neighbors(post).next) %>
- <% else %>
- »
- <% end %>
- <%= link_to pool.pretty_name, pool_path(pool) %>
-
- <% end %>
-
\ No newline at end of file
diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb
index 99b7701c8..89746af03 100644
--- a/app/views/posts/show.html.erb
+++ b/app/views/posts/show.html.erb
@@ -6,7 +6,7 @@
<% if @post.pools.any? %>
<% end %>