From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3CFD3138A87 for ; Sun, 22 Feb 2015 00:04:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BD13FE07ED; Sun, 22 Feb 2015 00:04:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 64D5EE07ED for ; Sun, 22 Feb 2015 00:04:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 679DF340AEE for ; Sun, 22 Feb 2015 00:04:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0C96012454 for ; Sun, 22 Feb 2015 00:04:26 +0000 (UTC) From: "Alex Legler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alex Legler" Message-ID: <1424563456.62e98a914e6110b50f1c88a5af1a23d3c0f6fcd6.a3li@gentoo> Subject: [gentoo-commits] proj/ag-web:master commit in: views/ X-VCS-Repository: proj/ag-web X-VCS-Files: views/pagination.erb X-VCS-Directories: views/ X-VCS-Committer: a3li X-VCS-Committer-Name: Alex Legler X-VCS-Revision: 62e98a914e6110b50f1c88a5af1a23d3c0f6fcd6 X-VCS-Branch: master Date: Sun, 22 Feb 2015 00:04:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 34d99cc5-a2f3-42b4-99b6-af415b3bd85a X-Archives-Hash: fb107a459291d3867f850299779ffd9e commit: 62e98a914e6110b50f1c88a5af1a23d3c0f6fcd6 Author: Alex Legler a3li li> AuthorDate: Sun Feb 22 00:04:16 2015 +0000 Commit: Alex Legler gentoo org> CommitDate: Sun Feb 22 00:04:16 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/ag-web.git;a=commit;h=62e98a91 more pagination tuning --- views/pagination.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/pagination.erb b/views/pagination.erb index 68d1a6b..af43309 100644 --- a/views/pagination.erb +++ b/views/pagination.erb @@ -13,14 +13,14 @@ <% end %> <% min = [1, current_page - 3].max ; max = [max_pages, current_page + 3].min %> - <% if min > 10 %> + <% if min > 3 %>
  • 1
  • <% end %> <% (min..max).each do |page| %>
  • <%= 'class="active"' %><% end %>><%= page %>
  • <% end %> - <% if (max_pages - max) > 10 %> + <% if (max_pages - max) > 3 %>
  • <%= max_pages %>
  • <% end %>