Inital Commit
This commit is contained in:
96
resources/views/crud/generated/menuitems/create.blade.php
Normal file
96
resources/views/crud/generated/menuitems/create.blade.php
Normal file
@ -0,0 +1,96 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Add Menu Items') }}</h2>
|
||||
<?php createButton("btn-primary btn-cancel", "", "Cancel", route('menuitems.index', ($menulocation) ? ['menulocation' => $menulocation] : '')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{route('menuitems.store')}}" id="storeCustomForm" method="POST">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-lg-12">{{createCustomSelect('tbl_menulocations', 'title', 'menulocation_id', ($menulocation)?$menulocation:'', 'Menu Location','menulocations_id', 'form-control select2','status<>-1')}}</div>
|
||||
<div class="col-lg-6">{{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-6">{{createCustomSelectFromArray($menuTypes,"Menu Type","type")}}</div>
|
||||
<div class="col-lg-6" id="ref-container">{{createText("ref","ref","# or Start from / or http:// or https://")}}</div>
|
||||
<div class="col-lg-4">{{createText("title","title","Display Title")}}</div>
|
||||
<div class="col-lg-2">{{createCustomSelectFromArray(array(['display'=>'Self','value'=>"_SELF"],['display'=>'New Tab','value'=>"_BLANK"]),"Target","target","_SELF")}}
|
||||
</div> <br>
|
||||
<div class="col-md-12"><?php createButton("btn-primary btn-store", "", "Submit"); ?>
|
||||
<?php createButton("btn-primary btn-cancel", "", "Cancel", route('menuitems.index')); ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<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>
|
||||
@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
|
100
resources/views/crud/generated/menuitems/edit.blade.php
Normal file
100
resources/views/crud/generated/menuitems/edit.blade.php
Normal file
@ -0,0 +1,100 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<form action="{{route('menuitems.update',[$data->menu_id,'menulocation'=>($menulocation)?$menulocation:''])}}" id="storeCustomForm" method="POST">
|
||||
@csrf
|
||||
<input type=hidden name='menu_id' value='{{$data->menu_id}}' />
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Edit Menu Item') }}</h2>
|
||||
<?php createButton("btn-primary btn-cancel", "", "Cancel", route('menuitems.index')); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">{{createCustomSelect('tbl_menulocations', 'title', 'menulocation_id', $data->menulocations_id, 'Menu Location','menulocations_id', 'form-control select2','status<>-1')}}</div>
|
||||
<div class="col-lg-6">{{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-6">{{createCustomSelectFromArray($menuTypes,"Menu Type","type",$data->type,"REQUIRED")}}</div>
|
||||
<div class="col-lg-6" id="ref-container">{{createText("ref","ref","# or Start from / or http:// or https://",'',$data->ref)}}</div>
|
||||
<div class="col-lg-4">{{createText("title","title","Display Title",'',$data->title)}}</div>
|
||||
<div class="col-lg-2">{{createCustomSelectFromArray(array(['display'=>'Self','value'=>"_SELF"],['display'=>'New Tab','value'=>"_BLANK"]),"Target","target",$data->target)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="col-md-12">
|
||||
<?php createButton("btn-primary btn-store", "", "Update"); ?>
|
||||
<?php createButton("btn-danger btn-cancel", "", "Cancel", route('menuitems.index')); ?>
|
||||
</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 text-uppercase"><span class="overline-title">{{label("Sn.")}}</span></th>
|
||||
<th class="tb-col text-uppercase"><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 text-uppercase"><span class="overline-title">{{ label("title") }}</span></th>
|
||||
<th class="tb-col text-uppercase"><span class="overline-title">{{ label("alias") }}</span></th>
|
||||
<th class="tb-col text-uppercase"><span class="overline-title">{{ label("type") }}</span></th>
|
||||
<th class="tb-col text-uppercase"><span class="overline-title">{{ label("ref") }}</span></th>
|
||||
<th class="tb-col text-uppercase"><span class="overline-title">{{ label("target") }}</span></th>
|
||||
<th class="tb-col text-uppercase" 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
|
Reference in New Issue
Block a user