diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9ebde16..4b0865c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1131,7 +1131,7 @@ module ApplicationHelper alias :browse_communities_menu :search_communities_menu def pagination_links(collection, options={}) - options = {:previous_label => '« ' + _('Previous'), :next_label => _('Next') + ' »'}.merge(options) + options = {:previous_label => content_tag(:span, '« ', :class => 'previous-arrow') + _('Previous'), :next_label => _('Next') + content_tag(:span, ' »', :class => 'next-arrow'), :inner_window => 1, :outer_window => 0 }.merge(options) will_paginate(collection, options) end diff --git a/app/helpers/blog_helper.rb b/app/helpers/blog_helper.rb index e29cf80..7fedf87 100644 --- a/app/helpers/blog_helper.rb +++ b/app/helpers/blog_helper.rb @@ -24,10 +24,8 @@ module BlogHelper end def list_posts(articles, conf = { format: 'full', paginate: true }) - pagination = will_paginate(articles, { + pagination = pagination_links(articles, { :param_name => 'npage', - :previous_label => _('« Newer posts'), - :next_label => _('Older posts »'), :params => {:action=>"view_page", :page=>articles.first.parent.path.split('/'), :controller=>"content_viewer"} diff --git a/app/helpers/cms_helper.rb b/app/helpers/cms_helper.rb index f0bba2e..a94e6fc 100644 --- a/app/helpers/cms_helper.rb +++ b/app/helpers/cms_helper.rb @@ -9,11 +9,6 @@ module CmsHelper mime_type.gsub('/', '_').gsub('-', '') end - def pagination_links(collection, options={}) - options = {:previous_label => '« ', :next_label => ' »', :page_links => false}.merge(options) - will_paginate(collection, options) - end - attr_reader :environment def options_for_article(article, tokenized_children=nil) diff --git a/app/helpers/forum_helper.rb b/app/helpers/forum_helper.rb index a82d2dc..a2ff7d9 100644 --- a/app/helpers/forum_helper.rb +++ b/app/helpers/forum_helper.rb @@ -10,10 +10,8 @@ module ForumHelper end def list_forum_posts(articles) - pagination = will_paginate(articles, { - :param_name => 'npage', - :previous_label => _('« Newer posts'), - :next_label => _('Older posts »') + pagination = pagination_links(articles, { + :param_name => 'npage' }) content = [content_tag('tr', content_tag('th', _('Discussion topic')) + diff --git a/public/stylesheets/content/blog.scss b/public/stylesheets/content/blog.scss index 7b3c7ee..3f9ad6e 100644 --- a/public/stylesheets/content/blog.scss +++ b/public/stylesheets/content/blog.scss @@ -34,7 +34,7 @@ #content .blog-post .publishing-info { text-align: left; } -#content #article .pagination .prev_page { +#content #article .pagination .previous_page { position: absolute; left: 0; } @@ -42,7 +42,7 @@ position: absolute; right: 0; } -.msie6 #content #article .pagination .prev_page, .msie6 #content #article .pagination .next_page { +.msie6 #content #article .pagination .previous_page, .msie6 #content #article .pagination .next_page { position: relative; display: inline; } diff --git a/public/stylesheets/content/image-gallery.scss b/public/stylesheets/content/image-gallery.scss index 7bff005..3af798a 100644 --- a/public/stylesheets/content/image-gallery.scss +++ b/public/stylesheets/content/image-gallery.scss @@ -48,7 +48,7 @@ .image-gallery-item .uploaded-file { background: transparent url('../images/icons-mime/empty.png') no-repeat 50% 43%; } -#content #article .image-gallery .pagination .prev_page { +#content #article .image-gallery .pagination .previous_page { position: relative; left: auto; right: auto; -- libgit2 0.21.2