PATH:
home
/
lab2454c
/
sothebry.softkinesis.com
/
backups
/
core
/
resources
/
views
/
admin
/
specification
@extends('admin.layouts.app') @section('panel') <div class="row"> <div class="col-lg-12"> <div class="card b-radius--10 "> <div class="card-body p-0"> <div class="table-responsive--sm table-responsive"> <table class="table table--light style--two"> <thead> <tr> <th>@lang('Name')</th> <th>@lang('Category')</th> <th>@lang('Action')</th> </tr> </thead> <tbody> @forelse($specifications as $specification) <tr> <td data-label="@lang('Name')">{{__($specification->name)}}</td> <td data-label="@lang('Category')">{{$specification->category->name}}</td> <td data-label="@lang('Action')"> <a href="javascript:void(0)" class="icon-btn btn--primary ml-1 updateSpecification" data-id="{{$specification->id}}" data-name="{{$specification->name}}" data-category_id ="{{$specification->category_id}}" ><i class="las la-pen"></i></a> </td> </tr> @empty <tr> <td class="text-muted text-center" colspan="100%">{{__($emptyMessage) }}</td> </tr> @endforelse </tbody> </table> </div> </div> <div class="card-footer py-4"> {{ paginateLinks($specifications) }} </div> </div> </div> </div> <div id="specificationModel" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">@lang('Add Specification')</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form action="{{route('admin.specification.store')}}" method="POST"> @csrf <div class="modal-body"> <div class="form-group"> <label for="name" class="form-control-label font-weight-bold">@lang('Select Category')</label> <select class="form-control form-control-lg" name="category_id"> <option value="">@lang('Select One')</option> @foreach($categorys as $category) <option value="{{$category->id}}">{{__($category->name)}}</option> @endforeach </select> </div> <div class="form-group"> <label for="name" class="form-control-label font-weight-bold">@lang('Name')</label> <input type="text" class="form-control form-control-lg" name="name" id="name" placeholder="@lang("Enter Name")" maxlength="120" required=""> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn--dark" data-dismiss="modal">@lang('Close')</button> <button type="submit" class="btn btn--primary"><i class="fa fa-fw fa-paper-plane"></i>@lang('Create')</button> </div> </form> </div> </div> </div> <div id="updateSpecificationModel" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">@lang('Update Specification')</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form action="{{route('admin.specification.update')}}" method="POST"> @csrf <input type="hidden" name="id"> <div class="modal-body"> <div class="form-group"> <label for="name" class="form-control-label font-weight-bold">@lang('Select Category')</label> <select class="form-control form-control-lg" name="category_id"> <option value="">@lang('Select One')</option> @foreach($categorys as $category) <option value="{{$category->id}}">{{__($category->name)}}</option> @endforeach </select> </div> <div class="form-group"> <label for="name" class="form-control-label font-weight-bold">@lang('Name')</label> <input type="text" class="form-control form-control-lg" id="name" name="name" placeholder="@lang("Enter Name")" maxlength="120" required=""> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn--dark" data-dismiss="modal">@lang('Close')</button> <button type="submit" class="btn btn--primary"><i class="fa fa-fw fa-paper-plane"></i>@lang('Update')</button> </div> </form> </div> </div> </div> @endsection @push('breadcrumb-plugins') <a href="javascript:void(0)" class="btn btn-sm btn--primary box--shadow1 text--small addSpecification" ><i class="fa fa-fw fa-paper-plane"></i>@lang('Add Specification')</a> @endpush @push('script') <script> "use strict"; $('.addSpecification').on('click', function() { $('#specificationModel').modal('show'); }); $('.updateSpecification').on('click', function() { var modal = $('#updateSpecificationModel'); modal.find('input[name=id]').val($(this).data('id')); modal.find('input[name=name]').val($(this).data('name')); modal.find('select[name=category_id]').val($(this).data('category_id')); modal.modal('show'); }); </script> @endpush
[+]
..
[-] index.blade.php
[edit]