diff --git a/resources/views/livewire/cities/index.blade.php b/resources/views/livewire/cities/index.blade.php index 5348f8c..3e247ee 100644 --- a/resources/views/livewire/cities/index.blade.php +++ b/resources/views/livewire/cities/index.blade.php @@ -86,13 +86,15 @@ class extends Component {
- @auth + @if(auth()->check()) {{ __('Edit') }} - @endauth + @elseif(!auth()->check()) + {{ __('Log in') }} + @endif
diff --git a/resources/views/livewire/country/chooser.blade.php b/resources/views/livewire/country/chooser.blade.php index 6b756e6..9802699 100644 --- a/resources/views/livewire/country/chooser.blade.php +++ b/resources/views/livewire/country/chooser.blade.php @@ -3,30 +3,36 @@ use Livewire\Volt\Component; new class extends Component { - public $currentRoute = ''; - public $country = 'de'; + public $currentRouteName; + public $currentRouteParams; + public string $currentCountry = 'de'; public function mount(): void { - $this->currentRoute = request()->route()->getName(); - $this->country = request()->route('country'); + $this->currentCountry = request()->route('country', 'de'); + $this->currentRouteName = request()->route()->getName(); + $this->currentRouteParams = request()->route()->parameters(); } - public function updatedCountry() + public function updatedCurrentCountry() { - $this->redirectRoute($this->currentRoute, ['country' => $this->country]); + $this->currentRouteParams['country'] = $this->currentCountry; + $this->redirectRoute($this->currentRouteName, $this->currentRouteParams); } }; ?>
- + @foreach(\WW\Countries\Models\Country::all() as $country)
- {{ str($country->iso_code)->lower() }} + {{ str($country->iso_code)->lower() }} {{ $country->name }}
diff --git a/resources/views/livewire/courses/index.blade.php b/resources/views/livewire/courses/index.blade.php index 051104b..e3f1d36 100644 --- a/resources/views/livewire/courses/index.blade.php +++ b/resources/views/livewire/courses/index.blade.php @@ -115,26 +115,30 @@ class extends Component {
-
- - {{ __('Bearbeiten') }} - -
-
- - {{ __('Neues Event erstellen') }} - -
+ @if(auth()->check() && $course->created_by === auth()->id()) +
+ + {{ __('Bearbeiten') }} + +
+
+ + {{ __('Neues Event erstellen') }} + +
+ @elseif(!auth()->check()) + {{ __('Log in') }} + @endif
diff --git a/resources/views/livewire/dashboard.blade.php b/resources/views/livewire/dashboard.blade.php index 655de57..81539c9 100644 --- a/resources/views/livewire/dashboard.blade.php +++ b/resources/views/livewire/dashboard.blade.php @@ -154,7 +154,7 @@ class extends Component {
-
+
{{ __('Bearbeiten') }} diff --git a/resources/views/livewire/lecturers/index.blade.php b/resources/views/livewire/lecturers/index.blade.php index 60e3016..17269e6 100644 --- a/resources/views/livewire/lecturers/index.blade.php +++ b/resources/views/livewire/lecturers/index.blade.php @@ -139,14 +139,18 @@ class extends Component { - - {{ __('Bearbeiten') }} - + @if(auth()->check() && $lecturer->created_by === auth()->id()) + + {{ __('Bearbeiten') }} + + @elseif(!auth()->check()) + {{ __('Log in') }} + @endif @endforeach diff --git a/resources/views/livewire/meetups/index.blade.php b/resources/views/livewire/meetups/index.blade.php index f936160..4efc9ea 100644 --- a/resources/views/livewire/meetups/index.blade.php +++ b/resources/views/livewire/meetups/index.blade.php @@ -161,21 +161,26 @@ class extends Component {
-
- - {{ __('Bearbeiten') }} - -
-
- - {{ __('Neues Event erstellen') }} - -
+ @if(auth()->check() && $meetup->belongsToMe) +
+ + {{ __('Bearbeiten') }} + +
+
+ + {{ __('Neues Event erstellen') }} + +
+ @elseif(!auth()->check()) + {{ __('Log in') }} + @endif
diff --git a/resources/views/livewire/meetups/landingpage-event.blade.php b/resources/views/livewire/meetups/landingpage-event.blade.php index acd4d1a..5e0fd1a 100644 --- a/resources/views/livewire/meetups/landingpage-event.blade.php +++ b/resources/views/livewire/meetups/landingpage-event.blade.php @@ -157,164 +157,184 @@ class extends Component {
- - - - - {{ $event->start->format('d.m.Y') }} - - -
- -
- -
-
{{ $event->start->format('H:i') }} Uhr
-
{{ $event->start->isoFormat('dddd, D. MMMM YYYY') }}
-
-
- - - @if($event->location) -
- -
-
{{ __('Ort') }}
-
{{ $event->location }}
-
-
- @endif - - - @if($event->description) -
- {{ __('Beschreibung') }} - {{ $event->description }} -
- @endif - - - @if($event->link) -
- - - {{ __('Mehr Informationen') }} - -
- @endif - - -
- {{ __('Teilnahme') }} +
+
+ + + + + {{ $event->start->format('d.m.Y') }} +
+ +
+ +
+
{{ $event->start->format('H:i') }} Uhr
+
{{ $event->start->isoFormat('dddd, D. MMMM YYYY') }}
+
+
- @if(!auth()->check()) - - {{ __('Du bist nicht eingloggt und musst deshalb den Namen selbst eintippen.') }} - - {{ __('Log in') }} - - + + @if($event->location) +
+ +
+
{{ __('Ort') }}
+
{{ $event->location }}
+
+
@endif - - - {{ __('Dein Name') }} - - @error('name') - {{ $message }} - @enderror - + + @if($event->description) +
+ {{ __('Beschreibung') }} + {{ $event->description }} +
+ @endif - -
- - {{ __('Ich komme') }} - - - - {{ __('Vielleicht') }} - - - @if($willShowUp || $perhapsShowUp) - - {{ __('Absagen') }} + + @if($event->link) +
+ + + {{ __('Mehr Informationen') }} - @endif +
+ @endif + + +
+ {{ __('Teilnahme') }} + +
+ + @if(!auth()->check()) + + {{ __('Du bist nicht eingloggt und musst deshalb den Namen selbst eintippen.') }} + + {{ __('Log in') }} + + + @endif + + + + {{ __('Dein Name') }} + + @error('name') + {{ $message }} + @enderror + + + +
+ + {{ __('Ich komme') }} + + + + {{ __('Vielleicht') }} + + + @if($willShowUp || $perhapsShowUp) + + {{ __('Absagen') }} + + @endif +
+
+ + + @if(count($attendees) > 0) +
+ + {{ __('Zusagen') }} ({{ count($attendees) }}) + +
+ @foreach($attendees as $attendee) + @if($attendee['user']) +
+ + {{ $attendee['name'] }} +
+ @else + {{ $attendee['name'] }} + @endif + @endforeach +
+
+ @endif + + + @if(count($mightAttendees) > 0) +
+ + {{ __('Vielleicht') }} ({{ count($mightAttendees) }}) + +
+ @foreach($mightAttendees as $attendee) + @if($attendee['user']) +
+ + {{ $attendee['name'] }} +
+ @else + {{ $attendee['name'] }} + @endif + @endforeach +
+
+ @endif +
+ + + +
+ + + {{ __('Zurück zum Meetup') }} + +
+
+ +
+
+ +
+ {{ $event->meetup->name }} + + {{ $event->meetup->city->name }}, {{ $event->meetup->city->country->name }} + + {{ __('Kalender-Stream-URL kopieren') }}
- - - @if(count($attendees) > 0) -
- - {{ __('Zusagen') }} ({{ count($attendees) }}) - -
- @foreach($attendees as $attendee) - @if($attendee['user']) -
- - {{ $attendee['name'] }} -
- @else - {{ $attendee['name'] }} - @endif - @endforeach -
-
- @endif - - - @if(count($mightAttendees) > 0) -
- - {{ __('Vielleicht') }} ({{ count($mightAttendees) }}) - -
- @foreach($mightAttendees as $attendee) - @if($attendee['user']) -
- - {{ $attendee['name'] }} -
- @else - {{ $attendee['name'] }} - @endif - @endforeach -
-
- @endif
-
- - -
- - - {{ __('Zurück zum Meetup') }} -
diff --git a/resources/views/livewire/meetups/landingpage.blade.php b/resources/views/livewire/meetups/landingpage.blade.php index 9571b6d..db2ca5f 100644 --- a/resources/views/livewire/meetups/landingpage.blade.php +++ b/resources/views/livewire/meetups/landingpage.blade.php @@ -37,7 +37,7 @@ class extends Component {
-
+
@@ -196,10 +196,10 @@ class extends Component {
- + {{-- Events Section --}} @if($events->isNotEmpty())
-
+
{{ __('Kommende Veranstaltungen') }} @if(auth()->user() && auth()->user()->meetups()->find($meetup->id)?->exists)
- @auth + @if(auth()->check()) {{ __('Edit') }} - @endauth + @elseif(!auth()->check()) + {{ __('Log in') }} + @endif
diff --git a/routes/web.php b/routes/web.php index 3bc3e9e..247b1ff 100644 --- a/routes/web.php +++ b/routes/web.php @@ -43,6 +43,11 @@ Volt::route('welcome', 'welcome')->name('welcome'); Route::get('stream-calendar', \App\Http\Controllers\DownloadMeetupCalendar::class) ->name('ics'); +Route::middleware(['auth']) + ->get('dashboard', function () { + return redirect('/de/dashboard'); // Zu /de weiterleiten + }); + Route::middleware([]) ->prefix('/{country:code}') ->group(function () {