first change
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{{ html()->form('POST', route('institution.store'))->class('needs-validation')->attributes(['novalidate'])->open() }}
|
||||
|
||||
@isset($institution)
|
||||
{{ html()->hidden('id', $institution->id) }}
|
||||
@endisset
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="mb-3">
|
||||
{{ html()->label('Title')->for('title') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->text('title')->value($institution->title ?? old('title'))->class('form-control')->placeholder('Enter Title')->required() }}
|
||||
{{ html()->div('Please enter a title.')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
{{ html()->label('Link')->for('Link') }}
|
||||
{{ html()->text('link')->value($institution->link ?? old('link'))->class('form-control')->placeholder('Enter Related Link') }}
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
{{ html()->label('Location')->for('Location') }}
|
||||
{{ html()->text('location')->value($institution->location ?? old('location'))->class('form-control')->placeholder('Enter Insititution Location') }}
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
{{ html()->label('Image')->class('form-label')->for('image') }}
|
||||
<x-image-input :editable="$editable" id="image" name="image" :data="$editable ? $institution->getRawOriginal('image') : null" :multiple="false" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
{{ html()->label('Country')->class('form-label')->for('country_id') }}
|
||||
{{ html()->select('country_id', $countryOptions)->value($institution->country_id ?? old('country_id'))->class('form-select choices-select')->placeholder('Select') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<x-form-buttons :href="route('institution.index')" :label="isset($institution) ? 'Update' : 'Create'" />
|
||||
</div>
|
||||
</div>
|
||||
{{ html()->form()->close() }}
|
@@ -0,0 +1,10 @@
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
<a href="{{ route('institution.index', $id) }}" class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
|
||||
|
||||
<a data-link="{{ route('institution.toggle', $id) }}" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Toggle" data-status="{{ $status == 1 ? 'Draft' : 'Published' }}"
|
||||
class="link-info fs-15 toggle-item"><i class="{{ $status == 1 ? 'ri-toggle-line' : 'ri-toggle-fill' }}"></i></a>
|
||||
|
||||
<a href="javascript:void(0);" data-link="{{ route('institution.destroy', $id) }}" class="link-danger fs-15 remove-item"><i
|
||||
class="ri-delete-bin-line"></i>
|
||||
</a>
|
||||
</div>
|
50
Modules/CCMS/resources/views/institution/index.blade.php
Normal file
50
Modules/CCMS/resources/views/institution/index.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
@if ($errors->any())
|
||||
<x-flash-message type="danger" :messages="$errors->all()" />
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-xl-3">
|
||||
<div class="card profile-card">
|
||||
@include('ccms::institution.add-institution-form')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-xl-8 col-lg-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@php
|
||||
$columns = [
|
||||
[
|
||||
'title' => 'S.N',
|
||||
'data' => 'DT_RowIndex',
|
||||
'name' => 'DT_RowIndex',
|
||||
'orderable' => false,
|
||||
'searchable' => false,
|
||||
'sortable' => false,
|
||||
],
|
||||
['title' => 'Image', 'data' => 'image', 'name' => 'image'],
|
||||
['title' => 'Country', 'data' => 'country_id', 'name' => 'country_id'],
|
||||
['title' => 'Name', 'data' => 'title', 'name' => 'title'],
|
||||
['title' => 'Link', 'data' => 'link', 'name' => 'link'],
|
||||
['title' => 'Status', 'data' => 'status', 'name' => 'status'],
|
||||
[
|
||||
'title' => 'Action',
|
||||
'data' => 'action',
|
||||
'orderable' => false,
|
||||
'searchable' => false,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
|
||||
<x-data-table-script :route="route('institution.index')" :reorder="route('institution.reorder')" :columns="$columns" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
Reference in New Issue
Block a user