Skip to content

Commit

Permalink
fix: Do not display document thumbnail controls for audio, video
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Jul 12, 2023
1 parent e5491f5 commit 57bbc85
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion lib/Documents/src/ArrayDocumentFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace RZ\Roadiz\Documents;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use RZ\Roadiz\Documents\Models\DocumentInterface;

/**
Expand Down
6 changes: 2 additions & 4 deletions lib/Documents/src/OptionsResolver/UrlOptionsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class UrlOptionsResolver extends OptionsResolver
{
public function __construct()
{
$this->setDefaults(
[
$this->setDefaults([
'crop' => null,
'fit' => null,
'align' => null,
Expand All @@ -31,8 +30,7 @@ public function __construct()
'contrast' => 0,
'rotate' => 0,
'ratio' => null,
]
);
]);
$this->setAllowedTypes('width', ['int']);
$this->setAllowedTypes('height', ['int']);
$this->setAllowedTypes('crop', ['null', 'string']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public function bulkDownloadAction(Request $request): Response
'sharpen' => 5,
'inline' => false,
'picture' => true,
'controls' => false,
'loading' => 'lazy',
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function duplicatedAction(Request $request): Response
'sharpen' => 5,
'inline' => false,
'picture' => true,
'controls' => false,
'loading' => 'lazy',
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public function indexAction(Request $request, ?int $folderId = null): Response
'sharpen' => 5,
'inline' => false,
'picture' => true,
'controls' => false,
'loading' => 'lazy',
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function unusedAction(Request $request): Response
'sharpen' => 5,
'inline' => false,
'picture' => true,
'controls' => false,
'loading' => 'lazy',
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class DocumentsController extends RozierApp
'sharpen' => 5,
'inline' => false,
'picture' => true,
'controls' => false,
'loading' => 'lazy',
];
private EmbedFinderFactory $embedFinderFactory;
Expand Down

0 comments on commit 57bbc85

Please sign in to comment.