Started working on tour system
This commit is contained in:
parent
5dc304f29e
commit
00de35ba03
7 changed files with 68 additions and 11 deletions
|
|
@ -50,7 +50,7 @@ class TourController extends Controller
|
|||
*/
|
||||
public function show(Tour $tour)
|
||||
{
|
||||
//
|
||||
return view('tour.show')->with('tour',$tour);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class CreateToursTable extends Migration
|
|||
$table->string('name');
|
||||
$table->text('beschreibung');
|
||||
$table->string('user_id');
|
||||
$table->string('status');
|
||||
$table->boolean('is_cancelled');
|
||||
$table->date('start')->nullable();
|
||||
$table->date('deadline')->nullable();
|
||||
$table->timestamps();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TourSeeder extends Seeder
|
|||
'name' => 'Eifeltour1',
|
||||
'user_id' => 3,
|
||||
'start' => Carbon::parse('2020-11-11'),
|
||||
'status' => 'FINDET STATT',
|
||||
'is_cancelled' => false,
|
||||
'beschreibung' => 'Hier kann ein sehr langer Text stehen.'
|
||||
]);
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ class TourSeeder extends Seeder
|
|||
'user_id' => 2,
|
||||
'beschreibung' => 'Hier kann ein sehr langer Text stehen.',
|
||||
'start' => Carbon::parse('2020-12-01'),
|
||||
'status' => 'FINDET STATT',
|
||||
'is_cancelled' => false,
|
||||
]);
|
||||
|
||||
DB::table('tours')->insert([
|
||||
|
|
@ -33,7 +33,7 @@ class TourSeeder extends Seeder
|
|||
'user_id' => 1,
|
||||
'beschreibung' => 'Hier kann ein wirklich sehr langer Text stehen. <p> </p> Es sind auch mehrere Abschnitte möglich.',
|
||||
'start' => Carbon::parse('2020-12-15'),
|
||||
'status' => 'GECANCELT',
|
||||
'is_cancelled' => true
|
||||
]);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<!-- Styles -->
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/custom.css') }}" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body class="bg" style="padding: 45px 0 0 0;">
|
||||
<div id="app">
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@
|
|||
<div class="container text-primary">
|
||||
.<ul class="list-group offset-2 col-8">
|
||||
@foreach($tours as $tour)
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
{{ $tour->start }} - {{ $tour->name }} [?/?]
|
||||
|
||||
<span class="badge {{ $tour->status=="FINDET STATT" ? "badge-success" : "badge-danger" }} badge-pill">{{ $tour->status }}</span>
|
||||
</li>
|
||||
<a href="/tour/{{$tour->id}}">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
{{ $tour->start }} - {{ $tour->name }} [?/?]
|
||||
<span class="badge {{ $tour->status=="FINDET STATT" ? "badge-success" : "badge-danger" }} badge-pill">{{ $tour->status }}</span>
|
||||
</li>
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
<!--
|
||||
|
|
|
|||
55
motorradig/resources/views/tour/show.blade.php
Normal file
55
motorradig/resources/views/tour/show.blade.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">{{ $tour->name }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<form style="background-color: #fff;" class="text-dark" method="post" action="/tour/store" enctype="multipart/form-data">
|
||||
@csrf
|
||||
|
||||
<div class="form-group" style="display:flex;">
|
||||
<!-- label class="ml-2 mt-4 col-form-label col-form-label-sm" style="width:150px; text-align:left;" for="name"><h4>Name:</h4></label> -->
|
||||
<label class="ml-2 mt-3 col-form-label col-form-label-sm" style="width:180px; text-align:left;font-size:18px;" for="name">Name:</label>
|
||||
<input class="mt-3 mr-2 form-control input-sm" type="text" id="name" name="name" value="{{ old('name') ?? $tour->name }}" required >
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display:flex;">
|
||||
<label class="ml-2 mt-3" style="width:180px; text-align:left;font-size:18px;" for="name">Start:</label>
|
||||
<input class="mt-3 mr-2 form-control input-sm" type="text" id="start" name="start" value="{{ old('start') ?? $tour->start }}" required >
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display:flex;">
|
||||
<label class="ml-2 mt-3" style="width:180px; text-align:left;font-size:18px;" for="name">Anmeldeschluss:</label>
|
||||
<input class="mt-3 mr-2 form-control" type="text" id="anmeldeschluss" style="font-size:10px;" name="start" value="{{ old('anmeldeschluss') ?? $tour->deadline }}" required >
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display:flex;">
|
||||
<label class="ml-2 mt-3" style="width:140px; text-align:left;font-size:18px;" for="name">Storniert:</label>
|
||||
<input class="mt-3 mr-2 form-control" type="checkbox" id="anmeldeschluss" style="font-size:10px;width:20px;" name="anmeldeschluss" value="{{ old('anmeldeschluss') ?? $tour->deadline }}" required >
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="col-12" name="beschreibung" rows="10" cols="50">{{ $tour->beschreibung }}
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-success col-2 mb-2 float-right mr-2">Ok</button>
|
||||
<button type="submit" class="btn btn-danger col-2 mb-2 float-right mr-2">Teilnehmen</button>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -29,7 +29,7 @@ Route::get('/activities', 'PageController@page_activities');
|
|||
|
||||
Route::get('/become_member', function () { return view('users.become_member'); });
|
||||
Route::get('/meetings', function () { return view('meetings'); });
|
||||
Route::get('/tourplan', function () { return view('tourplan'); });
|
||||
Route::get('/tourplan', function () { return view('tourplan'); }); // obsolete, delete
|
||||
|
||||
Route::resource('/member',UserController::class);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue