@@ 26-42 (lines=17) @@ | ||
23 | * |
|
24 | * @Method("GET") |
|
25 | */ |
|
26 | public function indexAction(Request $request) |
|
27 | { |
|
28 | $this->hasPermission(Permissions::CURRENCIES_VIEW); |
|
29 | $query = $this->getRepository()->findAllAvailable(); |
|
30 | $paginator = $this->get('knp_paginator'); |
|
31 | $currencies = $paginator->paginate( |
|
32 | $query, |
|
33 | $request->query->getInt('knp_page', 1), |
|
34 | 20 |
|
35 | ); |
|
36 | ||
37 | $currencies->setTemplate('NewscoopNewscoopBundle:Pagination:pagination_bootstrap3.html.twig'); |
|
38 | ||
39 | return $this->render('NewscoopPaywallBundle:Currency:index.html.twig', array( |
|
40 | 'currencies' => $currencies, |
|
41 | )); |
|
42 | } |
|
43 | ||
44 | /** |
|
45 | * @Route("/admin/paywall_plugin/currencies/create/", name="paywall_plugin_currency_create", options={"expose"=true}) |
@@ 23-37 (lines=15) @@ | ||
20 | /** |
|
21 | * @Route("/admin/paywall_plugin/discounts", options={"expose"=true}) |
|
22 | */ |
|
23 | public function indexAction(Request $request) |
|
24 | { |
|
25 | $this->hasPermission(Permissions::DISCOUNTS_VIEW); |
|
26 | $query = $this->getDiscountRepository()->findActive(); |
|
27 | $paginator = $this->get('knp_paginator'); |
|
28 | $pagination = $paginator->paginate( |
|
29 | $query, |
|
30 | $request->query->getInt('page', 1), |
|
31 | 10 |
|
32 | ); |
|
33 | ||
34 | return $this->render('NewscoopPaywallBundle:Discount:index.html.twig', array( |
|
35 | 'pagination' => $pagination, |
|
36 | )); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @Route("/admin/paywall_plugin/discounts/create/", options={"expose"=true}, name="paywall_plugin_discount_create") |
@@ 25-41 (lines=17) @@ | ||
22 | * |
|
23 | * @Method("GET") |
|
24 | */ |
|
25 | public function indexAction(Request $request) |
|
26 | { |
|
27 | $this->hasPermission(Permissions::PAYMENTS_VIEW); |
|
28 | $query = $this->getRepository()->findAllAvailable(); |
|
29 | $paginator = $this->get('knp_paginator'); |
|
30 | $payments = $paginator->paginate( |
|
31 | $query, |
|
32 | $request->query->getInt('knp_page', 1), |
|
33 | 20 |
|
34 | ); |
|
35 | ||
36 | $payments->setTemplate('NewscoopNewscoopBundle:Pagination:pagination_bootstrap3.html.twig'); |
|
37 | ||
38 | return $this->render('NewscoopPaywallBundle:Payment:index.html.twig', array( |
|
39 | 'payments' => $payments, |
|
40 | )); |
|
41 | } |
|
42 | ||
43 | /** |
|
44 | * @Route("/admin/paywall_plugin/payments/edit/{id}", name="paywall_plugin_payment_edit", options={"expose"=true}) |
@@ 27-43 (lines=17) @@ | ||
24 | * |
|
25 | * @Method("GET") |
|
26 | */ |
|
27 | public function indexAction(Request $request) |
|
28 | { |
|
29 | $this->hasPermission(Permissions::ORDERS_VIEW); |
|
30 | $query = $this->getOrderRepository()->findOrders(); |
|
31 | $paginator = $this->get('knp_paginator'); |
|
32 | $pagination = $paginator->paginate( |
|
33 | $query, |
|
34 | $request->query->getInt('knp_page', 1), |
|
35 | 10 |
|
36 | ); |
|
37 | ||
38 | $pagination->setTemplate('NewscoopNewscoopBundle:Pagination:pagination_bootstrap3.html.twig'); |
|
39 | ||
40 | return $this->render('NewscoopPaywallBundle:UserOrder:index.html.twig', array( |
|
41 | 'pagination' => $pagination, |
|
42 | )); |
|
43 | } |
|
44 | ||
45 | /** |
|
46 | * @Route("/admin/paywall_plugin/orders/{id}", name="paywall_plugin_userorder_show", options={"expose"=true}) |