first commit
This commit is contained in:
39
resources/views/crud/form/create.blade.php
Normal file
39
resources/views/crud/form/create.blade.php
Normal file
@ -0,0 +1,39 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class="nk-content">
|
||||
<div class="container-fluid">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="nk-content-inner">
|
||||
<form method="get" action="{{ route('form.store') }}" enctype="multipart/form-data">
|
||||
{{Label('Operation')}}
|
||||
|
||||
{{ customCreateSelect('type', 'type', '', '', ['ajax-curd' => 'Ajax CURD', 'make-table-nullable'=>'Make Table Nullable','store' => 'store', 'update' => 'update']) }}
|
||||
|
||||
{{Label('Table Name')}}
|
||||
|
||||
{{ customCreateSelect('tableName', 'tableName', 'form-control custom-select2', '', $allTables) }}
|
||||
|
||||
{{Label('Write To')}}
|
||||
|
||||
{{ createText('directoryName', 'directoryName', 'Directory Name') }}
|
||||
<?php createButton('mt-3 btn-primary', '', 'Submit'); ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@push('js')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.custom-select2').select2();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
65
resources/views/crud/form/tables.blade.php
Normal file
65
resources/views/crud/form/tables.blade.php
Normal file
@ -0,0 +1,65 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class="nk-content">
|
||||
<div class="container">
|
||||
<div class="nk-content-inner">
|
||||
<div class="nk-content-body">
|
||||
<div class="nk-block-head">
|
||||
<div class="nk-block-head-between flex-wrap gap g-2">
|
||||
<div class="nk-block-head-content">
|
||||
<h2 class="nk-block-title">Tables in Database</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nk-block">
|
||||
<div class="card">
|
||||
<div class="accordion" id="accordionTables">
|
||||
<?php $a = 0; ?>
|
||||
|
||||
@foreach ($allTables as $Table)
|
||||
<?php $a++; ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header"> <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapse{{$a}}"> {{$a}}: {{$Table->tablename}} </button> </h2>
|
||||
<div id="collapse{{$a}}" class="accordion-collapse collapse" data-bs-parent="#accordionTables">
|
||||
<div class="accordion-body">
|
||||
<table class="datatable-init table" data-nk-container="table-responsive">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N.</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{__('lang.Column')}}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{label("Datatype")}}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $sn = 0; ?>
|
||||
@foreach($Table->tablecolumns as $column)
|
||||
<tr>
|
||||
<?php $sn++; ?>
|
||||
<td class="tb-col"><span >{{$sn}}</span></td>
|
||||
<td class="tb-col"><span > {{$column->COLUMN_NAME}}</span></td>
|
||||
<td class="tb-col"><span > {{$column->COLUMN_TYPE}}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@push('js')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.custom-select2').select2();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
@ -0,0 +1,21 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Add Accridiations') }}</h2>
|
||||
<?php createButton("btn-primary btn-cancel","","Cancel",route('accridiations.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{route('accridiations.store')}}" id="storeCustomForm" method="POST">
|
||||
@csrf
|
||||
<div class="row"><div class="col-lg-6">{{createText("display","display","Display")}}
|
||||
</div><div class="col-lg-6">{{createText("title","title","Title")}}
|
||||
</div><div class="col-lg-12 pb-2">{{createTextarea("text","text ckeditor-classic","Text")}}
|
||||
</div><div class="col-lg-12 pb-2">{{createImageInput("image","Image")}}
|
||||
</div><div class="col-lg-12 pb-2">{{createImageInput("thumb","Thumb")}}
|
||||
</div><div class="col-lg-12 pb-2">{{createImageInput("cover","Cover")}}
|
||||
</div> <br> <div class="col-md-12"><?php createButton("btn-primary btn-store","","Submit"); ?>
|
||||
<?php createButton("btn-primary btn-cancel","","Cancel",route('accridiations.index')); ?>
|
||||
</div> </form></div></div>
|
||||
@endsection
|
21
resources/views/crud/generated/accridiations/edit.blade.php
Normal file
21
resources/views/crud/generated/accridiations/edit.blade.php
Normal file
@ -0,0 +1,21 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Edit Accridiations') }}</h2>
|
||||
<?php createButton("btn-primary btn-cancel","","Cancel",route('accridiations.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{route('accridiations.update',[$data->accridiation_id])}}" id="updateCustomForm" method="POST" >
|
||||
@csrf <input type=hidden name='accridiation_id' value='{{$data->accridiation_id}}'/>
|
||||
<div class="row"><div class="col-lg-6">{{createText("display","display","Display",'',$data->display)}}
|
||||
</div><div class="col-lg-6">{{createText("title","title","Title",'',$data->title)}}
|
||||
</div><div class="col-lg-12 pb-2">{{createTextarea("text","text ckeditor-classic","Text",$data->text)}}
|
||||
</div><div class="col-lg-12 pb-2">{{createImageInput("image","Image",'',$data->image)}}
|
||||
</div><div class="col-lg-12 pb-2">{{createImageInput("thumb","Thumb",'',$data->thumb)}}
|
||||
</div><div class="col-lg-12 pb-2">{{createImageInput("cover","Cover",'',$data->cover)}}
|
||||
</div> <div class="col-md-12"><?php createButton("btn-primary btn-update","","Submit"); ?>
|
||||
<?php createButton("btn-primary btn-cancel","","Cancel",route('accridiations.index')); ?>
|
||||
</div> </form></div></div>
|
||||
@endsection
|
233
resources/views/crud/generated/accridiations/index.blade.php
Normal file
233
resources/views/crud/generated/accridiations/index.blade.php
Normal file
@ -0,0 +1,233 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h2>{{ label("Accridiations List") }}</h2>
|
||||
<a href="{{ route('accridiations.create') }}" class="btn btn-primary"><span>{{label("Create New")}}</span></a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table dataTable" id="tbl_accridiations" data-url="{{ route('accridiations.sort') }}">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">{{label("Sn.")}}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("display") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("title") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("image") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("thumb") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("cover") }}</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span
|
||||
class="overline-title">{{ label("Action") }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data as $item)
|
||||
|
||||
<tr data-id="{{$item->accridiation_id}}" data-display_order="{{$item->display_order}}" class="draggable-row <?php echo ($item->status==0)?"bg-light bg-danger":""; ?>">
|
||||
<td class="tb-col">{{ $i++ }}</td><td class="tb-col">{{ $item->display }}</td>
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->image) }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->thumb) }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->cover) }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{route('accridiations.show',[$item->accridiation_id])}}" class="dropdown-item"><i class="ri-eye-fill align-bottom me-2 text-muted"></i> {{label("View")}}</a></li>
|
||||
<li><a href="{{route('accridiations.edit',[$item->accridiation_id])}}" class="dropdown-item edit-item-btn"><i class="ri-pencil-fill align-bottom me-2 text-muted"></i> {{label("Edit")}}</a></li>
|
||||
<li>
|
||||
<a href="{{route('accridiations.toggle',[$item->accridiation_id])}}" class="dropdown-item toggle-item-btn" onclick="confirmToggle(this.href)">
|
||||
<i class="ri-article-fill align-bottom me-2 text-muted"></i> {{ ($item->status==1)?label('Unpublish'):label('Publish') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{route('accridiations.destroy',[$item->accridiation_id])}}" class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill align-bottom me-2 text-muted"></i> {{ label('Delete') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push("css")
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.5/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/rowreorder/1.4.0/css/rowReorder.dataTables.min.css">
|
||||
@endpush
|
||||
@push("js")
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/vfs_fonts.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.13.5/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/rowreorder/1.4.0/js/dataTables.rowReorder.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
$('.change-alias-badge').on('click', function() {
|
||||
var aliasWrapper = $(this).prev('.alias-wrapper');
|
||||
var aliasSpan = aliasWrapper.find('.alias');
|
||||
var aliasInput = aliasWrapper.find('.alias-input');
|
||||
var isEditing = $(this).hasClass('editing');
|
||||
aliasInput.toggleClass("d-none");
|
||||
if (isEditing) {
|
||||
// Update alias text and switch to non-editing state
|
||||
var newAlias = aliasInput.val();
|
||||
aliasSpan.text(newAlias);
|
||||
aliasSpan.show();
|
||||
aliasInput.hide();
|
||||
$(this).removeClass('editing').text('Change Alias');
|
||||
var articleId = $(aliasWrapper).data('id');
|
||||
var ajaxUrl = "{{ route('accridiations.updatealias') }}";
|
||||
var data = {
|
||||
articleId: articleId,
|
||||
newAlias: newAlias
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: ajaxUrl,
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: data,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Switch to editing state
|
||||
aliasSpan.hide();
|
||||
aliasInput.show().focus();
|
||||
$(this).addClass('editing').text('Save Alias');
|
||||
}
|
||||
});
|
||||
var mytable = $(".dataTable").DataTable({
|
||||
ordering: true,
|
||||
rowReorder: {
|
||||
//selector: 'tr'
|
||||
},
|
||||
});
|
||||
|
||||
var isRowReorderComplete = false;
|
||||
|
||||
mytable.on('row-reorder', function(e, diff, edit) {
|
||||
isRowReorderComplete = true;
|
||||
});
|
||||
|
||||
mytable.on('draw', function() {
|
||||
if (isRowReorderComplete) {
|
||||
var url = mytable.table().node().getAttribute('data-url');
|
||||
var ids = mytable.rows().nodes().map(function(node) {
|
||||
return $(node).data('id');
|
||||
}).toArray();
|
||||
|
||||
console.log(ids);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
id_order: ids
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
isRowReorderComplete=false;
|
||||
}
|
||||
});
|
||||
});
|
||||
function confirmDelete(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'You will not be able to recover this item!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Delete',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Deleted!', 'The item has been deleted.', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred while deleting the item.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function confirmToggle(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'Publish Status of Item will be changed!! if Unpublished, links will be dead!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Proceed',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Updated!', 'Publishing Status has been updated.', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@endpush
|
||||
|
29
resources/views/crud/generated/accridiations/show.blade.php
Normal file
29
resources/views/crud/generated/accridiations/show.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2><?php echo label('View Details'); ?></h2>
|
||||
<?php createButton("btn-primary btn-cancel","","Back to List",route('accridiations.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
|
||||
|
||||
|
||||
<p><b>Display : </b> <span>{{$data->display}}</span></p><p><b>Title : </b> <span>{{$data->title}}</span></p><p><b>Text : </b> <span>{{$data->text}}</span></p><p><b>Image : </b> <span>{{$data->image}}</span></p><p><b>Thumb : </b> <span>{{$data->thumb}}</span></p><p><b>Cover : </b> <span>{{$data->cover}}</span></p><p><b>Display Order : </b> <span>{{$data->display_order}}</span></p><p><b>Status : </b> <span
|
||||
class="{{$data->status == 1 ? 'text-success' : 'text-danger'}}">{{$data->status == 1 ? 'Active' : 'Inactive'}}</span></p><p><b>Createdby : </b> <span>{{$data->createdby}}</span></p><p><b>Updatedby : </b> <span>{{$data->updatedby}}</span></p><div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{$data->created_at}}</span></p>
|
||||
<p><b>Created By :</b> <span>{{$data->createdBy}}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{$data->updated_at}}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{$data->updatedBy}}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endSection
|
130
resources/views/crud/generated/menuitems/create.blade.php
Normal file
130
resources/views/crud/generated/menuitems/create.blade.php
Normal file
@ -0,0 +1,130 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
|
||||
<h4 class="mb-sm-0">Add New Menu</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Dashboards</a></li>
|
||||
<li class="breadcrumb-item active">Add New Menu</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<form action="{{route('menuitems.store')}}" id="storeCustomForm" method="POST">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-xl-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">{{createText("title","title","Display Title")}}</div>
|
||||
<div class="col-lg-3">{{createCustomSelect('tbl_menulocations', 'title', 'menulocation_id', ($menulocation)?$menulocation:'', 'Menu Location','menulocations_id', 'form-control select2','status<>-1')}}</div>
|
||||
<div class="col-lg-3">{{createCustomSelectFromArray($menuTypes,"Menu Type","type")}}</div>
|
||||
<div class="col-lg-3">{{createCustomSelect('tbl_menuitems', 'title', 'menu_id', '', 'Sub Menu of (Ignore if it is going as root)','parent_menu', 'form-control select2','status<>-1')}}</div>
|
||||
<div class="col-lg-3" id="ref-container">{{createText("ref","ref","# or Start from / or http:// or https://")}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title mb-0">Target</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{createCustomSelectFromArray(array(['display'=>'Self','value'=>"_SELF"],['display'=>'New Tab','value'=>"_BLANK"]),"","target","_SELF")}}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<?php createButton("btn-primary btn-store", "", "Submit"); ?>
|
||||
<?php createButton("btn-danger btn-cancel", "", "Cancel", route('menuitems.index')); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-xl-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Menu Items</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@include("crud.generated.menuitems.list",[$data=$TableData])
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
@push("js")
|
||||
<script>
|
||||
var firstLevelSelect = document.getElementById('type');
|
||||
var secondLevelContainer = document.getElementById('ref-container');
|
||||
function showRef() {
|
||||
var selectedOption = firstLevelSelect.value;
|
||||
var menuTypes = <?php echo json_encode($menuTypes); ?>;
|
||||
var selectedMenuType = menuTypes.find(function(menuType) {
|
||||
return menuType.value === selectedOption;
|
||||
});
|
||||
secondLevelContainer.innerHTML = '';
|
||||
if (selectedOption == '') {
|
||||
var label = document.createElement('label');
|
||||
label.setAttribute('for', 'ref');
|
||||
label.className = 'form-label col-form-label';
|
||||
label.textContent = '# or Start from / or http:// or https://';
|
||||
secondLevelContainer.appendChild(label);
|
||||
// Create an input element
|
||||
var secondLevelInput = document.createElement('input');
|
||||
secondLevelInput.type = 'text';
|
||||
secondLevelInput.name = 'ref';
|
||||
secondLevelInput.className = 'form-control';
|
||||
secondLevelContainer.appendChild(secondLevelInput);
|
||||
} else {
|
||||
var label = document.createElement('label');
|
||||
label.setAttribute('for', 'ref');
|
||||
label.className = 'form-label col-form-label';
|
||||
label.textContent = 'Ref (Select Reference)';
|
||||
secondLevelContainer.appendChild(label);
|
||||
// Create a select element
|
||||
var secondLevelSelect = document.createElement('select');
|
||||
secondLevelSelect.name = 'ref';
|
||||
secondLevelSelect.className = 'form-select form-control';
|
||||
secondLevelContainer.appendChild(secondLevelSelect);
|
||||
|
||||
// Add the default option
|
||||
var defaultOption = document.createElement('option');
|
||||
defaultOption.value = '';
|
||||
defaultOption.textContent = 'Select Option';
|
||||
secondLevelSelect.appendChild(defaultOption);
|
||||
|
||||
if (selectedMenuType && selectedMenuType.values) {
|
||||
var values = JSON.parse(selectedMenuType.values);
|
||||
values.forEach(function(value) {
|
||||
var option = document.createElement('option');
|
||||
option.value = value.value;
|
||||
option.textContent = value.display;
|
||||
secondLevelSelect.appendChild(option);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
firstLevelSelect.addEventListener('change', function() {
|
||||
showRef();
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
131
resources/views/crud/generated/menuitems/edit.blade.php
Normal file
131
resources/views/crud/generated/menuitems/edit.blade.php
Normal file
@ -0,0 +1,131 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
|
||||
<h4 class="mb-sm-0">Edit Header Menu</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Dashboards</a></li>
|
||||
<li class="breadcrumb-item active">Edit Header Menu</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<form action="{{route('menuitems.update',[$data->menu_id,'menulocation'=>($menulocation)?$menulocation:''])}}" id="storeCustomForm" method="POST">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-xl-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">{{createText("title","title","Display Title",'',$data->title)}}</div>
|
||||
<div class="col-lg-3">{{createCustomSelect('tbl_menulocations', 'title', 'menulocation_id', $data->menulocations_id, 'Menu Location','menulocations_id', 'form-control select2','status<>-1')}}</div>
|
||||
<div class="col-lg-3">{{createCustomSelectFromArray($menuTypes,"Menu Type","type",$data->type,"REQUIRED")}}</div>
|
||||
<div class="col-lg-3">{{createCustomSelect('tbl_menuitems', 'title', 'menu_id', $data->parent_menu, 'Sub Menu of (Ignore if it is going as root)','parent_menu', 'form-control select2','status<>-1')}}</div>
|
||||
<div class="col-lg-3" id="ref-container">{{createText("ref","ref","# or Start from / or http:// or https://",'',$data->ref)}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title mb-0">Target</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{createCustomSelectFromArray(array(['display'=>'Self','value'=>"_SELF"],['display'=>'New Tab','value'=>"_BLANK"]),"","target",$data->target)}}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<?php createButton("btn-primary btn-store", "", "Submit"); ?>
|
||||
<?php createButton("btn-danger btn-cancel", "", "Cancel", route('menuitems.index')); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
@push("js")
|
||||
<script>
|
||||
// showRef();
|
||||
var firstLevelSelect = document.getElementById('type');
|
||||
var secondLevelContainer = document.getElementById('ref-container');
|
||||
firstLevelSelect.value = '{{$data->type}}';
|
||||
firstLevelSelect.dispatchEvent(new Event('change'));
|
||||
showRef('{{$data->ref}}');
|
||||
function showRef(defaultValue = '') {
|
||||
var selectedOption = firstLevelSelect.value;
|
||||
var menuTypes = <?php echo json_encode($menuTypes); ?>;
|
||||
var selectedMenuType = menuTypes.find(function(menuType) {
|
||||
return menuType.value === selectedOption;
|
||||
});
|
||||
secondLevelContainer.innerHTML = '';
|
||||
if (selectedOption === '') {
|
||||
var label = document.createElement('label');
|
||||
label.setAttribute('for', 'ref');
|
||||
label.className = 'form-label col-form-label';
|
||||
label.textContent = '# or Start from / or http:// or https://';
|
||||
secondLevelContainer.appendChild(label);
|
||||
// Create an input element
|
||||
var secondLevelInput = document.createElement('input');
|
||||
secondLevelInput.type = 'text';
|
||||
secondLevelInput.name = 'ref';
|
||||
secondLevelInput.className = 'form-control';
|
||||
secondLevelContainer.appendChild(secondLevelInput);
|
||||
secondLevelInput.value = defaultValue;
|
||||
} else {
|
||||
var label = document.createElement('label');
|
||||
label.setAttribute('for', 'ref');
|
||||
label.className = 'form-label col-form-label';
|
||||
label.textContent = 'Ref (Select Reference)';
|
||||
secondLevelContainer.appendChild(label);
|
||||
// Create a select element
|
||||
var secondLevelSelect = document.createElement('select');
|
||||
secondLevelSelect.name = 'ref';
|
||||
secondLevelSelect.className = 'form-select form-control';
|
||||
secondLevelContainer.appendChild(secondLevelSelect);
|
||||
|
||||
// Add the default option
|
||||
var defaultOption = document.createElement('option');
|
||||
defaultOption.value = '';
|
||||
defaultOption.textContent = 'Select Option';
|
||||
secondLevelSelect.appendChild(defaultOption);
|
||||
|
||||
if (selectedMenuType && selectedMenuType.values) {
|
||||
var values = JSON.parse(selectedMenuType.values);
|
||||
values.forEach(function(value) {
|
||||
var option = document.createElement('option');
|
||||
option.value = value.value;
|
||||
option.textContent = value.display;
|
||||
secondLevelSelect.appendChild(option);
|
||||
});
|
||||
}
|
||||
secondLevelSelect.value = defaultValue;
|
||||
}
|
||||
|
||||
}
|
||||
firstLevelSelect.addEventListener('change', function() {
|
||||
showRef();
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
225
resources/views/crud/generated/menuitems/index.blade.php
Normal file
225
resources/views/crud/generated/menuitems/index.blade.php
Normal file
@ -0,0 +1,225 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h2>{{ label("Menu Items List") }}</h2>
|
||||
<?php
|
||||
if (null != $menulocation) {
|
||||
?><a href="{{ route('menuitems.create',['menulocation'=>$menulocation]) }}" class="btn btn-primary"><span>{{label("Create New")}}</span></a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="{{ route('menuitems.create') }}" class="btn btn-primary"><span>{{label("Create New")}}</span></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table dataTable" id="tbl_menuitems" data-url="{{ route('menuitems.sort') }}">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">{{label("Sn.")}}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("parent_menu") }}</span></th>
|
||||
<!-- <th class="tb-col"><span class="overline-title">{{ label("menulocations_id") }}</span></th> -->
|
||||
<th class="tb-col"><span class="overline-title">{{ label("title") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("alias") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("type") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("ref") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("target") }}</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">{{ label("Action") }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data as $item)
|
||||
|
||||
<tr data-id="{{$item->menu_id}}" data-display_order="{{$item->display_order}}" class="draggable-row">
|
||||
<td class="tb-col">{{ $i++ }}</td>
|
||||
<td class="tb-col">
|
||||
{!! getFieldData("tbl_menuitems", "title", "menu_id", $item->parent_menu) !!}
|
||||
</td>
|
||||
<!-- <td class="tb-col">
|
||||
{!! getFieldData("tbl_menulocations", "title", "menulocation_id", $item->menulocations_id) !!}
|
||||
</td> -->
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="alias-wrapper" data-id="{{$item->menu_id}}">
|
||||
<span class="alias">{{ $item->alias }}</span>
|
||||
<input type="text" class="alias-input d-none" value="{{ $item->alias }}" id="alias_{{$item->menu_id}}" />
|
||||
</div>
|
||||
<span class="badge badge-soft-primary change-alias-badge">change alias</span>
|
||||
</td>
|
||||
<td class="tb-col">{{ $item->type }}</td>
|
||||
<td class="tb-col">{{ $item->ref }}</td>
|
||||
<td class="tb-col">{{ $item->target }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{route('menuitems.show',[$item->menu_id,'menulocation'=>($menulocation)?$menulocation:''])}}" class="dropdown-item"><i class="ri-eye-fill align-bottom me-2 text-muted"></i> {{label("View")}}</a></li>
|
||||
<li><a href="{{route('menuitems.edit',[$item->menu_id,'menulocation'=>($menulocation)?$menulocation:''])}}" class="dropdown-item edit-item-btn"><i class="ri-pencil-fill align-bottom me-2 text-muted"></i> {{label("Edit")}}</a></li>
|
||||
<li>
|
||||
<a href="{{route('menuitems.destroy',[$item->menu_id,'menulocation'=>($menulocation)?$menulocation:''])}}" class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill align-bottom me-2 text-muted"></i> {{ label('Delete') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push("css")
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.5/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/rowreorder/1.4.0/css/rowReorder.dataTables.min.css">
|
||||
@endpush
|
||||
@push("js")
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.13.5/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||
|
||||
<script src="https://cdn.datatables.net/rowreorder/1.4.0/js/dataTables.rowReorder.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
$('.change-alias-badge').on('click', function() {
|
||||
var aliasWrapper = $(this).prev('.alias-wrapper');
|
||||
var aliasSpan = aliasWrapper.find('.alias');
|
||||
var aliasInput = aliasWrapper.find('.alias-input');
|
||||
var isEditing = $(this).hasClass('editing');
|
||||
aliasInput.toggleClass("d-none");
|
||||
if (isEditing) {
|
||||
// Update alias text and switch to non-editing state
|
||||
var newAlias = aliasInput.val();
|
||||
aliasSpan.text(newAlias);
|
||||
aliasSpan.show();
|
||||
aliasInput.hide();
|
||||
$(this).removeClass('editing').text('Change Alias');
|
||||
var articleId = $(aliasWrapper).data('id');
|
||||
var ajaxUrl = "{{ route('menuitems.updatealias') }}";
|
||||
var data = {
|
||||
articleId: articleId,
|
||||
newAlias: newAlias
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: ajaxUrl,
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: data,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Switch to editing state
|
||||
aliasSpan.hide();
|
||||
aliasInput.show().focus();
|
||||
$(this).addClass('editing').text('Save Alias');
|
||||
}
|
||||
});
|
||||
var mytable = $(".dataTable").DataTable({
|
||||
buttons: [
|
||||
'copy', 'excel', 'pdf'
|
||||
],
|
||||
ordering: true,
|
||||
rowReorder: {
|
||||
//selector: 'tr'
|
||||
},
|
||||
});
|
||||
|
||||
var isRowReorderComplete = false;
|
||||
|
||||
mytable.on('row-reorder', function(e, diff, edit) {
|
||||
isRowReorderComplete = true;
|
||||
});
|
||||
|
||||
mytable.on('draw', function() {
|
||||
if (isRowReorderComplete) {
|
||||
var url = mytable.table().node().getAttribute('data-url');
|
||||
var ids = mytable.rows().nodes().map(function(node) {
|
||||
return $(node).data('id');
|
||||
}).toArray();
|
||||
|
||||
console.log(ids);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
id_order: ids
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
isRowReorderComplete = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function confirmDelete(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'You will not be able to recover this item!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Delete',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Deleted!', 'The item has been deleted.', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred while deleting the item.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@endpush
|
66
resources/views/crud/generated/menuitems/list.blade.php
Normal file
66
resources/views/crud/generated/menuitems/list.blade.php
Normal file
@ -0,0 +1,66 @@
|
||||
<table class="table dataTable" id="tbl_menuitems" data-url="{{ route('menuitems.sort') }}">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">{{label("Sn.")}}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("parent_menu") }}</span></th>
|
||||
<!-- <th class="tb-col"><span class="overline-title">{{ label("menulocations_id") }}</span></th> -->
|
||||
<th class="tb-col"><span class="overline-title">{{ label("title") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("alias") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("type") }}</span></th>
|
||||
<!-- <th class="tb-col"><span class="overline-title">{{ label("ref") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("target") }}</span></th> -->
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">{{ label("Action") }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data as $item)
|
||||
|
||||
<tr data-id="{{$item->menu_id}}" data-display_order="{{$item->display_order}}" class="draggable-row">
|
||||
<td class="tb-col">{{ $i++ }}</td>
|
||||
<td class="tb-col">
|
||||
{!! getFieldData("tbl_menuitems", "title", "menu_id", $item->parent_menu) !!}
|
||||
</td>
|
||||
<!-- <td class="tb-col">
|
||||
{!! getFieldData("tbl_menulocations", "title", "menulocation_id", $item->menulocations_id) !!}
|
||||
</td> -->
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="alias-wrapper" data-id="{{$item->menu_id}}">
|
||||
<span class="alias">{{ $item->alias }}</span>
|
||||
<input type="text" class="alias-input d-none" value="{{ $item->alias }}" id="alias_{{$item->menu_id}}" />
|
||||
</div>
|
||||
<span class="badge badge-soft-primary change-alias-badge">change alias</span>
|
||||
</td>
|
||||
<td class="tb-col">{{ $item->type }}</td>
|
||||
<!-- <td class="tb-col">{{ $item->ref }}</td>
|
||||
<td class="tb-col">{{ $item->target }}</td> -->
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{route('menuitems.show',[$item->menu_id])}}" class="dropdown-item"><i class="ri-eye-fill align-bottom me-2 text-muted"></i> {{label("View")}}</a></li>
|
||||
<li><a href="{{route('menuitems.edit',[$item->menu_id,'menulocation'=>($menulocation)?$menulocation:''])}}" class="dropdown-item edit-item-btn"><i class="ri-pencil-fill align-bottom me-2 text-muted"></i> {{label("Edit")}}</a></li>
|
||||
<li>
|
||||
<a href="{{route('menuitems.destroy',[$item->menu_id])}}" class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill align-bottom me-2 text-muted"></i> {{ label('Delete') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
39
resources/views/crud/generated/menuitems/show.blade.php
Normal file
39
resources/views/crud/generated/menuitems/show.blade.php
Normal file
@ -0,0 +1,39 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2><?php echo label('View Details'); ?></h2>
|
||||
<?php createButton("btn-primary btn-cancel", "", "Back to List", route('menuitems.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
|
||||
|
||||
|
||||
<p><b>Parent Menu : </b> <span>{{$data->parent_menu}}</span></p>
|
||||
<p><b>Menulocations Id : </b> <span>{{$data->menulocations_id}}</span></p>
|
||||
<p><b>Title : </b> <span>{{$data->title}}</span></p>
|
||||
<p><b>Alias : </b> <span>{{$data->alias}}</span></p>
|
||||
<p><b>Type : </b> <span>{{$data->type}}</span></p>
|
||||
<p><b>Ref : </b> <span>{{$data->ref}}</span></p>
|
||||
<p><b>Target : </b> <span>{{$data->target}}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{$data->display_order}}</span></p>
|
||||
<p><b>Status : </b> <span class="{{$data->status == 1 ? 'text-success' : 'text-danger'}}">{{$data->status == 1 ? 'Active' : 'Inactive'}}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{$data->createdby}}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{$data->updatedby}}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{$data->created_at}}</span></p>
|
||||
<p><b>Created By :</b> <span>{{$data->createdBy}}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{$data->updated_at}}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{$data->updatedBy}}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endSection
|
@ -0,0 +1,13 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header'>
|
||||
<h2 class="">{{ label('Add Menulocations') }}</h2>
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{route('menulocations.store')}}" id="storeCustomForm" method="POST">
|
||||
@csrf
|
||||
<div class="row"><div class="col-lg-6">{{createText("title","title","Title")}}
|
||||
</div> <br> <div class="col-md-12"><?php createButton("btn-primary btn-store","","Submit"); ?>
|
||||
</div> </form></div></div>
|
||||
@endsection
|
13
resources/views/crud/generated/menulocations/edit.blade.php
Normal file
13
resources/views/crud/generated/menulocations/edit.blade.php
Normal file
@ -0,0 +1,13 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header'>
|
||||
<h2 class="">{{ label('Edit Menulocations') }}</h2>
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{route('menulocations.update',[$data->menulocation_id])}}" id="updateCustomForm" method="POST" >
|
||||
@csrf <input type=hidden name='menulocation_id' value='{{$data->menulocation_id}}'/>
|
||||
<div class="row"><div class="col-lg-6">{{createText("title","title","Title",'',$data->title)}}
|
||||
</div> <div class="col-md-12"><?php createButton("btn-primary btn-update","","Submit"); ?>
|
||||
</div> </form></div></div>
|
||||
@endsection
|
198
resources/views/crud/generated/menulocations/index.blade.php
Normal file
198
resources/views/crud/generated/menulocations/index.blade.php
Normal file
@ -0,0 +1,198 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h2>{{ label("Menulocations List") }}</h2>
|
||||
<a href="{{ route('menulocations.create') }}" class="btn btn-primary"><span>{{label("Create New")}}</span></a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table dataTable" id="tbl_menulocations" data-url="{{ route('menulocations.sort') }}">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">{{label("Sn.")}}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("title") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("alias") }}</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span
|
||||
class="overline-title">{{ label("Action") }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data as $item)
|
||||
|
||||
<tr data-id="{{$item->menulocation_id}}" data-display_order="{{$item->display_order}}" class="draggable-row">
|
||||
<td class="tb-col">{{ $i++ }}</td><td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="alias-wrapper" data-id="{{$item->menulocation_id}}">
|
||||
<span class="alias">{{ $item->alias }}</span>
|
||||
<input type="text" class="alias-input d-none" value="{{ $item->alias }}" id="alias_{{$item->menulocation_id}}" />
|
||||
</div>
|
||||
<span class="badge badge-soft-primary change-alias-badge">change alias</span>
|
||||
</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{route('menulocations.show',[$item->menulocation_id])}}" class="dropdown-item"><i class="ri-eye-fill align-bottom me-2 text-muted"></i> {{label("View")}}</a></li>
|
||||
<li><a href="{{route('menulocations.edit',[$item->menulocation_id])}}" class="dropdown-item edit-item-btn"><i class="ri-pencil-fill align-bottom me-2 text-muted"></i> {{label("Edit")}}</a></li>
|
||||
<li>
|
||||
<a href="{{route('menulocations.destroy',[$item->menulocation_id])}}" class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill align-bottom me-2 text-muted"></i> {{ label('Delete') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push("css")
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.5/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/rowreorder/1.4.0/css/rowReorder.dataTables.min.css">
|
||||
@endpush
|
||||
@push("js")
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/vfs_fonts.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.13.5/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/rowreorder/1.4.0/js/dataTables.rowReorder.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
$('.change-alias-badge').on('click', function() {
|
||||
var aliasWrapper = $(this).prev('.alias-wrapper');
|
||||
var aliasSpan = aliasWrapper.find('.alias');
|
||||
var aliasInput = aliasWrapper.find('.alias-input');
|
||||
var isEditing = $(this).hasClass('editing');
|
||||
aliasInput.toggleClass("d-none");
|
||||
if (isEditing) {
|
||||
// Update alias text and switch to non-editing state
|
||||
var newAlias = aliasInput.val();
|
||||
aliasSpan.text(newAlias);
|
||||
aliasSpan.show();
|
||||
aliasInput.hide();
|
||||
$(this).removeClass('editing').text('Change Alias');
|
||||
var articleId = $(aliasWrapper).data('id');
|
||||
var ajaxUrl = "{{ route('menulocations.updatealias') }}";
|
||||
var data = {
|
||||
articleId: articleId,
|
||||
newAlias: newAlias
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: ajaxUrl,
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: data,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Switch to editing state
|
||||
aliasSpan.hide();
|
||||
aliasInput.show().focus();
|
||||
$(this).addClass('editing').text('Save Alias');
|
||||
}
|
||||
});
|
||||
var mytable = $(".dataTable").DataTable({
|
||||
ordering: true,
|
||||
rowReorder: {
|
||||
//selector: 'tr'
|
||||
},
|
||||
});
|
||||
|
||||
var isRowReorderComplete = false;
|
||||
|
||||
mytable.on('row-reorder', function(e, diff, edit) {
|
||||
isRowReorderComplete = true;
|
||||
});
|
||||
|
||||
mytable.on('draw', function() {
|
||||
if (isRowReorderComplete) {
|
||||
var url = mytable.table().node().getAttribute('data-url');
|
||||
var ids = mytable.rows().nodes().map(function(node) {
|
||||
return $(node).data('id');
|
||||
}).toArray();
|
||||
|
||||
console.log(ids);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
id_order: ids
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
isRowReorderComplete=false;
|
||||
}
|
||||
});
|
||||
});
|
||||
function confirmDelete(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'You will not be able to recover this item!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Delete',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Deleted!', 'The item has been deleted.', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred while deleting the item.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@endpush
|
||||
|
43
resources/views/crud/generated/menulocations/show.blade.php
Normal file
43
resources/views/crud/generated/menulocations/show.blade.php
Normal file
@ -0,0 +1,43 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class="nk-content">
|
||||
<div class="container">
|
||||
<div class="nk-content-inner">
|
||||
<div class="nk-content-body">
|
||||
<div class="nk-block">
|
||||
<div class="offcanvas-body" data-simplebar>
|
||||
<div class="nk-block-head-content w-100">
|
||||
<div class="d-flex justify-content-between pb-4">
|
||||
|
||||
<h2>{{ label('Menulocations Details') }}</h2>
|
||||
{{-- <button class="btn btn-primary print_pdf">Print PDF</button> --}}
|
||||
</div>
|
||||
<div class="card w-100">
|
||||
<div class="p-5">
|
||||
|
||||
<div class="card-head">
|
||||
<h2 class="text-center">{{$data['title']}}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p><b>Title : </b> <span>{{$data->title}}</span></p><p><b>Alias : </b> <span>{{$data->alias}}</span></p><p><b>Display Order : </b> <span>{{$data->display_order}}</span></p><p><b>Status : </b> <span
|
||||
class="{{$data->status == 1 ? 'text-success' : 'text-danger'}}">{{$data->status == 1 ? 'Active' : 'Inactive'}}</span></p><p><b>Createdby : </b> <span>{{$data->createdby}}</span></p><p><b>Updatedby : </b> <span>{{$data->updatedby}}</span></p><div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{$data->created_at}}</span></p>
|
||||
<p><b>Created By :</b> <span>{{$data->createdBy}}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{$data->updated_at}}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{$data->updatedBy}}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
81
resources/views/crud/generated/settings/create.blade.php
Normal file
81
resources/views/crud/generated/settings/create.blade.php
Normal file
@ -0,0 +1,81 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Add Settings') }}</h2>
|
||||
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('settings.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{ route('settings.store') }}" id="storeCustomForm" method="POST">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-lg-6">{{ createText('title', 'title', 'Title') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createTextarea('description', 'description ckeditor-classic', 'Description') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('url1', 'url1', 'Url1') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('url2', 'url2', 'Url2') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('email', 'email', 'Email') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('phone', 'phone', 'Phone') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('working_days', 'working_days', 'Working Days') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('working_hours', 'working_hours', 'Working Hours') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('leave_days', 'leave_days', 'Leave days') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('secondary_phone', 'secondary_phone', 'Secondary Phone') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('location', 'location', 'Location') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createPlainTextArea('google_map', 'google_map ', 'Google Map') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('fb', 'fb', 'Fb') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('insta', 'insta', 'Insta') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('twitter', 'twitter', 'Twitter') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('tiktok', 'tiktok', 'Tiktok') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('youtube', 'youtube', 'Youtube') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createImageInput('primary_logo', 'Primary Logo') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createImageInput('secondary_logo', 'Secondary Logo') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createImageInput('thumb', 'Thumb') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createImageInput('icon', 'Icon') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createImageInput('og_image', 'Og Image') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createImageInput('no_image', 'No Image') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('copyright_text', 'copyright_text', 'Copyright Text') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createTextarea('content1', 'content1 ckeditor-classic', 'Content1') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createTextarea('content2', 'content2 ckeditor-classic', 'Content2') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createTextarea('content3', 'content3 ckeditor-classic', 'Content3') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('seo_title', 'seo_title', 'Seo Title') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createPlainTextArea('seo_description', 'seo_description ', 'Seo Description') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createPlainTextArea('seo_keywords', 'seo_keywords ', 'Seo Keywords') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createPlainTextArea('og_tags', 'og_tags ', 'Og Tags') }}
|
||||
</div> <br>
|
||||
<div class="col-md-12"><?php createButton('btn-primary btn-store', '', 'Submit'); ?>
|
||||
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('settings.index')); ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
245
resources/views/crud/generated/settings/edit.blade.php
Normal file
245
resources/views/crud/generated/settings/edit.blade.php
Normal file
@ -0,0 +1,245 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
|
||||
<h4 class="mb-sm-0">Website Settings</h4>
|
||||
|
||||
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Dashboards</a></li>
|
||||
<li class="breadcrumb-item active">Website Settings</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<!-- New Design -->
|
||||
|
||||
<form action="{{ route('settings.update', [$data->setting_id]) }}" id="updateCustomForm" method="POST">
|
||||
@csrf <input type=hidden name='setting_id' value='{{ $data->setting_id }}' />
|
||||
<div class="chat-wrapper d-lg-flex mx-n4 mt-n4 gap-1 p-1">
|
||||
<div class="file-manager-sidebar">
|
||||
<div class="d-flex flex-column h-100 p-3">
|
||||
|
||||
|
||||
<div class="nav nav-pills flex-column nav-pills-tab custom-verti-nav-pills text-center" role="tablist"
|
||||
aria-orientation="vertical">
|
||||
<a class="nav-link active show" id="settings" data-bs-toggle="pill" href="#custom-v-pills-home"
|
||||
role="tab" aria-controls="custom-v-pills-home" aria-selected="true">
|
||||
<i class="ri-home-4-line d-block fs-20 mb-1"></i> Settings
|
||||
</a>
|
||||
<a class="nav-link" id="address" data-bs-toggle="pill" href="#custom-v-pills-address" role="tab"
|
||||
aria-controls="custom-v-pills-address" aria-selected="false">
|
||||
<i class="ri-map-pin-2-line d-block fs-20 mb-1"></i> Address
|
||||
</a>
|
||||
<a class="nav-link" id="logo" data-bs-toggle="pill" href="#custom-v-pills-logo" role="tab"
|
||||
aria-controls="custom-v-pills-logo" aria-selected="false">
|
||||
<i class="ri-image-2-line d-block fs-20 mb-1"></i> Logo/Images
|
||||
</a>
|
||||
<a class="nav-link" id="socialmedia" data-bs-toggle="pill" href="#custom-v-pills-social" role="tab"
|
||||
aria-controls="custom-v-pills-social" aria-selected="false">
|
||||
<i class="ri-apps-2-line d-block fs-20 mb-1"></i> Social Media
|
||||
</a>
|
||||
<a class="nav-link" id="seo" data-bs-toggle="pill" href="#custom-v-pills-seo" role="tab"
|
||||
aria-controls="custom-v-pills-seo" aria-selected="false">
|
||||
<i class="ri-global-line d-block fs-20 mb-1"></i> SEO
|
||||
</a>
|
||||
<a class="nav-link" id="seo" data-bs-toggle="pill" href="#custom-v-pills-security" role="tab"
|
||||
aria-controls="custom-v-pills-seo" aria-selected="false">
|
||||
<i class="ri-global-line d-block fs-20 mb-1"></i> Security
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-manager-content w-100 p-3 py-0">
|
||||
<div class="mx-n3 file-manager-content-scroll px-4 pt-4" data-simplebar>
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center border-bottom border-bottom-dashed mb-3">
|
||||
<h5 class="flex-grow-1 fs-16 mb-0" id="filetype-title"></h5>
|
||||
<div class="flex-shrink-0">
|
||||
<?php createButton('btn-primary btn-update', '', 'Submit'); ?>
|
||||
<?php createButton('btn-danger btn-cancel', '', 'Cancel', route('settings.index')); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content text-muted mt-lg-0 mt-3">
|
||||
<div class="tab-pane fade active show" id="custom-v-pills-home" role="tabpanel"
|
||||
aria-labelledby="custom-v-pills-home-tab">
|
||||
|
||||
<div>
|
||||
{{ createText('title', 'title', 'Page Title', '', $data->title) }}
|
||||
<h5 class="fs-14 text-muted mb-3 mt-2">Parmalink: <a href="<?php echo env('APP_URL'); ?>"
|
||||
target="_blank"><?php echo env('APP_URL'); ?></a> </h5>
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextarea('description', 'description', 'Description', $data->description) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
{{ createText('working_days', 'working_days', 'Working days', '', $data->working_days) }}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{ createText('working_hours', 'working_hours', 'Working Hours', '', $data->working_hours) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{ createText('leave_days', 'leave_days', 'Leave Days', '', $data->leave_days) }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextarea('content1', 'content1', 'Content1', $data->content1) }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextarea('content2', 'content2', 'Content2', $data->content2) }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextarea('content3', 'content3', 'Content3', $data->content3) }}
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
{{ createText('copyright_text', 'copyright_text', 'Copyright', '', $data->copyright_text) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--end tab-pane-->
|
||||
<div class="tab-pane fade" id="custom-v-pills-address" role="tabpanel"
|
||||
aria-labelledby="custom-v-pills-address-tab">
|
||||
<div class="d-flex mb-4">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">{{ createText('url1', 'url1', 'Url 1', '', $data->url1) }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('url2', 'url2', 'Url 2', '', $data->url2) }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('email', 'email', 'Email', '', $data->email) }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('phone', 'phone', 'Phone', '', $data->phone) }}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{ createText('secondary_phone', 'secondary_phone', 'Secondary Phone', '', $data->secondary_phone) }}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{ createText('location', 'location', 'Office Location', '', $data->location) }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextArea('google_map', '', 'Google Map', $data->google_map) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--end tab-pane-->
|
||||
<div class="tab-pane fade" id="custom-v-pills-logo" role="tabpanel"
|
||||
aria-labelledby="custom-v-pills-logo-tab">
|
||||
<div class="d-flex mb-4">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 border-bottom border-bottom-dashed pb-2">
|
||||
<div class="card card-height-100 border-primary bg-opacity-10 pb-2 shadow">
|
||||
{{ createImageInput('primary_logo', 'Primary Logo', '', $data->primary_logo) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 border-bottom border-bottom-dashed pb-2">
|
||||
<div class="card card-height-100 border-primary bg-opacity-10 pb-2 shadow">
|
||||
{{ createImageInput('secondary_logo', 'Secondary Logo', '', $data->secondary_logo) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 border-bottom border-bottom-dashed pb-2">
|
||||
<div class="card card-height-100 border-primary bg-opacity-10 pb-2 shadow">
|
||||
{{ createImageInput('thumb', 'Thumb', '', $data->thumb) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 border-bottom border-bottom-dashed pb-2">
|
||||
<div class="card card-height-100 border-primary bg-opacity-10 pb-2 shadow">
|
||||
{{ createImageInput('icon', 'Icon', '', $data->icon) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 border-bottom border-bottom-dashed pb-2">
|
||||
<div class="card card-height-100 border-primary bg-opacity-10 pb-2 shadow">
|
||||
{{ createImageInput('og_image', 'Og Image', '', $data->og_image) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 border-bottom border-bottom-dashed pb-2">
|
||||
<div class="card card-height-100 border-primary bg-opacity-10 pb-2 shadow">
|
||||
{{ createImageInput('no_image', 'No Image', '', $data->no_image) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--end tab-pane-->
|
||||
<div class="tab-pane fade" id="custom-v-pills-social" role="tabpanel"
|
||||
aria-labelledby="custom-v-pills-social-tab">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">{{ createText('fb', 'fb', 'Facebook', '', $data->fb) }}
|
||||
</div>
|
||||
<div class="col-lg-4"> {{ createText('insta', 'insta', 'Instagram', '', $data->insta) }}
|
||||
</div>
|
||||
<div class="col-lg-4"> {{ createText('twitter', 'twitter', 'Twitter', '', $data->twitter) }}
|
||||
</div>
|
||||
<div class="col-lg-4"> {{ createText('tiktok', 'tiktok', 'Tiktok', '', $data->tiktok) }}
|
||||
</div>
|
||||
<div class="col-lg-4"> {{ createText('youtube', 'youtube', 'Youtube', '', $data->youtube) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!--end tab-pane-->
|
||||
<div class="tab-pane fade" id="custom-v-pills-seo" role="tabpanel"
|
||||
aria-labelledby="custom-v-pills-seo-tab">
|
||||
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextArea('seo_description', '', 'Seo Description', $data->seo_description) }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextArea('seo_keywords', '', 'Seo Keywords', $data->seo_keywords) }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createPlainTextArea('og_tags', '', 'Og Tags', $data->og_tags) }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!--end tab-pane-->
|
||||
<!--end tab-pane-->
|
||||
<div class="tab-pane fade" id="custom-v-pills-security" role="tabpanel"
|
||||
aria-labelledby="custom-v-pills-security-tab">
|
||||
|
||||
<div class="col-lg-12 text-danger pb-2">
|
||||
First of all, add Site at V2 Bibhuti Solutions.
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextArea('recaptcha_site_key', '', 'RECAPTCHA_SITE_KEY', $data->recaptcha_site_key) }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{ createPlainTextArea('recaptcha_secret_key', '', 'RECAPTCHA_SECRET_KEY', $data->recaptcha_secret_key) }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!--end tab-pane-->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- /New Design -->
|
||||
@endsection
|
263
resources/views/crud/generated/settings/index.blade.php
Normal file
263
resources/views/crud/generated/settings/index.blade.php
Normal file
@ -0,0 +1,263 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h2>{{ label("Settings List") }}</h2>
|
||||
<a href="{{ route('settings.create') }}" class="btn btn-primary"><span>{{label("Create New")}}</span></a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table dataTable" id="tbl_settings" data-url="{{ route('settings.sort') }}">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">{{label("Sn.")}}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("title") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("url1") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("url2") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("email") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("phone") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("secondary_phone") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("fb") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("insta") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("twitter") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("tiktok") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("primary_logo") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("secondary_logo") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("thumb") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("icon") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("og_image") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("no_image") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("copyright_text") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("content1") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("content2") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("content3") }}</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span
|
||||
class="overline-title">{{ label("Action") }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data as $item)
|
||||
|
||||
<tr data-id="{{$item->setting_id}}" data-display_order="{{$item->display_order}}" class="draggable-row <?php echo ($item->status==0)?"bg-light bg-danger":""; ?>">
|
||||
<td class="tb-col">{{ $i++ }}</td><td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">{{ $item->url1 }}</td>
|
||||
<td class="tb-col">{{ $item->url2 }}</td>
|
||||
<td class="tb-col">{{ $item->email }}</td>
|
||||
<td class="tb-col">{{ $item->phone }}</td>
|
||||
<td class="tb-col">{{ $item->secondary_phone }}</td>
|
||||
<td class="tb-col">{{ $item->fb }}</td>
|
||||
<td class="tb-col">{{ $item->insta }}</td>
|
||||
<td class="tb-col">{{ $item->twitter }}</td>
|
||||
<td class="tb-col">{{ $item->tiktok }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->primary_logo) }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->secondary_logo) }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->thumb) }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->icon) }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->og_image) }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->no_image) }}</td>
|
||||
<td class="tb-col">{{ $item->copyright_text }}</td>
|
||||
<td class="tb-col">{{ $item->content1 }}</td>
|
||||
<td class="tb-col">{{ $item->content2 }}</td>
|
||||
<td class="tb-col">{{ $item->content3 }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{route('settings.show',[$item->setting_id])}}" class="dropdown-item"><i class="ri-eye-fill align-bottom me-2 text-muted"></i> {{label("View")}}</a></li>
|
||||
<li><a href="{{route('settings.edit',[$item->setting_id])}}" class="dropdown-item edit-item-btn"><i class="ri-pencil-fill align-bottom me-2 text-muted"></i> {{label("Edit")}}</a></li>
|
||||
<li>
|
||||
<a href="{{route('settings.toggle',[$item->setting_id])}}" class="dropdown-item toggle-item-btn" onclick="confirmToggle(this.href)">
|
||||
<i class="ri-article-fill align-bottom me-2 text-muted"></i> {{ ($item->status==1)?label('Unpublish'):label('Publish') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{route('settings.destroy',[$item->setting_id])}}" class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill align-bottom me-2 text-muted"></i> {{ label('Delete') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push("css")
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.5/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/rowreorder/1.4.0/css/rowReorder.dataTables.min.css">
|
||||
@endpush
|
||||
@push("js")
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/vfs_fonts.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.13.5/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/rowreorder/1.4.0/js/dataTables.rowReorder.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
$('.change-alias-badge').on('click', function() {
|
||||
var aliasWrapper = $(this).prev('.alias-wrapper');
|
||||
var aliasSpan = aliasWrapper.find('.alias');
|
||||
var aliasInput = aliasWrapper.find('.alias-input');
|
||||
var isEditing = $(this).hasClass('editing');
|
||||
aliasInput.toggleClass("d-none");
|
||||
if (isEditing) {
|
||||
// Update alias text and switch to non-editing state
|
||||
var newAlias = aliasInput.val();
|
||||
aliasSpan.text(newAlias);
|
||||
aliasSpan.show();
|
||||
aliasInput.hide();
|
||||
$(this).removeClass('editing').text('Change Alias');
|
||||
var articleId = $(aliasWrapper).data('id');
|
||||
var ajaxUrl = "{{ route('settings.updatealias') }}";
|
||||
var data = {
|
||||
articleId: articleId,
|
||||
newAlias: newAlias
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: ajaxUrl,
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: data,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Switch to editing state
|
||||
aliasSpan.hide();
|
||||
aliasInput.show().focus();
|
||||
$(this).addClass('editing').text('Save Alias');
|
||||
}
|
||||
});
|
||||
var mytable = $(".dataTable").DataTable({
|
||||
ordering: true,
|
||||
rowReorder: {
|
||||
//selector: 'tr'
|
||||
},
|
||||
});
|
||||
|
||||
var isRowReorderComplete = false;
|
||||
|
||||
mytable.on('row-reorder', function(e, diff, edit) {
|
||||
isRowReorderComplete = true;
|
||||
});
|
||||
|
||||
mytable.on('draw', function() {
|
||||
if (isRowReorderComplete) {
|
||||
var url = mytable.table().node().getAttribute('data-url');
|
||||
var ids = mytable.rows().nodes().map(function(node) {
|
||||
return $(node).data('id');
|
||||
}).toArray();
|
||||
|
||||
console.log(ids);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
id_order: ids
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
isRowReorderComplete=false;
|
||||
}
|
||||
});
|
||||
});
|
||||
function confirmDelete(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'You will not be able to recover this item!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Delete',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Deleted!', 'The item has been deleted.', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred while deleting the item.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function confirmToggle(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'Publish Status of Item will be changed!! if Unpublished, links will be dead!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Proceed',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Updated!', 'Publishing Status has been updated.', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@endpush
|
||||
|
29
resources/views/crud/generated/settings/show.blade.php
Normal file
29
resources/views/crud/generated/settings/show.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2><?php echo label('View Details'); ?></h2>
|
||||
<?php createButton("btn-primary btn-cancel","","Back to List",route('settings.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
|
||||
|
||||
|
||||
<p><b>Title : </b> <span>{{$data->title}}</span></p><p><b>Description : </b> <span>{{$data->description}}</span></p><p><b>Url1 : </b> <span>{{$data->url1}}</span></p><p><b>Url2 : </b> <span>{{$data->url2}}</span></p><p><b>Email : </b> <span>{{$data->email}}</span></p><p><b>Phone : </b> <span>{{$data->phone}}</span></p><p><b>Secondary Phone : </b> <span>{{$data->secondary_phone}}</span></p><p><b>Google Map : </b> <span>{{$data->google_map}}</span></p><p><b>Fb : </b> <span>{{$data->fb}}</span></p><p><b>Insta : </b> <span>{{$data->insta}}</span></p><p><b>Twitter : </b> <span>{{$data->twitter}}</span></p><p><b>Tiktok : </b> <span>{{$data->tiktok}}</span></p><p><b>Primary Logo : </b> <span>{{$data->primary_logo}}</span></p><p><b>Secondary Logo : </b> <span>{{$data->secondary_logo}}</span></p><p><b>Thumb : </b> <span>{{$data->thumb}}</span></p><p><b>Icon : </b> <span>{{$data->icon}}</span></p><p><b>Og Image : </b> <span>{{$data->og_image}}</span></p><p><b>No Image : </b> <span>{{$data->no_image}}</span></p><p><b>Copyright Text : </b> <span>{{$data->copyright_text}}</span></p><p><b>Content1 : </b> <span>{{$data->content1}}</span></p><p><b>Content2 : </b> <span>{{$data->content2}}</span></p><p><b>Content3 : </b> <span>{{$data->content3}}</span></p><p><b>Seo Title : </b> <span>{{$data->seo_title}}</span></p><p><b>Seo Description : </b> <span>{{$data->seo_description}}</span></p><p><b>Seo Keywords : </b> <span>{{$data->seo_keywords}}</span></p><p><b>Og Tags : </b> <span>{{$data->og_tags}}</span></p><p><b>Display Order : </b> <span>{{$data->display_order}}</span></p><p><b>Status : </b> <span
|
||||
class="{{$data->status == 1 ? 'text-success' : 'text-danger'}}">{{$data->status == 1 ? 'Active' : 'Inactive'}}</span></p><p><b>Createdby : </b> <span>{{$data->createdby}}</span></p><p><b>Updatedby : </b> <span>{{$data->updatedby}}</span></p><div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{$data->created_at}}</span></p>
|
||||
<p><b>Created By :</b> <span>{{$data->createdBy}}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{$data->updated_at}}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{$data->updatedBy}}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endSection
|
63
resources/views/crud/settings/ajax-curd.blade.php
Normal file
63
resources/views/crud/settings/ajax-curd.blade.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\GeneralFormController;
|
||||
?>
|
||||
@extends("backend.template")
|
||||
@section("content")
|
||||
|
||||
<div class="nk-content">
|
||||
<div class="container-fluid">
|
||||
<div class="nk-content-inner">
|
||||
<div class="nk-content-body">
|
||||
<div class="form-group"> <label for="exampleFormControlTextarea8" class="form-label">Migrations Code Content</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="form-control" id="exampleFormControlTextarea8" rows="8">{{GeneralFormController::migrationContent($tableName)}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"> <label for="exampleFormControlTextarea8" class="form-label">Route Code Content</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="form-control" id="exampleFormControlTextarea8" rows="8">
|
||||
{{GeneralFormController::routeContent($tableName, $directoryName)}}
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"> <label for="exampleFormControlTextarea8" class="form-label">Model Code</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="form-control" id="exampleFormControlTextarea8" rows="8">{{GeneralFormController::modelContent($tableName, $directoryName)}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"> <label for="exampleFormControlTextarea8" class="form-label">Controllers Code</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="form-control" id="exampleFormControlTextarea8" rows="8">{{GeneralFormController::controllerContent($tableName, $directoryName)}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"> <label for="exampleFormControlTextarea8" class="form-label">List File Code</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="form-control" id="exampleFormControlTextarea8" rows="8">{{GeneralFormController::listContent($tableName, $directoryName)}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"> <label for="exampleFormControlTextarea8" class="form-label">Create File Code</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="form-control" id="exampleFormControlTextarea8" rows="8">{{GeneralFormController::addContent($tableName, $directoryName)}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"> <label for="exampleFormControlTextarea8" class="form-label">Edit File Code</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="form-control" id="exampleFormControlTextarea8" rows="8">{{GeneralFormController::editContent($tableName, $directoryName)}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"> <label for="exampleFormControlTextarea8" class="form-label">Show File Code</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="form-control" id="exampleFormControlTextarea8" rows="8">{{GeneralFormController::showContent($tableName, $directoryName)}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
41
resources/views/crud/template.blade.php
Normal file
41
resources/views/crud/template.blade.php
Normal file
@ -0,0 +1,41 @@
|
||||
@extends('backend.template')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ label($title . ' List') }}
|
||||
|
||||
<ul class="d-flex">
|
||||
<li>
|
||||
<a href="{{ route($routeName . 'create') }}" class="btn btn-md d-md-none btn-primary" data-bs-toggle="modal" data-bs-target="">
|
||||
<em class="icon ni ni-plus"></em><span>Add</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route($routeName . 'create') }}" class="btn btn-primary d-none d-md-inline-flex">
|
||||
<em class="icon ni ni-plus"></em><span>Add {{ label($translated) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="datatable-init table" data-nk-container="table-responsive" id="CustomTable">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N.</span></th>
|
||||
{{ $tableHeader }}
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">{{ label('Action') }}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data as $item)
|
||||
{{ $tableRows }}
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
Reference in New Issue
Block a user