minor fixes
This commit is contained in:
parent
af73b49cfa
commit
60d74cc88d
3 changed files with 7 additions and 13 deletions
|
|
@ -25,9 +25,11 @@ class TourController extends Controller
|
|||
error_log("Tour:index");
|
||||
$tours=Tour::where('start','>',Carbon::now())->orderBy('start')->get();
|
||||
$participantCount=array();
|
||||
foreach($tours as $tour) {
|
||||
foreach($tours as $key => $tour) {
|
||||
$result = DB::select('select count(*) as cnt from bookings where tour_id=?', [$tour->id]);
|
||||
$participantCount[$tour->id] = $result[0]->cnt;
|
||||
$tours[$key]->start=Tour::toGermanDate($tour->start);
|
||||
$tours[$key]->deadline=Tour::toGermanDate($tour->deadline);
|
||||
}
|
||||
return view('tour.index')->with('tours',$tours)->with('participantCount',$participantCount);
|
||||
}
|
||||
|
|
@ -37,9 +39,11 @@ class TourController extends Controller
|
|||
error_log("Tour:index_old");
|
||||
$tours=Tour::where('start','<',Carbon::now())->orderBy('start')->get();
|
||||
$participantCount=array();
|
||||
foreach($tours as $tour) {
|
||||
foreach($tours as $key => $tour) {
|
||||
$result = DB::select('select count(*) as cnt from bookings where tour_id=?', [$tour->id]);
|
||||
$participantCount[$tour->id] = $result[0]->cnt;
|
||||
$tours[$key]->start=Tour::toGermanDate($tour->start);
|
||||
$tours[$key]->deadline=Tour::toGermanDate($tour->deadline);
|
||||
}
|
||||
return view('tour.index_old')->with('tours',$tours)->with('participantCount',$participantCount);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
<div style="width:100%; height:100vh;font-family:Nunito;font-size: 1.2rem;" id="sample">
|
||||
<div style="width:100%; height:100%;font-family:Nunito;font-size: 1.2rem;" id="sample">
|
||||
{!! $content !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,15 +9,6 @@
|
|||
<span class="offset-1"><a href="/img_storage/pdf/Tourenplan.pdf" class="btn btn-success"><h3>Download</h3></a></span>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="row mb-2">
|
||||
|
||||
<span class="offset-1 col-4 float-left "><a class="btn btn-success" href="/pdf_storage/tourenplan.pdf_storage" class="text-center text-light"><h3>Alte Touren</h3></a></span>
|
||||
<span class="offset-3 float-right"><a href="/pdf_storage/tourenplan.pdf_storage" class="text-center text-light"><h3>Download</h3></a></span>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
<div class="container text-primary" style="display:flex">
|
||||
.<ul class="list-group offset-2 col-8">
|
||||
@foreach($tours as $tour)
|
||||
|
|
@ -40,7 +31,6 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@if(Auth::user()->role=="ADMIN" or Auth::user()->rolde=="MEMBER")
|
||||
<div class="container text-primary">
|
||||
<a href="/tour/create" class="btn btn-danger col-3 mt-2 "><h3>Neue Tour anlegen</h3></a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue