From a97bfec39ce89b2cb0b1615db3923b538c600c63 Mon Sep 17 00:00:00 2001 From: SansPseudoFix Date: Mon, 16 Mar 2015 19:14:26 +0100 Subject: [PATCH] add option pagination center pagination Fix pagination css Symbols for previous and next modified: app/assets/stylesheets/conversations.scss modified: app/views/conversations/index.haml Add responsive pagination Fix broken pagination modified: app/assets/stylesheets/conversations.scss modified: app/views/conversations/index.haml Fix broken pagination for mobile Mobile pagination Unify desktop and mobile background change background color --- app/assets/stylesheets/conversations.scss | 15 +++++++++++++++ app/assets/stylesheets/mobile/mobile.scss | 16 ++++++++++++++++ app/views/conversations/index.haml | 2 +- app/views/conversations/index.mobile.haml | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/conversations.scss b/app/assets/stylesheets/conversations.scss index c32f6ff77..8f6f871ea 100644 --- a/app/assets/stylesheets/conversations.scss +++ b/app/assets/stylesheets/conversations.scss @@ -180,6 +180,21 @@ a:hover { text-decoration: none; } + .pagination { + margin-left: auto; + margin-right: auto; + text-align: center; + + .disabled a { + background: $background-grey; + } + } + } +} + +@media (max-width: 1354px) { + #left_pane #conversation_inbox .pagination ul > li > a { + padding: 4px 7px; } } diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index d566b4a55..4e7db022e 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -847,6 +847,22 @@ form#new_user.new_user input.btn { text-shadow: 1px 1px 20px rgb(126, 240, 77); } +#conversation_inbox { + .pagination { + margin-left: auto; + margin-right: auto; + text-align: center; + + ul > li > a { + padding: 4px 8px; + } + + .disabled a{ + background: $background-grey; + } + } +} + input#user_password, #user_username, #user_password_confirmation, #user_email { height: 30px; } diff --git a/app/views/conversations/index.haml b/app/views/conversations/index.haml index d064f042f..ecbcb6aff 100644 --- a/app/views/conversations/index.haml +++ b/app/views/conversations/index.haml @@ -21,7 +21,7 @@ - else #no_conversations = t('.no_messages') - = will_paginate @conversations, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer + = will_paginate @conversations, :previous_label => '«', :next_label => '»', :inner_window => 1, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer .span8 - if @conversation diff --git a/app/views/conversations/index.mobile.haml b/app/views/conversations/index.mobile.haml index eb1f5f0ce..57341e0d5 100644 --- a/app/views/conversations/index.mobile.haml +++ b/app/views/conversations/index.mobile.haml @@ -27,4 +27,4 @@ %i = t('.no_messages') - = will_paginate @conversations, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer + = will_paginate @conversations, :previous_label => '«', :next_label => '»', :inner_window => 1, :outer_window => 0, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer