Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix query and link for featured autor (on homepage) #834

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file[^1].

## [Unreleased]
### Fixed
- homepage featured author images query

## [2.74.1] - 2023-04-15
### Changed
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function (Builder $query) {

$items = $author
->items()
->has('images')
->where('has_image', true)
->inRandomOrder()
->limit(10)
->get();
Expand Down
2 changes: 1 addition & 1 deletion lang/cs/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

'featured_author' => [
'title' => 'Autor týdne',
'button_author' => 'Zobrazit <strong>:count děl</strong> od autora',
'button_artworks' => 'Zobrazit <strong>:count děl</strong> od autora',
'button_more' => 'zobrazit další autory',
],
];
2 changes: 1 addition & 1 deletion lang/en/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

'featured_author' => [
'title' => 'Artist of the week',
'button_author' => 'Browse <strong>:count artworks</strong> by the artist',
'button_artworks' => 'Browse <strong>:count artworks</strong> by the artist',
'button_more' => 'Show more artists',
],
];
2 changes: 1 addition & 1 deletion lang/sk/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

'featured_author' => [
'title' => 'Autor týždňa',
'button_author' => 'Zobraziť <strong>:count diel</strong> od autora',
'button_artworks' => 'Zobraziť <strong>:count diel</strong> od autora',
'button_more' => 'zobraziť ďalších autorov',
],
];
4 changes: 2 additions & 2 deletions resources/views/home/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ class="tw-cursor-pointer hover:tw-underline">{{ $role }}</a>{{ $loop->last ? ''
@endif
</div>
<x-home.button
href="{{ route('frontend.author.detail', $featuredAuthor) }}"
href="{{ route('frontend.catalog.index', ['author' => $featuredAuthor->name]) }}"
class="tw-mt-6">
{!! trans('home.featured_author.button_author', ['count' => $featuredAuthor->items_count]) !!}
{!! trans('home.featured_author.button_artworks', ['count' => $featuredAuthor->items_count]) !!}
</x-home.button>
<br />
<a href="{{ route('frontend.author.index') }}"
Expand Down