DTL panel - add thumb
This commit is contained in:
parent
24f807abbd
commit
ea6c304072
2 changed files with 15 additions and 1 deletions
|
|
@ -90,7 +90,20 @@ function processDTLProposals($page) {
|
|||
break;
|
||||
}
|
||||
|
||||
if ($DTLProposal) {
|
||||
if ($DTLProposal) {
|
||||
if ($proposalFile->cover()->isNotEmpty()) {
|
||||
$DTLProposal["thumb"] = $proposalFile->cover()->toFile()->thumb([
|
||||
"width" => 200,
|
||||
"format" => "webp"
|
||||
])->url();
|
||||
}
|
||||
if ($proposalPage->views()->isNotEmpty()) {
|
||||
$DTLProposal["thumb"] = $proposalPage->views()->toFile()->thumb([
|
||||
"width" => 200,
|
||||
"format" => "webp"
|
||||
])->url();
|
||||
}
|
||||
|
||||
$numberedGlobalGrade = (int) $proposal->DTLGrade()->value() ?? 0;
|
||||
|
||||
$DTLProposal["grades"] = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue