fixes #1562
This commit is contained in:
@@ -271,13 +271,25 @@ div#c-posts {
|
||||
|
||||
.prev {
|
||||
position: absolute;
|
||||
left: 1em;
|
||||
left: 2em;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.next {
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
right: 2em;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.first {
|
||||
position: absolute;
|
||||
left: 0.5em;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.last {
|
||||
position: absolute;
|
||||
right: 0.5em;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,11 +194,13 @@ 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 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")
|
||||
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")
|
||||
match_found = true
|
||||
else
|
||||
pool_html << '<span class="prev">«prev</span>'
|
||||
pool_html << '<span class="prev">‹ prev</span>'
|
||||
end
|
||||
|
||||
pool_html << ' <span class="pool-name ' + klass + '">'
|
||||
@@ -206,12 +208,14 @@ class PostPresenter < Presenter
|
||||
pool_html << '</span> '
|
||||
|
||||
if pool.neighbors(@post).next
|
||||
pool_html << template.link_to("next»".html_safe, template.post_path(pool.neighbors(@post).next, :pool_id => pool.id), :rel => next_rel, :class => "#{klass} next")
|
||||
pool_html << template.link_to("next ›".html_safe, template.post_path(pool.neighbors(@post).next, :pool_id => pool.id), :class => "#{klass} next")
|
||||
match_found = true
|
||||
else
|
||||
pool_html << '<span class="next">next»</span>'
|
||||
pool_html << '<span class="next">next ›</span>'
|
||||
end
|
||||
|
||||
pool_html << template.link_to("»".html_safe, template.post_path(pool.post_id_array.last, :pool_id => pool.id), :rel => next_rel, :class => "#{klass} last")
|
||||
|
||||
pool_html << "</li>"
|
||||
pool_html
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user