Fasse die Bearbeitung in Dialoge und übernimm eine Filmstelle als Titelbild.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
9195cdcd15
commit
c47c3b9b32
9 files changed
+1052
-228
No files matched your search
@@ -205,12 +205,16 @@ public function browse(string $query, string $kind, string $dimension, int $exce
|
||||
$dimensionId = ctype_digit($dimension) ? (int) $dimension : 0;
|
||||
|
||||
if ($kind !== 'modul') {
|
||||
$elements = ContentElementVersion::query()
|
||||
$latestElements = ContentElementVersion::query()
|
||||
->selectRaw('MAX(id)')
|
||||
->where('status', ContentVersionStatus::Bereit)
|
||||
->with('element.editorialContentKind')
|
||||
->whereHas('element', function ($builder) use ($query, $like, $kind, $dimensionId): void {
|
||||
$this->constrainElement($builder, $query, $like, $kind, $dimensionId);
|
||||
})
|
||||
->groupBy('content_element_id');
|
||||
$elements = ContentElementVersion::query()
|
||||
->with('element.editorialContentKind')
|
||||
->whereIn('id', $latestElements)
|
||||
->orderByDesc('id')
|
||||
->limit($limit + 1)
|
||||
->get();
|
||||
@@ -225,10 +229,10 @@ public function browse(string $query, string $kind, string $dimension, int $exce
|
||||
}
|
||||
|
||||
if (in_array($kind, ['alle', 'modul'], true)) {
|
||||
$versions = CompositionVersion::query()
|
||||
$latestCompositions = CompositionVersion::query()
|
||||
->selectRaw('MAX(id)')
|
||||
->where('status', ContentVersionStatus::Bereit)
|
||||
->where('composition_id', '!=', $exceptCompositionId)
|
||||
->with('composition.editorialContentKind')
|
||||
->whereHas('composition', function ($builder) use ($query, $like, $kind, $dimensionId): void {
|
||||
if ($kind === 'modul') {
|
||||
$builder->where('kind', CompositionKind::Uebung);
|
||||
@@ -248,6 +252,10 @@ public function browse(string $query, string $kind, string $dimension, int $exce
|
||||
->orWhere('summary', 'like', $like);
|
||||
});
|
||||
})
|
||||
->groupBy('composition_id');
|
||||
$versions = CompositionVersion::query()
|
||||
->with('composition.editorialContentKind')
|
||||
->whereIn('id', $latestCompositions)
|
||||
->orderByDesc('id')
|
||||
->limit($limit + 1)
|
||||
->get();
|
||||
|
||||
Reference in new issue
Block a user