From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: GSoC: Adding a web interface similar to the Hydra web interface Date: Thu, 5 Jul 2018 10:27:53 +0200 Message-ID: <20180705102753.6bc57971@scratchpost.org> References: <87tvqxy4i9.fsf@elephly.net> <87in78hxo2.fsf@elephly.net> <878t7xb58o.fsf@elephly.net> <874lijbqvf.fsf@elephly.net> <20180606200210.7a9c4dd6@scratchpost.org> <20180612183504.2621cefa@scratchpost.org> <8736xrd64y.fsf@elephly.net> <8736x8ype9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/l_aymA.cbLz5VjzvyIgC/DW"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fazcW-0003p3-Jv for guix-devel@gnu.org; Thu, 05 Jul 2018 04:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fazcT-00064b-EI for guix-devel@gnu.org; Thu, 05 Jul 2018 04:28:08 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tatiana Sholokhova Cc: guix-devel --Sig_/l_aymA.cbLz5VjzvyIgC/DW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Tatiana, On Wed, 4 Jul 2018 22:54:46 +0200 Tatiana Sholokhova wrote: > If we want to maintain a link to > the previous page we have to filter the database table entries with to > types of filters: one with lower bound on the id, and the other with the > upper bound.=20 Yeah, I know what you mean. I'd suggest one of the following alternatives for implementing "Previous pa= ge": (1) Remember all the page boundaries in the query string (or maybe hidden form elements). So instead of finding out where the beginning of the previous page was all over again just remember it from before. (2) Reverse the ordering in the query and the boundary check and run the query, reverse the result of the query. Handle finished result as befo= re. (3) Just use the browser's back button. In fact, you can just put a "Previous" link that presses the back button via Javascript for the time be= ing. I suggest (3) - and implement one of the others later. > The current implementation of pagination works correctly but it does not > support link to the previous page (first, and next only). Cool! --Sig_/l_aymA.cbLz5VjzvyIgC/DW Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAls91okACgkQ5xo1VCww uqUJFAf+NHia3zY1Rtv4GZBr1GL0rOe1bieC/P0QbAe8klUVarY09bnK5co5WPZ8 XVc4CU+bvO0cW/1wuLovvluc0pQpEk9YSGz/Xg+9HCX7VbLnPEpjsOBK/hUHJvty /yLMu9lCBsNSiH4DkxVjU1xUn/sYJv0VTXQzAWb5Jxy61CsWGFDcum9NnholPA+O 1XHO4mC2LqL6A6E9+OFTN98ulBTezvLzXxdKcdXOGWGGfQp3E+cjRHyk32A2wKI4 1yo7Er12J6ofvqVjOwXBkP4TWXGGWiP1UR9L7YTOa4IFe0beIPQpOzPOL+1ntJsp h7bdO0PLGSKkgfNaL95OQVqzvEdLYw== =TUqQ -----END PGP SIGNATURE----- --Sig_/l_aymA.cbLz5VjzvyIgC/DW--