Internal: Minor format code, fix PHP notices.

pull/3466/head
Julio Montoya 4 years ago
parent 4ca1bae200
commit be5baf7bc3
  1. 1
      config/services.yaml
  2. 4
      src/CoreBundle/Controller/ResourceController.php
  3. 2
      src/CoreBundle/Resources/views/Resource/info_ajax.html.twig
  4. 6
      src/CoreBundle/Resources/views/Resource/info_details.html.twig

@ -15,6 +15,7 @@ parameters:
# router.request_context.base_url: '%env(APP_URL_APPEND)%'
# asset.request_context.base_path: '%env(APP_URL_APPEND)%'
# See https://glide.thephpleague.com/1.0/api/quick-reference/
glide_media_filters:
editor_thumbnail:
w: 64

@ -813,7 +813,7 @@ class ResourceController extends AbstractResourceController implements CourseCon
public function viewAction(Request $request, RouterInterface $router): Response
{
$id = $request->get('id');
$filter = $request->get('filter');
$filter = $request->get('filter'); // See filters definitions in /config/services.yml
$mode = $request->get('mode');
$em = $this->getDoctrine();
/** @var ResourceNode $resourceNode */
@ -1178,7 +1178,7 @@ class ResourceController extends AbstractResourceController implements CourseCon
$server = $glide->getServer();
$params = $request->query->all();
// The filter overwrites the params from get
// The filter overwrites the params from GET.
if (!empty($filter)) {
$params = $glide->getFilters()[$filter] ?? [];
}

@ -27,7 +27,7 @@
<img
src="{{ url('chamilo_core_resource_view_file', {
'id': resource.resourceNode.id,
'cid': course.id,
'cid': course ? course.id : 0,
'sid': session ? session.id : 0,
'type' : type,
'tool' : tool

@ -41,7 +41,7 @@
<a class="btn btn-success"
href="{{ url('chamilo_core_resource_view_file', {
'id': resource.resourceNode.id,
'cid': course.id,
'cid': course ? course.id : 0,
'sid': session ? session.id : 0,
'type' : type,
'tool' : tool,
@ -55,7 +55,7 @@
{% if is_granted('EDIT', resource.resourceNode) %}
<a class="btn btn-secondary" href="{{ url('chamilo_core_resource_edit', {
'id': resource.resourceNode.id,
'cid': course.id,
'cid': course ? course.id : 0,
'sid': session ? session.id : 0,
'type' : type,
'tool' : tool,
@ -68,7 +68,7 @@
{% if is_granted('DELETE', resource.resourceNode) %}
<a class="btn btn-danger" href="{{ url('chamilo_core_resource_delete', {
'id': resource.resourceNode.id,
'cid': course.id,
'cid': course ? course.id : 0,
'sid': session ? session.id : 0,
'type' : type,
'tool' : tool,

Loading…
Cancel
Save