Skip to content

Commit

Permalink
json trans
Browse files Browse the repository at this point in the history
  • Loading branch information
bastihilger committed Feb 26, 2022
1 parent 07c0832 commit dd5aee1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Nova/Actions/ToggleRepresentsArtistInCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function name()
{
$category = Category::find($this->categoryId);

return __('nova-cms-portfolio::works.toggle_represents_artist_in_discipline_category').': '.$category->title;
return __('AN/AUS "repräsentiert Künstler in Kategorie"').': '.$category->title;
}

public function handle(ActionFields $fields, Collection $models)
Expand Down
2 changes: 1 addition & 1 deletion src/Nova/Actions/ToggleShowInOverview.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ToggleShowInOverview extends Action
{
public function name()
{
return __('nova-cms-portfolio::works.toggle_show_in_overview');
return __('AN/AUS "In Künstler-Übersicht zeigen, wenn ALLE KATEGORIEN ausgewählt ist"');
}

public function handle(ActionFields $fields, Collection $models)
Expand Down
11 changes: 6 additions & 5 deletions src/Nova/Actions/ToggleShowInOverviewCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Kraenkvisuell\NovaCmsPortfolio\Nova\Actions;

use Laravel\Nova\Actions\Action;
use Illuminate\Support\Collection;
use Laravel\Nova\Fields\ActionFields;
use Kraenkvisuell\NovaCmsPortfolio\Models\Category;
use Laravel\Nova\Actions\Action;
use Laravel\Nova\Fields\ActionFields;

class ToggleShowInOverviewCategory extends Action
{
Expand All @@ -19,19 +19,20 @@ public function __construct($categoryId)
public function name()
{
$category = Category::find($this->categoryId);
return __('nova-cms-portfolio::works.toggle_show_in_overview_category').': '.$category->title;

return __('AN/AUS "In Künstler-Übersicht zeigen, wenn eine einzelne Kategorie ausgewählt ist"').': '.$category->title;
}

public function handle(ActionFields $fields, Collection $models)
{
$work = $models->first();
$categories = $work->show_in_overview_category;

if (!$categories) {
if (! $categories) {
$categories = [];
}

if (!isset($categories[$this->categoryId])) {
if (! isset($categories[$this->categoryId])) {
$categories[$this->categoryId] = true;
} else {
$categories[$this->categoryId] = ! $categories[$this->categoryId];
Expand Down
2 changes: 1 addition & 1 deletion src/Nova/Work.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class="w-auto h-12 mr-1 inline-block"
Line::make('', function () {
if ($this->show_in_overview) {
return '<span class="text-xs font-bold uppercase">'
.__('nova-cms-portfolio::works.show_in_overview')
.__('In Künstler-Übersicht zeigen, wenn ALLE KATEGORIEN ausgewählt ist')
.'</span>';
}

Expand Down

0 comments on commit dd5aee1

Please sign in to comment.