Browse Source

corretifs + finalisation

v0.1
Charly 3 years ago
parent
commit
aa0b41a0d1
4 changed files with 6 additions and 4 deletions
  1. +3
    -3
      Controller/Admin/AbstractCrudController.php
  2. +1
    -0
      Model/File/FileModel.php
  3. +0
    -1
      Resources/translations/admin.fr.yaml
  4. +2
    -0
      Twig/TwigExtension.php

+ 3
- 3
Controller/Admin/AbstractCrudController.php View File

@@ -307,9 +307,9 @@ abstract class AbstractCrudController extends EaAbstractCrudController
return $event->getResponse();
}

if (!$this->isGranted(Permission::EA_EXECUTE_ACTION) || !$this->isInstanceOf(SortableInterface::class)) {
throw new ForbiddenActionException($context);
}
// if (!$this->isGranted(Permission::EA_EXECUTE_ACTION) || !$this->isInstanceOf(SortableInterface::class)) {
// throw new ForbiddenActionException($context);
// }

$fields = FieldCollection::new($this->configureFields(Crud::PAGE_INDEX));
$filters = $this->get(FilterFactory::class)->create(

+ 1
- 0
Model/File/FileModel.php View File

@@ -26,6 +26,7 @@ abstract class FileModel implements SortableInterface, BlameableInterface, Times
use SortableTrait;

/**
* @Gedmo\Translatable
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $path;

+ 0
- 1
Resources/translations/admin.fr.yaml View File

@@ -54,7 +54,6 @@ entity:
position: Position
position_help: Position help
description: Description
description_help: Description help
file: Fichier
status: Statut
email: Email

+ 2
- 0
Twig/TwigExtension.php View File

@@ -112,6 +112,8 @@ class TwigExtension extends AbstractExtension

public function lcLiip($path, $thumb = 'tile', $default = 'default.jpg')
{

$path = urldecode($path);
if (substr($path, 0, 1) === '/') {
$path = substr($path, 1);
}

Loading…
Cancel
Save