Current File : /home/tradevaly/www/resources/views/backend/pages/Banner/home_banner_edit.blade.php |
@extends('backend.ayaan.master')
@push('title') Edit Banner @endpush
@push('style')
@endpush
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-icon card-header-info">
<div class="card-icon">
</div>
<h4 class="card-title">{{translate('EDIT BANNER')}}
</h4>
</div>
<div class="card-body">
<form action="{{ url('b2b/component/banner/home/page/edit/'.$banner->id) }}" method="post" enctype="multipart/form-data">
@csrf
<div class="row">
<div class="col-sm-6">
<div class="mb-3">
<label for="example-datetime-local-input" class="col-form-label">Start</label>
<input class="form-control" type="datetime-local" name="start" id="example-datetime-local-input" value="{{ $banner->start }}">
</div>
</div>
<div class="col-sm-6">
<div class="mb-3">
<label for="example-datetime-local-input" class="col-form-label">End</label>
<input class="form-control" type="datetime-local" name="end" id="example-datetime-local-input" value="{{ $banner->end }}">
</div>
</div>
<div class="col-sm-12">
<div class="mb-3">
<div class="templating-select">
<label class="form-label">User</label>
<select class="form-control select2-templating" name="user_id">
<option value="">Select A User</option>
@foreach($users as $user)
<option value="{{ $user->id }}" {{ $user->id == $banner->user_id ? 'selected':' ' }}>{{ $user->name }}</option>
@endforeach
</select>
</div>
</div>
</div>
<div class="col-md-3 col-sm-4 pb-3">
<h4 class="title">{{translate('Change Image')}}</h4>
<div class="fileinput fileinput-new text-center" data-provides="fileinput">
<div class="fileinput-new thumbnail">
<img src="{{asset('storage/images/admin/banner/'.$banner->image)}}" alt="{{$banner->alt}}" class='img-fluid'>
</div>
<div class="fileinput-preview fileinput-exists thumbnail"></div>
<div class="d-flex">
<span class=" btn-file">
<span class="fileinput-new">{{translate('Select image')}}</span>
<span class="fileinput-exists">{{translate('Change')}}</span>
<input type="file" name="image" />
</span>
<a href="#pablo" class="btn btn-danger fileinput-exists" data-dismiss="fileinput"><i class="fa fa-times"></i> {{translate('Remove')}}</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<input type="text" name="link" class="form-control" value="{{$banner->link}}" required>
</div>
</div><div class="col-md-6">
<div class="form-group">
<label for="metadescription">{{translate('Position')}}</label>
<select name="position" class="form-control">
@if(session()->get('page') == 'home_page')
<option {{ $banner->position == 'top_banner' ? 'selected':'' }} value="top_banner">Top Banner</option>
<option {{ $banner->position == 'after-banner-left' ? 'selected':'' }} value="after-banner-left">After Banner Left</option>
<option {{ $banner->position == 'after-banner-left-center' ? 'selected':'' }} value="after-banner-left-center">After Banner Left Center</option>
<option {{ $banner->position == 'after-banner-right-center' ? 'selected':'' }} value="after-banner-right-center">After Banner Right Center</option>
<option {{ $banner->position == 'after-banner-right' ? 'selected':'' }} value="after-banner-right">After Banner Right</option>
<option {{ $banner->position == 'after-category-left' ? 'selected':'' }} value="after-category-left">After Category Left</option>
<option {{ $banner->position == 'after-category-right' ? 'selected':'' }} value="after-category-right">After Category Right</option>
@elseif(session()->get('page') == 'category_page')
<option {{ $banner->position == 'top_category_banner' ? 'selected':'' }} value="top_category_banner">Top Category</option>
<option {{ $banner->position == 'bottom_category_banner' ? 'selected':'' }} value="bottom_category_banner">Bottom Category</option>
@elseif(session()->get('page') == 'buyers_page')
<option {{ $banner->position == 'top_buyer_banner' ? 'selected':'' }} value="top_buyer_banner">Top Buyers</option>
<option {{ $banner->position == 'bottom_buyer_banner' ? 'selected':'' }} value="bottom_buyer_banner">Bottom Buyers</option>
@elseif(session()->get('page') == 'product_page')
<option {{ $banner->position == 'top_product_banner' ? 'selected':'' }} value="top_product_banner">Top Product</option>
<option {{ $banner->position == 'bottom_product_banner' ? 'selected':'' }} value="bottom_product_banner">Bottom Product</option>
@elseif(session()->get('page') == 'company_page')
<option {{ $banner->position == 'top_company_banner' ? 'selected':'' }} value="top_company_banner">Top Company</option>
<option {{ $banner->position == 'bottom_company_banner' ? 'selected':'' }} value="bottom_company_banner">Bottom Company</option>
@elseif(session()->get('page') == 'manufacture_page')
<option {{ $banner->position == 'top_manufacture_banner' ? 'selected':'' }} value="top_manufacture_banner">Top Manufacture</option>
<option {{ $banner->position == 'bottom_manufacture_banner' ? 'selected':'' }} value="bottom_manufacture_banner">Bottom Manufacture</option>
@endif
</select>
</div>
</div>
@if(session()->get('page') == 'category_page')
<div class="col-sm-12">
<div class="mb-3">
<label for="metadescription">{{translate('Category')}}</label>
<select name="category_id" class="form-control">
<option value="">Select a Category</option>
@foreach($categories as $category)
<option {{ $banner->category_id == $category->id ? "selected":'' }} value="{{ $category->id }}">{{ $category->name }}</option>
@endforeach
</select>
</div>
</div>
@endif
</div>
<button type="submit" class="btn btn-info pull-right">{{translate('Upload')}}</button>
<div class="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
</div>
@stop
@push('script')
<script>
</script>
@endpush