Add attachments, more pages
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -6,6 +6,9 @@
|
||||
<div class="form-row justify-content-md-center">
|
||||
<div class="col-4">
|
||||
<select name="location" class="form-control select2-location">
|
||||
@foreach ($locations as $location)
|
||||
<option value="{{ $location->name }}">{{ $location->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -21,9 +24,11 @@
|
||||
@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<button class="btn btn-primary" name="save" type="submit">
|
||||
Save
|
||||
</button>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-primary" name="save" type="submit" style="width:100%">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@include('partials/row', [ 'id' => 'add-template', 'htmlClass' => 'invisible' ])
|
||||
|
18
resources/views/books/show.blade.php
Normal file
18
resources/views/books/show.blade.php
Normal file
@ -0,0 +1,18 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<h3>{{ $book->name }}</h3>
|
||||
<h5>By: {{ $book->authors->pluck('name')->join(', ') }}</h5>
|
||||
<br />
|
||||
@if ($thumbnail = $book->attachment('thumbnail'))
|
||||
<h5>Image</h5>
|
||||
<p>
|
||||
<img src="{{ $thumbnail->url }}" />
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<h5>Location:</h5>
|
||||
<p>
|
||||
{{ $book->location->name }}
|
||||
</p>
|
||||
@endsection
|
0
resources/views/books/table.blade.php
Normal file
0
resources/views/books/table.blade.php
Normal file
@ -1,11 +1,12 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<table class="table table-compact">
|
||||
<table class="table table-compact table-striped">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Authors</th>
|
||||
<th>Location</th>
|
||||
<th>Actions</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rows as $row)
|
||||
@ -13,6 +14,9 @@
|
||||
<td>{{ $row->name }}</td>
|
||||
<td>{{ $row->authors->pluck('name')->join(', ') }}</td>
|
||||
<td>{{ $row->location->name }}</td>
|
||||
<td>
|
||||
<a class="btn btn-info btn-sm" href="{{ route('books.show', $row->id) }}">View</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
@ -21,7 +21,6 @@
|
||||
</main><!-- /.container -->
|
||||
|
||||
<script src="{{ mix('js/app.js') }}"></script>
|
||||
<script src="{{ asset('vendor/datatables/buttons.server-side.js') }}"></script>
|
||||
@stack('scripts')
|
||||
</body>
|
||||
</html>
|
||||
|
21
resources/views/locations/index.blade.php
Normal file
21
resources/views/locations/index.blade.php
Normal file
@ -0,0 +1,21 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<table class="table table-compact">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Actions</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($locations as $row)
|
||||
<tr>
|
||||
<td>{{ $row->name }}</td>
|
||||
<td>
|
||||
<a href="{{ route('locations.show', $row->id) }}" class="btn btn-info btn-sm">View</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $locations->links() }}
|
||||
@endsection
|
24
resources/views/locations/show.blade.php
Normal file
24
resources/views/locations/show.blade.php
Normal file
@ -0,0 +1,24 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<h3>{{ $location->name }}</h3>
|
||||
<table class="table table-compact">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Authors</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rows as $row)
|
||||
<tr data-id="{{ $row->id }}" data-url="{{ route('books.show', $row->id) }}">
|
||||
<td>{{ $row->name }}</td>
|
||||
<td>{{ $row->authors->pluck('name')->join(', ') }}</td>
|
||||
<td>
|
||||
<a class="btn btn-info btn-sm" href="{{ route('books.show', $row->id) }}">View</a>
|
||||
<button class="remove-item btn btn-danger btn-sm">Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $rows->links() }}
|
||||
@endsection
|
@ -11,7 +11,10 @@
|
||||
<a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/add">Add</a>
|
||||
<a class="nav-link" href="{{ route('locations.index') }}">Locations</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('add') }}">Add</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0" action="{{ route('search') }}">
|
||||
|
Reference in New Issue
Block a user