From 268a9190f04f213a6face85a2310c863a11a874c Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Sun, 24 Nov 2019 16:32:34 +0100 Subject: [PATCH] Add icon, fix pagination, fix video preview --- config/services.yaml | 12 +++--- .../Controller/ResourceController.php | 17 ++++++++- .../views/Resource/grid_theme.html.twig | 38 ++++++++++--------- .../Resources/views/Resource/index.html.twig | 36 ++++++++++-------- 4 files changed, 62 insertions(+), 41 deletions(-) diff --git a/config/services.yaml b/config/services.yaml index 3ae024d8e3..0996c37dcb 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -156,12 +156,12 @@ apy_data_grid: # actions_columns_size: -1 # actions_columns_title: "Actions" # actions_columns_separator: "
" -# pagerfanta: -# enable: false -# view_class: "Pagerfanta\View\DefaultView" -# options: -# prev_message: "«" -# next_message: "»" + pagerfanta: + enable: true + view_class: 'Pagerfanta\View\TwitterBootstrap4View' + options: + prev_message: "«" + next_message: "»" # Course settings chamilo_course: diff --git a/src/CoreBundle/Controller/ResourceController.php b/src/CoreBundle/Controller/ResourceController.php index bef611d257..b24902acee 100644 --- a/src/CoreBundle/Controller/ResourceController.php +++ b/src/CoreBundle/Controller/ResourceController.php @@ -121,6 +121,19 @@ class ResourceController extends AbstractResourceController implements CourseCon $source->initQueryBuilder($qb); $grid->setSource($source); + $grid->setRouteUrl( + $this->generateUrl( + 'chamilo_core_resource_list', + [ + 'tool' => $tool, + 'type' => $type, + 'cidReq' => $this->getCourse()->getCode(), + 'id_session' => $this->getSessionId(), + 'id' => $request->get('id'), + ] + ) + ); + $title = $grid->getColumn('title'); $title->setSafe(false); @@ -180,7 +193,7 @@ class ResourceController extends AbstractResourceController implements CourseCon ); return ' -