Adding ajax pagination

It is not same code. Lowest value for currentPage is 1, you can't be on page 0. Number of pages will be calculated before printing pagination links, so it is connected to limit at all in this case. For an example, to print pagination where we have 121results, 10 is a limit and we should be on 3rd page, we will pass `{'numberOfPages' => 13, 'currentPage' => 3, 'ajaxJS' => 'someAjaxJSFunctionName'}` . Then on button creation we pass text for that button, bool for active/inactive and js function name.