Initial Commit
This commit is contained in:
203
resources/views/livewire/admin/categories.blade.php
Normal file
203
resources/views/livewire/admin/categories.blade.php
Normal file
@@ -0,0 +1,203 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="pd-20 card-box mb-30">
|
||||
<div class="clearfix">
|
||||
<div class="pull-left">
|
||||
<h4 class="h4 text-blue">Haupt Kategorien</h4>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="javascript:;" wire:click="addParentCategory()" class="btn btn-primary btn-sm">Haupt
|
||||
Kategorie hinzufügen.</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive mt-4">
|
||||
<table class="table table-borderless table-striped table-sm">
|
||||
<thead class="bg-secondary text-white">
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Anzahl der Kategorien</th>
|
||||
<th>Actions</th>
|
||||
</thead>
|
||||
<tbody id="sortable_parent_categories">
|
||||
@forelse ($pcategories as $item)
|
||||
<tr data-index="{{ $item->id }}" data-ordering="{{ $item->ordering }}">
|
||||
<td>{{ $item->id }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->children->count() }}</td>
|
||||
<td>
|
||||
<div class="table-actions">
|
||||
<a href="javascript:;" wire:click="editParentCategory({{ $item->id }})"
|
||||
class="text-primary mx-2">
|
||||
<i class="dw dw-edit2"></i>
|
||||
</a>
|
||||
<a href="javascript:;"
|
||||
wire:click="deleteParentCategory({{ $item->id }})"
|
||||
class="text-danger mx-2">
|
||||
<i class="dw dw-delete-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<span class="text-danger">Keine Items gefunden</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-blcok mt-1 text-center">
|
||||
{{ $pcategories->links('livewire::bootstrap') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="pd-20 card-box mb-30">
|
||||
<div class="clearfix">
|
||||
<div class="pull-left">
|
||||
<h4 class="h4 text-blue">Kategorien</h4>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="javascript:;" wire:click="addCategory() " class="btn btn-primary btn-sm">Kategorie
|
||||
hinzufügen.</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive mt-4">
|
||||
<table class="table table-borderless table-striped table-sm">
|
||||
<thead class="bg-secondary text-white">
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Haupt Kategorie</th>
|
||||
<th>Anzahl der Posts</th>
|
||||
<th>Actions</th>
|
||||
</thead>
|
||||
<tbody id="sortable_categories">
|
||||
@forelse ($categories as $item)
|
||||
<tr data-index="{{ $item->id }}" data-ordering="{{ $item->ordering }}">
|
||||
<td>{{ $item->id }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ !is_null($item->parent_category) ? $item->parent_category->name : ' - ' }}
|
||||
</td>
|
||||
<td>{{ $item->posts->count() }}</td>
|
||||
<td>
|
||||
<div class="table-actions">
|
||||
<a href="javascript:;" wire:click="editCategory({{ $item->id }})"
|
||||
class="text-primary mx-2">
|
||||
<i class="dw dw-edit2"></i>
|
||||
</a>
|
||||
<a href="javascript:;" wire:click="deleteCategory({{ $item->id }})"
|
||||
class="text-danger mx-2">
|
||||
<i class="dw dw-delete-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<span class="text-danger">Keine Items gefunden</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-blcok mt-1 text-center">
|
||||
{{ $categories->links('livewire::bootstrap') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div wire:ignore.self class="modal fade" id="pcategory_modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<form class="modal-content"
|
||||
wire:submit="{{ $isUpdateParentCategoryMode ? 'updateParentCategory()' : 'createParentCategory()' }}">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myLargeModalLabel">
|
||||
{{ $isUpdateParentCategoryMode ? 'Update Haupt Kategorie' : 'Haupt Kategorie hinzufügen' }}
|
||||
</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@if ($isUpdateParentCategoryMode)
|
||||
<input type="hidden" wire:model="pcategory_id" />
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label for=""><b>Haupt Kategorie Name</b></label>
|
||||
<input type="text" class="form-control" wire:model="pcategory_name"
|
||||
placeholder="Hauptr Kategorie Namen eingeben" />
|
||||
@error('pcategory_name')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">
|
||||
Schließen
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ $isUpdateParentCategoryMode ? 'Update Haupt Kategorie' : 'Haupt Kategorie erstellen' }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div wire:ignore.self class="modal fade" id="category_modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<form class="modal-content"
|
||||
wire:submit="{{ $isUpdateCategoryMode ? 'updateCategory()' : 'createCategory()' }}">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myLargeModalLabel">
|
||||
{{ $isUpdateParentCategoryMode ? 'Update Kategorie' : 'Kategorie hinzufügen' }}
|
||||
</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@if ($isUpdateCategoryMode)
|
||||
<input type="hidden" wire:model="category_id" />
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label for=""><b>Haupt Kategorie</b></label>
|
||||
<select wire:model="parent" class="custom-select">
|
||||
<option value="0">Unkategoriert</option>
|
||||
@foreach ($pcategories as $item)
|
||||
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('parent')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=""><b>Kategorie Name</b></label>
|
||||
<input type="text" class="form-control" wire:model="category_name"
|
||||
placeholder="Kategorie Namen eingeben" />
|
||||
@error('category_name')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">
|
||||
Schließen
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ $isUpdateCategoryMode ? 'Update Kategorie' : 'Kategorie erstellen' }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
104
resources/views/livewire/admin/posts.blade.php
Normal file
104
resources/views/livewire/admin/posts.blade.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<div>
|
||||
<div class="pd-20 card-box mb-30">
|
||||
<div class="row mb-20">
|
||||
<div class="col-md-4">
|
||||
<label for="search"><b class="text-secondary">Suche:</b></label>
|
||||
<input wire:model.live="search" id="search" type="text" class="form-control"
|
||||
placeholder="Suche Posts..." />
|
||||
</div>
|
||||
@if (auth()->user()->type == 'superAdmin')
|
||||
<div class="col-md-2">
|
||||
<label for="author"><b class="text-secondary">Author:</b></label>
|
||||
<select wire:model.live="author" id="author" class="custom-select form-control">
|
||||
<option value="">Keine Ausgewählt</option>
|
||||
@foreach (App\Models\User::whereHas('posts')->get() as $user)
|
||||
<option value="{{ $user->id }}">{{ $user->name }}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-2">
|
||||
<label for="category"><b class="text-secondary">Kategorie:</b></label>
|
||||
<select wire:model.live="category" id="category" class="custom-select form-control">
|
||||
<option value="">Keine Ausgewählt</option>
|
||||
{!! $categories_html !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="visibility"><b class="text-secondary">Sichtbarkeit:</b></label>
|
||||
<select wire:model.live="visibility" id="visibility" class="custom-select form-control">
|
||||
<option value="">Keine Ausgewählt</option>
|
||||
<option value="public">Öffentlich</option>
|
||||
<option value="private">Privat</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="sort"><b class="text-secondary">Sortiert nach:</b></label>
|
||||
<select wire:model.live="sortBy" id="sort" class="custom-select form-control">
|
||||
<option value="asc">Aufsteigend sortiert</option>
|
||||
<option value="desc">Absteigend sortiert</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-auto table-sm">
|
||||
<thead class="bg-secondary text-white">
|
||||
<th scope="col">#ID</th>
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Titel</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Kategorie</th>
|
||||
<th scope="col">Sichtbar</th>
|
||||
<th scope="col">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($posts as $item)
|
||||
<tr>
|
||||
<td scope="row">{{ $item->id }}</td>
|
||||
<td>
|
||||
<img src="/images/posts/resized/resized_{{ $item->featured_image }}" width="100"
|
||||
alt="{{ $item->featured_image }}" />
|
||||
</td>
|
||||
<td>{{ $item->title }}</td>
|
||||
<td>{{ $item->author->name }}</td>
|
||||
<td>{{ $item->post_category->name }}</td>
|
||||
<td>
|
||||
@if ($item->visibility == 1)
|
||||
<span class="badge badge-pill badge-success">
|
||||
<i class="icon-copy ti-world"></i> Public
|
||||
</span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-warning">
|
||||
<i class="icon-copy ti-lock"></i> Privat
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="table-actions">
|
||||
<a href="{{ route('admin.edit_post', ['id' => $item->id]) }}" data-color="#265ed7"
|
||||
style="color: rgb(38,94,215)">
|
||||
<i class="icon-copy dw dw-edit2"></i>
|
||||
</a>
|
||||
<a href="javascript:;" wire:click="deletePost({{ $item->id }})"
|
||||
data-color="#e95959" style="color: rgb(233,89,89)">
|
||||
<i class="icon-copy dw dw-delete-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<span class="text-danger">Keine Post(s) gefunden! </span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="block mt-1">
|
||||
{{ $posts->links('livewire::bootstrap') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
269
resources/views/livewire/admin/profile.blade.php
Normal file
269
resources/views/livewire/admin/profile.blade.php
Normal file
@@ -0,0 +1,269 @@
|
||||
<div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 mb-30">
|
||||
<div class="pd-20 card-box height-100-p">
|
||||
<div class="profile-photo">
|
||||
<a href="javascript:;"
|
||||
onclick="event.preventDefault();document.getElementById('profilePictureFile').click();"
|
||||
class="edit-avatar"><i class="fa fa-pencil"></i></a>
|
||||
<img src="{{ $user->picture }}" alt="" class="avatar-photo" id="profilePicturePreview"
|
||||
alt="profilePicturePreview" />
|
||||
<input type="file" name="profilePictureFile" id="profilePictureFile" class="d-none"
|
||||
style="opacity: 0" accept=".jpg,.jpeg,.png">
|
||||
</div>
|
||||
<h5 class="text-center h5 mb-0">{{ $user->name }}</h5>
|
||||
<p class="text-center text-muted font-14">
|
||||
{{ $user->email }}
|
||||
</p>
|
||||
<div class="profile-social">
|
||||
<h5 class="mb-20 h5 text-blue">Social Links</h5>
|
||||
<ul class="clearfix">
|
||||
@if (auth()->user()->social_links->facebook_url != '')
|
||||
<li>
|
||||
<a href="{{ auth()->user()->social_links->facebook_url }}" class="btn"
|
||||
data-bgcolor="#3b5998" data-color="#ffffff"><i class="fa fa-facebook"></i></a>
|
||||
</li>
|
||||
@endif
|
||||
@if (auth()->user()->social_links->twitter_url != '')
|
||||
<li>
|
||||
<a href="{{ auth()->user()->social_links->twitter_url }}" class="btn"
|
||||
data-bgcolor="#1da1f2" data-color="#ffffff"><i class="fa fa-twitter"></i></a>
|
||||
</li>
|
||||
@endif
|
||||
@if (auth()->user()->social_links->linkedin_url != '')
|
||||
<li>
|
||||
<a href="{{ auth()->user()->social_links->linkedin_url }}" class="btn"
|
||||
data-bgcolor="#007bb5" data-color="#ffffff"><i class="fa fa-linkedin"></i></a>
|
||||
</li>
|
||||
@endif
|
||||
@if (auth()->user()->social_links->instagram_url != '')
|
||||
<li>
|
||||
<a href="{{ auth()->user()->social_links->instagram_url }}" class="btn"
|
||||
data-bgcolor="#f46f30" data-color="#ffffff"><i class="fa fa-instagram"></i></a>
|
||||
</li>
|
||||
@endif
|
||||
@if (auth()->user()->social_links->youtube_url != '')
|
||||
<li>
|
||||
<a href="{{ auth()->user()->social_links->youtube_url }}" class="btn"
|
||||
data-bgcolor="#ff0000" data-color="#ffffff"><i class="fa fa-youtube"></i></a>
|
||||
</li>
|
||||
@endif
|
||||
@if (auth()->user()->social_links->github_url != '')
|
||||
<li>
|
||||
<a href="{{ auth()->user()->social_links->github_url }}" class="btn"
|
||||
data-bgcolor="#a6a6a6" data-color="#ffffff"><i class="fa fa-github"></i></a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-8 col-lg-8 col-md-8 col-sm-12 mb-30">
|
||||
<div class="card-box height-100-p overflow-hidden">
|
||||
<div class="profile-tab height-100-p">
|
||||
<div class="tab height-100-p">
|
||||
<ul class="nav nav-tabs customtab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a wire:click="selectTab('personal_details')"
|
||||
class="nav-link {{ $tab == 'personal_details' ? 'active' : '' }}" data-toggle="tab"
|
||||
href="#personal_details" role="tab">Personal
|
||||
Details</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a wire:click="selectTab('update_password')"
|
||||
class="nav-link {{ $tab == 'update_password' ? 'active' : '' }}" data-toggle="tab"
|
||||
href="#update_password" role="tab">Update
|
||||
Passwort</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a wire:click="selectTab('social_links')"
|
||||
class="nav-link {{ $tab == 'social_links' ? 'active' : '' }}" data-toggle="tab"
|
||||
href="#social_links" role="tab">Social
|
||||
Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- Timeline Tab start -->
|
||||
<div class="tab-pane fade {{ $tab == 'personal_details' ? 'show active' : '' }} "
|
||||
id="personal_details" role="tabpanel">
|
||||
<div class="pd-20">
|
||||
<form wire:submit="updatePersonalDetails()">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="">Dein Namen<span
|
||||
style="color:red">*</span></label>
|
||||
<input type="text" class="form-control" wire:model="name"
|
||||
placeholder="Dein Namen" />
|
||||
@error('name')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="">Deine E-Mail</label>
|
||||
<input type="email" class="form-control" wire:model="email"
|
||||
disabled placeholder="Deine Email" />
|
||||
@error('email')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="">Benutzername<span
|
||||
style="color:red">*</span></label>
|
||||
<input type="text" class="form-control" wire:model="username"
|
||||
placeholder="Dein Benutzername" />
|
||||
@error('username')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="">Deine Bio</label>
|
||||
<textarea wire:model="bio" cols="4" rows="4" class="form-control" placeholder="Deine Bio"></textarea>
|
||||
@error('bio')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Einstellungen
|
||||
speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Timeline Tab End -->
|
||||
<!-- Tasks Tab start -->
|
||||
<div class="tab-pane fade {{ $tab == 'update_password' ? 'show active' : '' }}"
|
||||
id="update_password" role="tabpanel">
|
||||
<div class="pd-20 profile-task-wrap">
|
||||
<form wire:submit="updatePassword()">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="">Aktuelles Passwort</label>
|
||||
<input type="password" class="form-control"
|
||||
wire:model="current_password"
|
||||
placeholder="Gib dein aktuelles Passwort ein" />
|
||||
|
||||
@error('current_password')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="">Neues Passwort</label>
|
||||
<input type="password" class="form-control"
|
||||
wire:model="new_password"
|
||||
placeholder="Gib dein neues Passwort ein" />
|
||||
|
||||
@error('new_password')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="">Neues Passwort bestötigen</label>
|
||||
<input type="password" class="form-control"
|
||||
wire:model="new_password_confirmation"
|
||||
placeholder="Bestätige dein neues Passwort ein" />
|
||||
|
||||
@error('new_password_confirmation')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Passwort ändern</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Tasks Tab End -->
|
||||
<!-- Setting Tab start -->
|
||||
<div class="tab-pane fade {{ $tab == 'social_links' ? 'show active' : '' }}"
|
||||
id="social_links" role="tabpanel">
|
||||
<div class="pd-20 profile-task-wrap">
|
||||
<form method="POST" wire:submit="updateSocialLinks()">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>Facebook</b></label>
|
||||
<input type="text" class="form-control"
|
||||
wire:model="facebook_url" placeholder="Facebook Url" />
|
||||
@error('facebook_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>Instagram</b></label>
|
||||
<input type="text" class="form-control"
|
||||
wire:model="instagram_url" placeholder="Instagram Url" />
|
||||
@error('instagram_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>YouTube</b></label>
|
||||
<input type="text" class="form-control"
|
||||
wire:model="youtube_url" placeholder="Youtube Url" />
|
||||
@error('youtube_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>LinkedIn</b></label>
|
||||
<input type="text" class="form-control"
|
||||
wire:model="linkedin_url" placeholder="LinkedIn Url" />
|
||||
@error('linkedin_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>Twitter</b></label>
|
||||
<input type="text" class="form-control"
|
||||
wire:model="twitter_url" placeholder="Twitter Url" />
|
||||
@error('twitter_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>GitHub</b></label>
|
||||
<input type="text" class="form-control"
|
||||
wire:model="github_url" placeholder="GitHub Url" />
|
||||
@error('github_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Setting Tab End -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
180
resources/views/livewire/admin/settings.blade.php
Normal file
180
resources/views/livewire/admin/settings.blade.php
Normal file
@@ -0,0 +1,180 @@
|
||||
<div>
|
||||
<div class="tab">
|
||||
<ul class="nav nav-tabs customtab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a wire:click="selectTab('general_settings')"
|
||||
class="nav-link {{ $tab == 'general_settings' ? 'active' : '' }}" data-toggle="tab"
|
||||
href="#general_settings" role="tab" aria-selected="true">Allgemeine Einstellungen</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a wire:click="selectTab('logo_favicon')" class="nav-link {{ $tab == 'logo_favicon' ? 'active' : '' }}"
|
||||
data-toggle="tab" href="#logo_favicon" role="tab" aria-selected="false">Logo &
|
||||
Favicon</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a wire:click="selectTab('social_links')" class="nav-link {{ $tab == 'social_links' ? 'active' : '' }}"
|
||||
data-toggle="tab" href="#social_links" role="tab" aria-selected="false">Social Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade {{ $tab == 'general_settings' ? 'active show' : '' }}" id="general_settings"
|
||||
role="tabpanel">
|
||||
<div class="pd-20">
|
||||
<form wire:submit="updateSiteInfo()">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label><b>Seiten Titel</b><span style="color:red">*</span></label>
|
||||
<input type="text" class="form-control" wire:model="site_title"
|
||||
placeholder="Seiten Titel angeben" />
|
||||
@error('site_title')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for=""><b>Seiten Kontakt E-Mail</b><span
|
||||
style="color:red">*</span></label>
|
||||
<input type="text" class="form-control" wire:model="site_email"
|
||||
placeholder="Kontakt E-Mail Adresse angeben" />
|
||||
@error('site_email')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for=""><b>Seiten Kontakt Telefonnummer</b><small>
|
||||
(optional)</small></label>
|
||||
<input type="text" class="form-control" wire:model="site_phone"
|
||||
placeholder="Kontakt Telefonnummer angeben" />
|
||||
@error('site_phone')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for=""><b>Seiten Meta Keywords</b><small>
|
||||
(optional)</small></label>
|
||||
<input type="text" class="form-control" wire:model="site_meta_keywords"
|
||||
placeholder="Eg: ecommerce, free api, laravel, dropshipping" />
|
||||
@error('site_meta_keywords')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=""><b>Seiten Meta Description</b><small>
|
||||
(optional)</small></label>
|
||||
<textarea class="form-control" rows="4" cols="4" wire:model="site_meta_description"
|
||||
placeholder="Meta Description hier angeben"></textarea>
|
||||
@error('site_meta_description')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">Speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade {{ $tab == 'logo_favicon' ? 'active show' : '' }}" id="logo_favicon"
|
||||
role="tabpanel">
|
||||
<div class="pd-20">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h6>Seiten Logo</h6>
|
||||
<div class="mb-2 mt-1" style="max-width: 200px">
|
||||
<img wire:ignore
|
||||
src="/images/site/{{ isset(settings()->site_logo) ? settings()->site_logo : '' }}"
|
||||
alt="img-thumbnail" class="img-thumbnail" id="preview_site_logo">
|
||||
</div>
|
||||
<form action="{{ route('admin.update_logo') }}" method="post"
|
||||
enctype="multipart/form-data" id="updateLogoForm">
|
||||
@csrf
|
||||
|
||||
<div class="mb-2">
|
||||
<input type="file" name="site_logo" id="profileLogoFile" accept="image/*"
|
||||
class="form-control" />
|
||||
<span class="text-danger ml-1"></span>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Logo ändern</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h6>Seiten Favicon</h6>
|
||||
<div class="mb-2 mt-1" style="max-width: 100px">
|
||||
<img wire:ignore
|
||||
src="/images/site/{{ isset(settings()->site_favicon) ? settings()->site_favicon : '' }}"
|
||||
alt="img-thumbnail" class="img-thumbnail" id="preview_site_favicon">
|
||||
</div>
|
||||
<form action="{{ route('admin.update_favicon') }}" method="POST"
|
||||
enctype="multipart/form-data" id="updateFaviconForm">
|
||||
@csrf
|
||||
<div class="mb-2">
|
||||
<input type="file" name="site_favicon" id="profileFaviconFile"
|
||||
class="form-control" accept="image/png,image/jpeg, image/jpg" />
|
||||
<span class="text-danger
|
||||
ml-1"></span>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Favicon ändern</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade {{ $tab == 'social_links' ? 'active show' : '' }}" id="social_links"
|
||||
role="tabpanel">
|
||||
<div class="pd-20">
|
||||
<form method="POST" wire:submit="updateSiteSocialLinks()">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>Facebook</b></label>
|
||||
<input type="text" class="form-control" wire:model="facebook_url"
|
||||
placeholder="Facebook Url" />
|
||||
@error('facebook_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>Instagram</b></label>
|
||||
<input type="text" class="form-control" wire:model="instagram_url"
|
||||
placeholder="Instagram Url" />
|
||||
@error('instagram_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>LinkedIn</b></label>
|
||||
<input type="text" class="form-control" wire:model="linkedin_url"
|
||||
placeholder="LinkedIn Url" />
|
||||
@error('linkedin_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for=""><b>Twitter (X)</b></label>
|
||||
<input type="text" class="form-control" wire:model="twitter_url"
|
||||
placeholder="Twitter Url" />
|
||||
@error('twitter_url')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
149
resources/views/livewire/admin/slides.blade.php
Normal file
149
resources/views/livewire/admin/slides.blade.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<div>
|
||||
<div class="page-header">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="title">
|
||||
<h4>Slider hinzufügen</h4>
|
||||
</div>
|
||||
<nav aria-label="breadcrumb" role="navigation">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.dashboard') }}">Home</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
Manage Slider
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 text-right">
|
||||
<a href="javascript:;" wire:click="addSlide()" class="btn btn-primary">Slider hinzufügen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-box pd-20 mb-4">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-auto table-sm table-condensed">
|
||||
<thead class="bg-secondary text-white">
|
||||
<th scope="col">#ID</th>
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Link</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Action</th>
|
||||
</thead>
|
||||
<tbody id="sortable_slides">
|
||||
@forelse ($slides as $slide)
|
||||
<tr data-index="{{ $slide->id }}" data-ordering="{{ $slide->ordering }}">
|
||||
<td scope="row">#{{ $slide->id }}</td>
|
||||
<td>
|
||||
<a href="">
|
||||
<img src="/images/slides/{{ $slide->image }}" width="100" alt="img-thumbnail" />
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $slide->heading }}</td>
|
||||
<td><a
|
||||
href="{{ $slide->link ? $slide->link : ' - ' }}">{{ $slide->link ? 'Klick mich' : ' - ' }}</a>
|
||||
</td>
|
||||
<td>
|
||||
@if ($slide->status == 1)
|
||||
<span class="badge badge-pill badge-success">Public</span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-secondary">Unveröffentlicht</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="table-actions">
|
||||
<a href="javascript:;" wire:click="editSlide({{ $slide->id }})"
|
||||
class="text-primary mx-2">
|
||||
<i class="dw dw-edit2"></i>
|
||||
</a>
|
||||
<a href="javascript:;"
|
||||
wire:click="$dispatch('deleteSlide',{id:{{ $slide->id }} })"
|
||||
class="text-danger mx-2">
|
||||
<i class="dw dw-delete-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<span class="text-danger">Keine Slides gefunden</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Slider -->
|
||||
<div wire:ignore.self class="modal fade" id="slide_modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyword="false">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<form class="modal-content" wire:submit="{{ $isUpdateSlideMode ? 'updateSlide()' : 'createSlide()' }}">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myLargeModalLabel">
|
||||
{{ $isUpdateSlideMode ? 'Update Slide' : 'Slide hinzufügen' }}
|
||||
</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@if ($isUpdateSlideMode)
|
||||
<input type="hidden" wire:model="slide_id" />
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label for=""><b>Heading:</b></label>
|
||||
<input type="text" class="form-control" wire:model="slide_heading"
|
||||
placeholder="Enter Slide Heading" />
|
||||
@error('slide_heading')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=""><b>Link:</b></label>
|
||||
<input type="text" class="form-control" wire:model="slide_link"
|
||||
placeholder="Enter Slide Link" />
|
||||
@error('slide_link')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
@if ($selected_slide_image)
|
||||
<div class="d-block" style="max-width: 200px;">
|
||||
<img src="{{ $selected_slide_image }}" alt="img-thumbnail" class="img-thumbnail"
|
||||
style="max-width: 100%; height: auto;" />
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label for=""><b>Image:</b></label>
|
||||
<input type="file" class="form-control" wire:model="slide_image"
|
||||
accept="image/png,image/jpeg, image/jpg" />
|
||||
@error('slide_image')
|
||||
<span class="text-danger ml-1">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox mb-5">
|
||||
<input type="checkbox" class="custom-control-input" id="customCheck"
|
||||
wire:model="slide_status" />
|
||||
<label for="customCheck" class="custom-control-label">
|
||||
Visible on Slider
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ $isUpdateSlideMode ? 'Speichern' : 'Erstellen' }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Slider -->
|
||||
</div>
|
||||
25
resources/views/livewire/admin/top-user-info.blade.php
Normal file
25
resources/views/livewire/admin/top-user-info.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<div>
|
||||
<div class="user-info-dropdown">
|
||||
<div class="dropdown">
|
||||
<a class="dropdown-toggle" href="#" role="button" data-toggle="dropdown">
|
||||
<span class="user-icon">
|
||||
<img src="{{ $user->picture }}" alt="{{ $user->name }}" />
|
||||
</span>
|
||||
<span class="user-name">{{ $user->name }}</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-icon-list">
|
||||
<a class="dropdown-item" href="{{ route('admin.profile') }}"><i class="dw dw-user1"></i>
|
||||
Profile</a>
|
||||
<a class="dropdown-item" href="{{ route('admin.profile') }} "><i class="dw dw-settings2"></i>
|
||||
Einstellung</a>
|
||||
<a class="dropdown-item" href="{{ route('admin.logout') }}"
|
||||
onclick="event.preventDefault(); document.getElementById("logout-form").submit();"><i
|
||||
class="dw dw-logout"></i>
|
||||
Ausloggen</a>
|
||||
<form action="{{ route('admin.logout') }}" id="logout-form" method="POST">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user