fix pagination on invoice templates page (#2260)
This commit is contained in:
@@ -251,12 +251,15 @@ final class InvoiceController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(path="/template", name="admin_invoice_template", methods={"GET", "POST"})
|
||||
* @Route(path="/template/{page}", requirements={"page": "[1-9]\d*"}, defaults={"page": 1}, name="admin_invoice_template", methods={"GET", "POST"})
|
||||
* @Security("is_granted('manage_invoice_template')")
|
||||
*/
|
||||
public function listTemplateAction(): Response
|
||||
public function listTemplateAction(int $page): Response
|
||||
{
|
||||
$templates = $this->templateRepository->getPagerfantaForQuery(new BaseQuery());
|
||||
$query = new BaseQuery();
|
||||
$query->setPage($page);
|
||||
|
||||
$templates = $this->templateRepository->getPagerfantaForQuery($query);
|
||||
|
||||
return $this->render('invoice/templates.html.twig', [
|
||||
'entries' => $templates,
|
||||
|
||||
Reference in New Issue
Block a user