megacommit

This commit is contained in:
Didier Slof 2023-02-02 08:17:38 +01:00
parent 2451ab45cb
commit 34ed81516b
Signed by: didier
GPG key ID: 01E71F18AA4398E5
51 changed files with 1200 additions and 251 deletions

View file

@ -7,8 +7,8 @@
<ul>
@foreach($cinemas as $cinema)
<li>
<a href="{{ route('cinema', ['id' => $cinema->id]) }}">
{{ $cinema->name }}
<a href="{{ route('cinema', ['id' => $cinema->cinema_id]) }}">
{{ $cinema->cinema_name }}
</a>
</li>
@endforeach

View file

@ -10,9 +10,16 @@
<h1>Now playing:</h1>
<hr/>
<div id="movies">
@foreach($movies as $showing)
@endforeach
@foreach($movies as $movie)
<a class="movie" href="{{route('movie', ['id' => $movie->movie_id])}}">
<img src="{{ $movie->movie_image }}" alt="{{ $movie->movie_name }}">
<div class="details">
<h2>{{ $movie->movie_name }}</h2>
<span>{{ $movie->movie_description }}</span>
<p>{{ $movie->movie_length }} minutes</p>
</div>
</a>
@endforeach
</section>
@endsection

View file

@ -0,0 +1,29 @@
@extends('main.layout')
@section('content')
<section>
<h1>{{$movie->movie_name}}</h1>
<hr/>
<div id="movie">
<img src="{{$movie->movie_image}}" alt="{{$movie->movie_name}} Poster" width="200px">
<div class="details">
<span>{{$movie->movie_length}} min</span><br/>
<span>{{$movie->movie_description}}</span>
</div>
</div>
</section>
<section>
<h1>Now playing:</h1>
<hr/>
<div id="showings">
@foreach($movie->showings as $showing)
<a href="/showing/{{$showing->showing_id}}">
<h2>{{$showing->room->cinema->cinema_name}} @ {{$showing->showing_start}} - {{$showing->showing_end()}}</h2>
</a>
@endforeach
</div>
</section>
@endsection

View file

@ -0,0 +1,35 @@
@extends('layout')
@push('head')
<link rel="stylesheet" href="{{asset('css/generic.css')}}">
<link rel="stylesheet" href="{{asset('css/order.css')}}">
<script src="{{asset('js/order.js')}}" defer></script>
@endpush
@section('body')
<h1>Ordering tickets for {{ $showing->movie->movie_name }}</h1>
<hr/>
<div id="showing">
<div class="details">
<span>Cinema: <a
href="/cinema/{{$showing->room->cinema->cinema_id}}">{{$showing->room->cinema->cinema_name}}</a></span><br/>
<span>Room: {{$showing->room->room_name}}</span><br/>
<span>Showing: {{$showing->showing_start}} - {{$showing->showing_end()}}</span><br/>
</div>
</div>
<hr/>
@component('components.seat-chooser', ['room_id' => $showing->room->room_id, 'showing_id' => $showing->showing_id])
@endcomponent
<hr/>
<div id="summary">
<h2>Summary</h2>
<hr/>
<div id="summary-dyn">
No seats selected.
</div>
<hr/>
<div id="summary-total">Total: €0.00</div>
</div>
<button id="order-button" class="button" disabled=true>Order</button>
@endsection

View file

@ -10,7 +10,7 @@
<div class="details">
<span>Cinema: <a
href="/cinema/{{$showing->room->cinema->cinema_id}}">{{$showing->room->cinema->cinema_name}}</a></span><br/>
<span>Showing: {{$showing->showing_start}} - {{$showing->end_time()}}</span><br/>
<span>Showing: {{$showing->showing_start}} - {{$showing->showing_end()}}</span><br/>
</div>
</div>
</section>
@ -30,8 +30,7 @@
<section>
<h1>Tickets:</h1>
<hr/>
<span>Tickets available: {{$showing->tickets_available()}}</span><br/>
<span>Buy tickets?</span>
{{-- todo--}}
<span>Tickets available: {{$showing->tickets_available()}}</span><br/><br/>
<a href="/showing/{{$showing->showing_id}}/order" class="button">Order Tickets</a>
</section>
@endsection