diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index 8c50b20cc..9bdac970f 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -194,7 +194,11 @@ class PostPresenter < Presenter klass = "" end - pool_html << template.link_to("«".html_safe, template.post_path(pool.post_id_array.first, :pool_id => pool.id), :class => "#{klass} first") + if @post.id != pool.post_id_array.first + pool_html << template.link_to("«".html_safe, template.post_path(pool.post_id_array.first, :pool_id => pool.id), :class => "#{klass} first") + else + pool_html << '«' + end if pool.neighbors(@post).previous pool_html << template.link_to("‹ prev".html_safe, template.post_path(pool.neighbors(@post).previous, :pool_id => pool.id), :rel => prev_rel, :class => "#{klass} prev") @@ -214,7 +218,11 @@ class PostPresenter < Presenter pool_html << 'next ›' end - pool_html << template.link_to("»".html_safe, template.post_path(pool.post_id_array.last, :pool_id => pool.id), :class => "#{klass} last") + if @post.id != pool.post_id_array.last + pool_html << template.link_to("»".html_safe, template.post_path(pool.post_id_array.last, :pool_id => pool.id), :class => "#{klass} last") + else + pool_html << '»' + end pool_html << "" pool_html