Skip to content

Commit 3f62380

Browse files
author
Sebastian Fix
committed
wip
1 parent 8f19c24 commit 3f62380

8 files changed

Lines changed: 63 additions & 37 deletions

File tree

app/Http/Controllers/Jobs/JobsIndexController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
use App\Actions\PageAction;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Support\Str;
79
use Illuminate\View\View;
810

911
class JobsIndexController extends Controller
1012
{
1113
/**
1214
* Display the user's profile form.
1315
*/
14-
public function __invoke(): View
16+
public function __invoke(): View|RedirectResponse
1517
{
16-
return view('app.jobs.index')->with([
17-
'page' => (new PageAction(locale: null, routeName: 'jobs.index'))->default(),
18-
]);
18+
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
19+
20+
// @todo Notification
21+
/* return view('app.jobs.index')->with([
22+
'page' => (new PageAction(locale: null, routeName: 'jobs.index'))->default(),
23+
]);*/
1924
}
2025
}

app/Http/Controllers/Legal/PrivacyIndexController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
use App\Actions\PageAction;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Support\Str;
79
use Illuminate\View\View;
810

911
class PrivacyIndexController extends Controller
1012
{
1113
/**
1214
* Display the user's profile form.
1315
*/
14-
public function __invoke(): View
16+
public function __invoke(): View|RedirectResponse
1517
{
16-
return view('app.legal.privacy.index')->with([
17-
'page' => (new PageAction(locale: null, routeName: 'legal.privacy.index'))->default(),
18-
]);
18+
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
19+
20+
// @todo Notification
21+
/* return view('app.legal.privacy.index')->with([
22+
'page' => (new PageAction(locale: null, routeName: 'legal.privacy.index'))->default(),
23+
]);*/
1924
}
2025
}

app/Http/Controllers/Legal/TermsIndexController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
use App\Actions\PageAction;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Support\Str;
79
use Illuminate\View\View;
810

911
class TermsIndexController extends Controller
1012
{
1113
/**
1214
* Display the user's profile form.
1315
*/
14-
public function __invoke(): View
16+
public function __invoke(): View|RedirectResponse
1517
{
16-
return view('app.legal.terms.index')->with([
17-
'page' => (new PageAction(locale: null, routeName: 'legal.terms.index'))->default(),
18-
]);
18+
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
19+
20+
// @todo Notification
21+
/* return view('app.legal.terms.index')->with([
22+
'page' => (new PageAction(locale: null, routeName: 'legal.terms.index'))->default(),
23+
]);*/
1924
}
2025
}

app/Http/Controllers/Media/MediaIndexController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
use App\Actions\PageAction;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Support\Str;
79
use Illuminate\View\View;
810

911
class MediaIndexController extends Controller
1012
{
1113
/**
1214
* Display the user's profile form.
1315
*/
14-
public function __invoke(): View
16+
public function __invoke(): View|RedirectResponse
1517
{
16-
return view('app.media.index')->with([
17-
'page' => (new PageAction(locale: null, routeName: 'media.index'))->default(),
18-
]);
18+
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
19+
20+
// @todo Notification
21+
/* return view('app.media.index')->with([
22+
'page' => (new PageAction(locale: null, routeName: 'media.index'))->default(),
23+
]);*/
1924
}
2025
}

app/Http/Controllers/Sitemap/SitemapController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ class SitemapController extends Controller
2323
'products.index',
2424
'services.index',
2525
'contact.index',
26+
'legal.terms.index',
2627
'legal.imprint.index',
28+
'legal.privacy.index',
29+
'jobs.index',
2730
];
2831

