codigo actual del servidor, con avances de joan
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<h5 class="mb-0 h6">{{ translate('Attribute Value Information') }}</h5>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-body p-0">
|
||||
|
||||
<form class="p-4" action="{{ route('update-attribute-value', $attribute_value->id) }}" method="POST">
|
||||
<input name="_method" type="hidden" value="POST">
|
||||
<input type="hidden" name="attribute_id" value="{{ $attribute_value->attribute_id }}">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="Attribute Value">
|
||||
{{ translate('Attribute Value') }}
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" placeholder="{{ translate('Attribute Value') }}" id="value"
|
||||
name="value" class="form-control" required value="{{ $attribute_value->value }}">
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="form-group row">
|
||||
<label class="col-sm-3 col-from-label" for="code">
|
||||
{{ translate('Color Code')}}
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" placeholder="{{ translate('Color Code')}}" id="code" name="code" class="form-control" required value="{{ $attribute_value->code }}">
|
||||
</div>
|
||||
</div> --}}
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,105 @@
|
||||
@extends('backend.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="aiz-titlebar text-left mt-2 mb-3">
|
||||
<div class="align-items-center">
|
||||
<h1 class="h3">{{ translate('Attribute Detail') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Small table -->
|
||||
<div class="@if (auth()->user()->can('add_product_attribute_values')) col-lg-7 @else col-lg-12 @endif">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong class="card-title">
|
||||
{{ $attribute->getTranslation('name') }}
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{ translate('Value') }}</th>
|
||||
<th class="text-right">{{ translate('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($all_attribute_values as $key => $attribute_value)
|
||||
<tr>
|
||||
<td>{{ $key + 1 }}</td>
|
||||
<td>
|
||||
{{ $attribute_value->value }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@can('edit_product_attribute_value')
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm"
|
||||
href="{{ route('edit-attribute-value', ['id' => $attribute_value->id]) }}"
|
||||
title="{{ translate('Edit') }}">
|
||||
<i class="las la-edit"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('delete_product_attribute_value')
|
||||
<a href="#"
|
||||
class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete"
|
||||
data-href="{{ route('destroy-attribute-value', $attribute_value->id) }}"
|
||||
title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@can('add_product_attribute_values')
|
||||
<div class="col-md-5">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Add New Attribute Value') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- Error Meassages -->
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<form action="{{ route('store-attribute-value') }}" method="POST">
|
||||
@csrf
|
||||
<div class="form-group mb-3">
|
||||
<label for="name">{{ translate('Attribute Name') }}</label>
|
||||
<input type="hidden" name="attribute_id" value="{{ $attribute->id }}">
|
||||
<input type="text" placeholder="{{ translate('Name') }}" name=""
|
||||
value="{{ $attribute->name }}"class="form-control" readonly>
|
||||
<input type="hidden" name="attribute_type" value="{{ $attribute->type }}">
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="name">{{ translate('Attribute Value') }}</label>
|
||||
<input type="text" placeholder="{{ translate('Name') }}" id="value" name="value"
|
||||
class="form-control" required>
|
||||
</div>
|
||||
<div class="form-group mb-3 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{ translate('Save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
Reference in New Issue
Block a user