Added Production build.

This commit is contained in:
2021-02-24 10:01:35 +01:00
commit 1e27c950c5
140 changed files with 14022 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<x-layout>
<div class="container">
<table class="table">
<tr>
<th>Titel</th>
<th>Bruger</th>
<th>Status</th>
<th>Rediger</th>
<th>Slet</th>
</tr>
@foreach($posts as $post)
<tr>
<td>{{ $post->title }}</td>
<td>{{ $post->user->username }}</td>
<td>{{ $post->status->name }}</td>
<td>
<a href="/admin/posts/{{ $post->id }}/edit"><ion-icon name="pencil-outline"></ion-icon></a>
</td>
<td>
<form action="/admin/posts/{{ $post->id }}/" method="post">
@method('delete')
@csrf
<button type="submit"><ion-icon name="trash-outline"></ion-icon></button>
</form>
</td>
</tr>
@endforeach
</table>
</div>
</x-layout>
+99
View File
@@ -0,0 +1,99 @@
<x-layout>
<div class="container">
@isset($success)
<div class="alert alert-success" role="alert">{{ $success }}</div>
@endisset
@isset($post)
<div class="card rounded shadow mt-2 mr-5 ml-5">
<div class="card-body">
<h2>Rediger Opslag</h2>
<form action="" method="post" enctype="multipart/form-data">
@method("put")
@csrf
<div class="mb-3">
<label for="title" class="form-label">Titel</label>
<input type="text" class="form-control" id="title" name="title" value="{{ $post->title }}" required>
@error('title')
{{ $message }}
@enderror
</div>
<div class="mb-3">
<label for="occupation" class="form-label">Stilling</label>
<select id="occupation" class="form-control" name="occupation_id">
@foreach($occupations as $occupation)
@if($occupation->id == $post->occupation->id)
<option value="{{ $occupation->id }}" selected>{{ $occupation->name }}</option>
@else
<option value="{{ $occupation->id }}">{{ $occupation->name }}</option>
@endif
@endforeach
</select>
@error('occupation_id')
{{ $message }}
@enderror
</div>
<div class="mb-3">
<label for="text">Beskrivelse</label>
<textarea name="text" id="text" style="width: 100%; height: 150px;">{{ $post->text }}</textarea>
@error('text')
{{ $message }}
@enderror
</div>
<div class="mb-3">
<label for="file">Upload (valgfri)</label>
<input type="file" class="form-control" id="file" name="file">
@error('file')
{{ $message }}
@enderror
</div>
<div class="mb-3">
<label for="state">Status</label>
<select id="state" class="form-control" name="state_id">
@foreach($states as $state)
@if($state->id == $post->status->id)
<option value="{{ $state->id }}" selected>{{ $state->name }}</option>
@else
<option value="{{ $state->id }}">{{ $state->name }}</option>
@endif
@endforeach
</select>
@error('state_id')
{{ $message }}
@enderror
</div>
<div class="row mb-3">
<div class="col">
<label for="time">Tid</label>
<input type="number" class="form-control" id="time" name="time" value="{{ $post->time }}" required>
@error('time')
{{ $message }}
@enderror
</div>
<div class="col">
<label for="format">Format</label>
<select id="format" class="form-control" name="time_period_id">
@foreach($formats as $format)
@if($format->id == $post->timePeriod->id)
<option value="{{ $format->id }}" selected>{{ $format->name }}</option>
@else
<option value="{{ $format->id }}">{{ $format->name }}</option>
@endif
@endforeach
</select>
@error('time_period_id')
{{ $message }}
@enderror
</div>
</div>
<button type="submit" class="btn btn-primary">Opdater</button>
</form>
</div>
</div>
@endisset
</div>
</x-layout>
+39
View File
@@ -0,0 +1,39 @@
<x-layout>
<div class="container">
@isset($success)
<div class="alert alert-success" role="alert">{{ $success }}</div>
@endisset
@isset($user)
<div class="card rounded shadow mt-2 mr-5 ml-5">
<div class="card-body">
<h2>Rediger Bruger</h2>
<form action="" method="post">
@method("put")
@csrf
<div class="mb-3">
<p>For at ændre dine oplysninger bedes du kontakte serverrummet, da det er dem der håndterer brugerne.</p>
</div>
@admin
<div class="mb-3">
<label for="roles" class="form-label">Rolle</label>
<select id="roles" class="form-control" name="role_id">
@foreach($roles as $role)
@if($role->id == $user->role->id)
<option value="{{ $role->id }}" selected>{{ $role->name }}</option>
@else
<option value="{{ $role->id }}">{{ $role->name }}</option>
@endif
@endforeach
</select>
</div>
@endadmin
<button type="submit" class="btn btn-primary">Opdater</button>
</form>
</div>
</div>
@endisset
</div>
</x-layout>
+28
View File
@@ -0,0 +1,28 @@
<x-layout>
<div class="container">
<table class="table">
<tr>
<th>Navn</th>
<th>Rolle</th>
<th>Rediger</th>
{{-- <th>Slet</th>--}}
</tr>
@foreach($users as $user)
<tr>
<td>{{ $user->username }}</td>
<td>{{ $user->role->name }}</td>
<td>
<a href="/admin/users/{{ $user->id }}/edit"><ion-icon name="pencil-outline"></ion-icon></a>
</td>
{{-- <td>--}}
{{-- <form action="/admin/users/{{ $user->id }}/" method="post">--}}
{{-- @method('delete')--}}
{{-- @csrf--}}
{{-- <button type="submit"><ion-icon name="trash-outline"></ion-icon></button>--}}
{{-- </form>--}}
{{-- </td>--}}
</tr>
@endforeach
</table>
</div>
</x-layout>