restore composer.json, add mysqli extension
This commit is contained in:
114
resources/views/dashboard/products/index/filter.blade.php
Executable file
114
resources/views/dashboard/products/index/filter.blade.php
Executable file
@@ -0,0 +1,114 @@
|
||||
<div class="col-md-12">
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="collapse-margin">
|
||||
<div class="card-header" id="headingOne" data-toggle="collapse" role="button" data-target="#collapseOne"
|
||||
aria-expanded="false" aria-controls="collapseOne">
|
||||
<span class="lead collapse-title">
|
||||
<i class="fa fa-filter"></i> @lang('admin.orders.Filter')
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<form method="get" action="{{ route('dashboard.product.search') }}">
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label for="id">@lang('admin.products.product_Id')</label>
|
||||
<input type="number" id="id" class="form-control"
|
||||
value="{{ request()->get('id') }}" placeholder="@lang('admin.products.product_Id')"
|
||||
name="id">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label for="name">@lang('admin.products.name')</label>
|
||||
<input type="text" id="name" class="form-control"
|
||||
value="{{ request()->get('name') }}" placeholder="@lang('admin.products.name')"
|
||||
name="name">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label for="category">@lang('admin.categories.title')</label>
|
||||
<select class="form-control" id="category" name="category">
|
||||
<option selected disabled>@lang('admin.categories.Not selected')</option>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}"
|
||||
@if (request('category') == $category->id) selected @endif>
|
||||
{{ $category->getName() }}
|
||||
</option>
|
||||
|
||||
@foreach ($category->parents as $parent)
|
||||
<option value="{{ $parent->id }}"
|
||||
@if (request('category') == $parent->id) selected @endif>
|
||||
{{ $parent->getName() }}
|
||||
</option>
|
||||
|
||||
@foreach ($parent->parents as $parentt)
|
||||
<option value="{{ $parentt->id }}"
|
||||
@if (request('category') == $parentt->id) selected @endif>
|
||||
{{ $parentt->getName() }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label for="in_stock">@lang('admin.products.In stock')</label>
|
||||
<select class="form-control" id="in_stock" name="in_stock">
|
||||
<option selected value="2">@lang('admin.categories.Not selected')</option>
|
||||
<option value="1" @if (request('in_stock') == '1') selected @endif>
|
||||
@lang('admin.products.In stock')</option>
|
||||
<option value="0" @if (request('in_stock') == '0') selected @endif>
|
||||
@lang('admin.products.not available')
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label for="published">@lang('admin.products.Moderation status')</label>
|
||||
<select class="form-control" id="published" name="published">
|
||||
<option selected disabled>@lang('admin.categories.Not selected')</option>
|
||||
<option value="1" @if (request('published') == '1') selected @endif>
|
||||
@lang('admin.products.published')
|
||||
</option>
|
||||
<option value="2" @if (request('published') == '2') selected @endif>
|
||||
@lang('admin.products.not_published')
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label for="article_number">@lang('admin.orders.article_number')</label>
|
||||
<input type="text" id="article_number" class="form-control"
|
||||
value="{{ request()->get('article_number') }}" placeholder="@lang('admin.orders.article_number')"
|
||||
name="article_number">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-primary mr-1 mb-1 waves-effect waves-light"><i
|
||||
class="fa fa-filter"></i> @lang('admin.products.Apply')</button>
|
||||
<a href="{{ route('dashboard.products') }}"
|
||||
class="btn btn-outline-warning mr-1 mb-1 waves-effect waves-light">@lang('admin.products.Reset')</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
24
resources/views/dashboard/products/index/header.blade.php
Executable file
24
resources/views/dashboard/products/index/header.blade.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<div class="col-md-12 mb-1">
|
||||
@can('create', 'products')
|
||||
<a href="{{ route('dashboard.product.store') }}" class="btn btn-icon btn-success float-right">
|
||||
<i class="feather icon-plus"></i> @lang('admin.add')
|
||||
</a>
|
||||
@endcan
|
||||
|
||||
<a href="{{ route('dashboard.products.import') }}" class="btn btn-icon btn-primary float-right mr-1">
|
||||
<i class="feather icon-inbox"></i> Import
|
||||
</a>
|
||||
|
||||
<a href="{{ route('dashboard.products.export') }}" class="btn btn-icon btn-warning float-right mr-1">
|
||||
<i class="feather icon-download"></i> Export
|
||||
</a>
|
||||
|
||||
<form action="{{ route('dashboard.products') }}" class="col-2" method="get" id="paginate_id">
|
||||
<select name="paginate" class="form-control" onchange="this.form.submit()">
|
||||
<option disabled selected>Отображать по</option>
|
||||
<option @if (!empty(request()->get('paginate')) && request()->get('paginate') == 10) selected @endif>10</option>
|
||||
<option @if (!empty(request()->get('paginate')) && request()->get('paginate') == 20) selected @endif>20</option>
|
||||
<option @if (!empty(request()->get('paginate')) && request()->get('paginate') == 50) selected @endif>50</option>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
27
resources/views/dashboard/products/index/script.blade.php
Executable file
27
resources/views/dashboard/products/index/script.blade.php
Executable file
@@ -0,0 +1,27 @@
|
||||
@push('js')
|
||||
<script>
|
||||
// Listen for click on toggle checkbox
|
||||
$('#select-all').click(function(event) {
|
||||
if (this.checked) {
|
||||
// Iterate each checkbox
|
||||
$(':checkbox').each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$(':checkbox').each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#show-action").hide();
|
||||
|
||||
$(".change-check").change(function() {
|
||||
$("#show-action").show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
21
resources/views/dashboard/products/index/speedbar.blade.php
Executable file
21
resources/views/dashboard/products/index/speedbar.blade.php
Executable file
@@ -0,0 +1,21 @@
|
||||
@section('title', trans('admin.products.title') . ' - ')
|
||||
@section('speedbar')
|
||||
<div class="content-header row">
|
||||
<div class="content-header-left col-md-9 col-12 mb-2">
|
||||
<div class="row breadcrumbs-top">
|
||||
<div class="col-12">
|
||||
<h2 class="content-header-title float-left mb-0">@lang('admin.products.title')</h2>
|
||||
<div class="breadcrumb-wrapper col-12">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item "><a href="{{ route('dashboard') }}">@lang('admin.home')</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
@lang('admin.products.title')
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
151
resources/views/dashboard/products/index/table.blade.php
Executable file
151
resources/views/dashboard/products/index/table.blade.php
Executable file
@@ -0,0 +1,151 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<form method="post" action="{{ route('dashboard.products.mass.action') }}">
|
||||
@csrf
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
@can('delete', 'products')
|
||||
<th scope="col" width="50" class="text-right">
|
||||
<div class="form-group text-right">
|
||||
<fieldset class="checkbox">
|
||||
<div class="vs-checkbox-con vs-checkbox-primary">
|
||||
<input type="checkbox" name="prod_id[]" class="change-check"
|
||||
id="select-all">
|
||||
<span class="vs-checkbox">
|
||||
<span class="vs-checkbox--check">
|
||||
<i class="vs-icon feather icon-check"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</th>
|
||||
@endcan
|
||||
<th scope="col" width="50">ID</th>
|
||||
<th scope="col" width="50">@lang('admin.products.image')</th>
|
||||
<th scope="col">@lang('admin.products.name')</th>
|
||||
<th scope="col">@lang('admin.products.category')</th>
|
||||
<th scope="col">@lang('admin.products.price')</th>
|
||||
<th scope="col">@lang('admin.orders.count')</th>
|
||||
<th scope="col">@lang('admin.billing.status')</th>
|
||||
<th scope="col" class="text-right">@lang('admin.actions')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($products) == 0)
|
||||
<tr>
|
||||
<td class="text-center" colspan="9">
|
||||
@lang('admin.no_data')
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach ($products as $product)
|
||||
<tr>
|
||||
@can('delete', 'products')
|
||||
<td class="text-right">
|
||||
<div class="form-group">
|
||||
<fieldset class="checkbox">
|
||||
<div class="vs-checkbox-con vs-checkbox-primary">
|
||||
<input type="checkbox" value="{{ $product->id }}" name="prod_id[]"
|
||||
class="change-check" id="checkbox-{{ $loop->iteration }}">
|
||||
<span class="vs-checkbox">
|
||||
<span class="vs-checkbox--check">
|
||||
<i class="vs-icon feather icon-check"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</td>
|
||||
@endcan
|
||||
<td>
|
||||
{{ $product->id }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<img src="{{ $product->getPoster() }}" class="w-100">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if (!$product->isAviable())
|
||||
<i class="fa fa-info-circle text-danger" data-toggle="tooltip"
|
||||
data-original-title="@lang('admin.no_publish')"></i>
|
||||
@endif
|
||||
{{ Str::limit($product->getName(), 30) }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@foreach ($product->categories as $category)
|
||||
{{ $category->getName() }}
|
||||
@endforeach
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if ($product->price_discount)
|
||||
<strike>{{ number_format($product->getPrice(2), 5) }}</strike>
|
||||
USD
|
||||
<br>
|
||||
{{ number_format($product->getDiscountPrice()) }} USD
|
||||
@else
|
||||
{{ number_format($product->getPrice(2), 5) }} USD
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $product->count }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if (!$product->isAviable())
|
||||
@lang('admin.no_publish')
|
||||
@else
|
||||
Опубликовано
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
{{-- <a href="" class="btn btn-icon btn-info btn-sm" data-toggle="tooltip" data-original-title="@lang('admin.see')"> --}}
|
||||
{{-- <i class="feather icon-link"></i> --}}
|
||||
{{-- </a> --}}
|
||||
|
||||
@can('update', 'products')
|
||||
<a href="{{ route('dashboard.product.update', $product->id) }}"
|
||||
class="btn btn-icon btn-primary btn-sm" data-toggle="tooltip"
|
||||
data-original-title="@lang('admin.edit')">
|
||||
<i class="feather icon-edit"></i>
|
||||
</a>
|
||||
@endcan
|
||||
|
||||
@can('delete', 'products')
|
||||
<a href="{{ route('dashboard.product.delete', $product->id) }}"
|
||||
class="btn btn-icon btn-danger btn-sm" data-toggle="tooltip"
|
||||
onclick="return confirm('@lang('admin.are_you_sure')')"
|
||||
data-original-title="@lang('admin.delete')">
|
||||
<i class="feather icon-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer" id="show-action">
|
||||
<button type="submit" name="action" value="delete"
|
||||
class="btn btn-danger">@lang('admin.products.delete_mass')</button>
|
||||
{{-- Product statusini activega o'zgartirish --}}
|
||||
<button type="submit" name="action" value="status-active"
|
||||
class="btn btn-success">@lang('admin.products.status-active')</button>
|
||||
<button type="submit" name="action" value="status-deactivate"
|
||||
class="btn btn-warning">@lang('admin.products.deactivate')</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ $products->appends(request()->query())->links('pagination::bootstrap-4') }}
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user