Skip to content

Commit

Permalink
chore: Improve NodesSources.php getOneDisplayableDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Mar 12, 2024
1 parent b9c0506 commit a8a37cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"require": {
"php": ">=8.1",
"ext-zip": "*",
"doctrine/orm": "~2.17.0",
"doctrine/orm": "~2.19.0",
"guzzlehttp/guzzle": "^7.2.0",
"jms/serializer": "^3.9.0",
"league/flysystem": "^3.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/views/widgets/nodeTree/singleNode.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
data-uk-tooltip="{animation:true}"{%- endif -%}>
{% if not mainNodeTree and not nodeTree.isStackTree %}
{% set thumbnail = source.getOneDisplayableDocument %}
{% if thumbnail and (thumbnail.image or thumbnail.svg) and not thumbnail.private %}
{% if thumbnail %}
<figure class="nodetree-element-img">
{{ thumbnail|display({"fit":"60x60", "quality":80}) }}
{{ thumbnail|display({"fit":"60x60", "quality": 70}) }}
</figure>
{% endif %}
{% endif %}
Expand Down
3 changes: 1 addition & 2 deletions src/Widgets/NodeTreeWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,13 @@ protected function getListManager(
/*
* Stored in session
*/
$sessionListFilter = new SessionListFilters(static::SESSION_ITEM_PER_PAGE);
$sessionListFilter = new SessionListFilters(self::SESSION_ITEM_PER_PAGE);
$sessionListFilter->handleItemPerPage($this->getRequest(), $listManager);
} else {
$listManager->setItemPerPage(99999);
$listManager->handle(true);
}


if ($subRequest) {
$listManager->disablePagination();
}
Expand Down

0 comments on commit a8a37cf

Please sign in to comment.