classify admin
This commit is contained in:
132
resources/views/currency/create.blade.php
Normal file
132
resources/views/currency/create.blade.php
Normal file
@@ -0,0 +1,132 @@
|
||||
@extends('layouts.main')
|
||||
@section('title')
|
||||
{{ __('Create Currency') }}
|
||||
@endsection
|
||||
|
||||
@section('page-title')
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 order-md-1 order-last">
|
||||
<h4>@yield('title')</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<section class="section">
|
||||
<div class="buttons">
|
||||
<a class="btn btn-primary" href="{{ route('currency.index') }}">
|
||||
< {{ __('Back to Currencies') }} </a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<form action="{{ route('currency.store') }}" class="create-form" data-parsley-validate method="POST"
|
||||
data-success-function="afterCustomFieldCreationSuccess" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Create Currency') }}</div>
|
||||
<div class="card-body mt-3">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group mb-3 mandatory">
|
||||
<label for="iso_code">{{ __('ISO Code') }}</label>
|
||||
<input type="text" name="iso_code" id="iso_code" class="form-control"
|
||||
placeholder="e.g. USD, INR" maxlength="3" required pattern="[A-Z]{3}"
|
||||
oninput="this.value = this.value.toUpperCase().replace(/[^A-Z]/g, '')">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3 mandatory">
|
||||
<label for="name">{{ __('Name') }}</label>
|
||||
<input type="text" name="name" id="name" class="form-control"
|
||||
data-parsley-required="true" placeholder="Enter the Currency Name" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3 mandatory">
|
||||
<label for="code">{{ __('Symbol') }}</label>
|
||||
<input type="text" name="symbol" id="code" class="form-control"
|
||||
data-parsley-required="true" placeholder="Currency Symbol" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3 mandatory">
|
||||
<label for="country" class="form-label">{{ __('Country') }}</label>
|
||||
<select class="form-control" id="country_item" name="country_id"
|
||||
data-parsley-required="true">
|
||||
<option value="">--Select Country--</option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country->id }}">
|
||||
{{ $country->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3">
|
||||
<label for="symbol_position"
|
||||
class="form-label">{{ __('Currency Symbol Position') }}</label>
|
||||
<div class="mt-2 d-flex align-items-center">
|
||||
<div class="form-check me-3">
|
||||
<input type="radio" id="currency_symbol_left" name="symbol_position"
|
||||
value="left" class="form-check-input" checked>
|
||||
<label for="currency_symbol_left"
|
||||
class="form-check-label">{{ __('Left') }}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="radio" id="currency_symbol_right" name="symbol_position"
|
||||
value="right" class="form-check-input">
|
||||
<label for="currency_symbol_right"
|
||||
class="form-check-label">{{ __('Right') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="decimal_places" class="form-label">{{ __('Decimal Places') }}</label>
|
||||
<input type="number" name="decimal_places" id="decimal_places" class="form-control"
|
||||
min="0" max="6" placeholder="Ex. 2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="thousand_separator"
|
||||
class="form-label">{{ __('Thousand Separator') }}</label>
|
||||
<input type="text" name="thousand_separator" id="thousand_separator"
|
||||
class="form-control" maxlength="1" placeholder="Ex. ,">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="decimal_separator"
|
||||
class="form-label">{{ __('Decimal Separator') }}</label>
|
||||
<input type="text" name="decimal_separator" id="decimal_separator"
|
||||
class="form-control" maxlength="1" placeholder="Ex. .">
|
||||
</div>
|
||||
</div>
|
||||
{{-- </div>
|
||||
@endforeach --}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 text-end">
|
||||
<input type="submit" class="btn btn-primary" value="{{ __('Save and Back') }}">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@section('script')
|
||||
<script>
|
||||
function afterCustomFieldCreationSuccess() {
|
||||
setTimeout(function () {
|
||||
window.location.href = "{{ route('currency.index') }}";
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
143
resources/views/currency/edit.blade.php
Normal file
143
resources/views/currency/edit.blade.php
Normal file
@@ -0,0 +1,143 @@
|
||||
@extends('layouts.main')
|
||||
@section('title')
|
||||
{{ __('Edit Currency') }}
|
||||
@endsection
|
||||
|
||||
@section('page-title')
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 order-md-1 order-last">
|
||||
<h4>@yield('title')</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<section class="section">
|
||||
<div class="buttons">
|
||||
<a class="btn btn-primary" href="{{ route('currency.index') }}">
|
||||
< {{ __('Back to All Currencies') }} </a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<form action="{{ route('currency.update', $currency->id) }}" method="POST" data-parsley-validate
|
||||
enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<input type="hidden" name="edit_data" value={{ $currency->id }}>
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Edit Currency') }}</div>
|
||||
<div class="card-body mt-2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group mb-3 mandatory">
|
||||
<label for="iso_code">{{ __('ISO Code') }}</label>
|
||||
<input type="text" value="{{ $currency->iso_code }}" name="iso_code"
|
||||
id="iso_code" class="form-control" data-parsley-required="true"
|
||||
placeholder="e.g. USD, INR" maxlength="3" required pattern="[A-Z]{3}"
|
||||
oninput="this.value = this.value.toUpperCase().replace(/[^A-Z]/g, '')" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3 mandatory">
|
||||
<label for="name">{{ __('Name') }}</label>
|
||||
<input type="text" value="{{ $currency->name }}" name="name" id="name"
|
||||
class="form-control" data-parsley-required="true"
|
||||
placeholder="Enter the Currency Name" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3 mandatory">
|
||||
<label for="code">{{ __('Symbol') }}</label>
|
||||
<input type="text" value="{{ $currency->symbol }}" name="symbol" id="code"
|
||||
class="form-control" data-parsley-required="true" placeholder="Currency Symbol"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3 mandatory">
|
||||
<label for="country" class="form-label">{{ __('Country') }}</label>
|
||||
<select class="form-control select2" id="country_item" name="country_id"
|
||||
data-parsley-required="true" required>
|
||||
<option value="">--Select Country--</option>
|
||||
@foreach ($countries as $country)
|
||||
<option value="{{ $country->id }}"
|
||||
{{ $currency->country_id == $country->id ? 'selected' : '' }}>
|
||||
{{ $country->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3">
|
||||
<label for="currency_symbol_position"
|
||||
class="form-label">{{ __('Currency Symbol Position') }}</label>
|
||||
<div class="mt-2 d-flex align-items-center">
|
||||
<div class="form-check me-3">
|
||||
<input type="radio" id="currency_symbol_left" name="symbol_position"
|
||||
value="left" class="form-check-input"
|
||||
{{ $currency->symbol_position == 'left' ? 'checked' : '' }}>
|
||||
<label for="currency_symbol_left"
|
||||
class="form-check-label">{{ __('Left') }}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="radio" id="currency_symbol_right" name="symbol_position"
|
||||
value="right" class="form-check-input"
|
||||
{{ $currency->symbol_position == 'right' ? 'checked' : '' }}>
|
||||
<label for="currency_symbol_right"
|
||||
class="form-check-label">{{ __('Right') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="decimal_places" class="form-label">{{ __('Decimal Places') }}</label>
|
||||
<input type="number" name="decimal_places" id="decimal_places" class="form-control"
|
||||
value="{{ $currency->decimal_places ?? 2 }}" min="0" max="6">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="thousand_separator"
|
||||
class="form-label">{{ __('Thousand Separator') }}</label>
|
||||
<input type="text" name="thousand_separator" id="thousand_separator"
|
||||
class="form-control" value="{{ $currency->thousand_separator ?? ',' }}"
|
||||
maxlength="1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="decimal_separator"
|
||||
class="form-label">{{ __('Decimal Separator') }}</label>
|
||||
<input type="text" name="decimal_separator" id="decimal_separator"
|
||||
class="form-control" value="{{ $currency->decimal_separator ?? '.' }}"
|
||||
maxlength="1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 text-end">
|
||||
<input type="submit" class="btn btn-primary" value="{{ __('Save and Back') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@section('script')
|
||||
<script>
|
||||
function afterCustomFieldUpdate() {
|
||||
setTimeout(function () {
|
||||
window.location.href = "{{ route('currency.index') }}";
|
||||
}, 1000)
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
67
resources/views/currency/index.blade.php
Normal file
67
resources/views/currency/index.blade.php
Normal file
@@ -0,0 +1,67 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('title')
|
||||
{{ __('Currency') }}
|
||||
@endsection
|
||||
|
||||
@section('page-title')
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6">
|
||||
<h4>@yield('title')</h4>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 d-flex justify-content-end">
|
||||
<a class="btn btn-primary" href="{{ route('currency.create') }}">{{ __('Create Currency') }}</a>
|
||||
{{-- <div class="col-12 col-md-6 d-flex justify-content-end">
|
||||
<a class="btn btn-primary me-2" href="{{ route('currency.create') }}">{{ __('Create Currency') }}</a>
|
||||
</div> --}}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<section class="section">
|
||||
{{-- <div class="buttons d-flex justify-content-end">
|
||||
|
||||
</div> --}}
|
||||
|
||||
{{-- {{ print_r($currencies) }} --}}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table-borderless table-striped" aria-describedby="mydesc" id="table_list"
|
||||
data-toggle="table" data-url="{{ route('currency.show', 1) }}" data-click-to-select="true"
|
||||
data-side-pagination="server" data-pagination="true" data-page-list="[5, 10, 20, 50, 100, 200]"
|
||||
data-search="true" data-show-columns="true" data-show-refresh="true" data-fixed-columns="true"
|
||||
data-fixed-number="1" data-fixed-right-number="1" data-trim-on-search="false"
|
||||
data-responsive="true" data-sort-name="id" data-sort-order="desc"
|
||||
data-pagination-successively-size="3" data-table="currencies" data-status-column="deleted_at"
|
||||
data-escape="true" data-show-export="true"
|
||||
data-export-options='{"fileName": "currency-list","ignoreColumn": ["operate"]}'
|
||||
data-export-types="['pdf','json', 'xml', 'csv', 'txt', 'sql', 'doc', 'excel']"
|
||||
data-mobile-responsive="true" data-filter-control="true"
|
||||
data-filter-control-container="#filters" data-toolbar="#filters">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th scope="col" data-field="id" data-sortable="true">{{ __('ID') }}</th>
|
||||
<th scope="col" data-field="iso_code" data-sortable="true">{{ __('ISO Code') }}</th>
|
||||
<th scope="col" data-field="name" data-sortable="true">{{ __('Name') }}</th>
|
||||
<th scope="col" data-field="symbol" data-sortable="true">{{ __('Symbol') }}</th>
|
||||
<th scope="col" data-field="symbol_position" data-sortable="true">
|
||||
{{ __('Symbol Position') }}</th>
|
||||
<th scope="col" data-field="country.name" data-sort-name="country_name"
|
||||
data-sortable="true">{{ __('Country') }}
|
||||
</th>
|
||||
@can(['blog-update', 'blog-delete'])
|
||||
<th scope="col" data-escape="false" data-field="operate">{{ __('Action') }}</th>
|
||||
@endcan
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user