2932
protected const array DEFAULT_LOCALES = [

lang/de_CH.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"Headquarter": "Hauptsitz",
2121
"Imprint": "Impressum",
2222
"Info(at)paperflakes.ch": "Info(at)paperflakes.ch",
23-
"Jobs": "Jobs",
23+
"Jobs": "Stellen",
2424
"Language": "Sprache",
2525
"Last updated at": "Zuletzt aktualisiert am",
2626
"Last updated at: :date": "Zuletzt aktualisiert am: :date",

resources/views/layouts/_partials/_footer.blade.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,26 @@ classAttributes="text-lg"/>
4242
<x-a :href="localized_route('contact.index')" label="{{ __('Contact') }}"
4343
classAttributes="text-lg"/>
4444
</li>
45-
{{-- <li>
46-
<x-a :href="localized_route('jobs.index')" label="{{ __('Jobs') }}" classAttributes="text-lg"/>
47-
</li>--}}
48-
{{-- <li>
49-
<x-a :href="localized_route('media.index')" label="{{ __('Media') }}" classAttributes="text-lg"/>
50-
</li>--}}
45+
<li>
46+
<x-a :href="localized_route('media.index')" label="{{ __('Media') }}"
47+
classAttributes="text-lg"/>
48+
</li>
49+
<li>
50+
<x-a :href="localized_route('jobs.index')" label="{{ __('Jobs') }}" classAttributes="text-lg"/>
51+
</li>
5152
</ul>
5253
</div>
5354
<div>
5455
<h2 class="text-black font-semibold">{{ __('Legal') }}</h2>
5556
<ul class="mt-1 list-none text-base">
56-
{{-- <li>
57-
<x-a :href="localized_route('legal.privacy.index')" label="{{ __('Privacy') }}" classAttributes="text-lg"/>
58-
</li>--}}
59-
{{-- <li>
60-
<x-a :href="localized_route('legal.terms.index')" label="{{ __('Terms') }}" classAttributes="text-lg"/>
61-
</li>--}}
57+
<li>
58+
<x-a :href="localized_route('legal.terms.index')" label="{{ __('Terms') }}"
59+
classAttributes="text-lg"/>
60+
</li>
61+
<li>
62+
<x-a :href="localized_route('legal.privacy.index')" label="{{ __('Privacy') }}"
63+
classAttributes="text-lg"/>
64+
</li>
6265
<li>
6366
<x-a :href="localized_route('legal.imprint.index')" label="{{ __('Imprint') }}"
6467
classAttributes="text-lg"/>

routes/web.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
Route::get('services/{locale}/{service}', ServicesShowController::class)->name('services.show');
3131
Route::get('products', ProductsIndexController::class)->name('products.index');
3232
Route::get('products/{locale}/{product}', ProductsShowController::class)->name('products.show');
33-
// Route::get('legal/privacy', PrivacyIndexController::class)->name('legal.privacy.index');
34-
// Route::get('legal/terms', TermsIndexController::class)->name('legal.terms.index');
33+
Route::get('legal/privacy', PrivacyIndexController::class)->name('legal.privacy.index');
3534
Route::get('legal/imprint', ImprintIndexController::class)->name('legal.imprint.index');
36-
// Route::get('jobs', JobsIndexController::class)->name('jobs.index');
37-
// Route::get('media', MediaIndexController::class)->name('media.index');
35+
Route::get('legal/terms', TermsIndexController::class)->name('legal.terms.index');
36+
Route::get('jobs', JobsIndexController::class)->name('jobs.index');
37+
Route::get('media', MediaIndexController::class)->name('media.index');
3838
Route::get('contact', ContactIndexController::class)->name('contact.index');
3939
});
4040

@@ -46,11 +46,11 @@
4646
Route::get('dienstleistungen/{locale}/{service}', ServicesShowController::class)->name('services.show');
4747
Route::get('produkte', ProductsIndexController::class)->name('products.index');
4848
Route::get('produkte/{locale}/{product}', ProductsShowController::class)->name('products.show');
49-
// Route::get('rechtlichtes/datenschutz', PrivacyIndexController::class)->name('legal.privacy.index');
50-
// Route::get('rechtlichtes/geschaeftsbedingungen', TermsIndexController::class)->name('legal.terms.index');
49+
Route::get('rechtlichtes/datenschutz', PrivacyIndexController::class)->name('legal.privacy.index');
5150
Route::get('rechtlichtes/impressum', ImprintIndexController::class)->name('legal.imprint.index');
52-
// Route::get('stellen', JobsIndexController::class)->name('jobs.index');
53-
// Route::get('medien', MediaIndexController::class)->name('media.index');
51+
Route::get('rechtlichtes/geschaeftsbedingungen', TermsIndexController::class)->name('legal.terms.index');
52+
Route::get('stellen', JobsIndexController::class)->name('jobs.index');
53+
Route::get('medien', MediaIndexController::class)->name('media.index');
5454
Route::get('kontakt', ContactIndexController::class)->name('contact.index');
5555
});
5656

0 commit comments

Comments
 (0)