2024-06-15 22:23:54 +05:45
|
|
|
@extends('backend.template')
|
2024-06-21 13:29:04 +05:45
|
|
|
@push('css')
|
|
|
|
<style>
|
|
|
|
.news-item {
|
|
|
|
margin-bottom: 10px;
|
|
|
|
padding: 10px;
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
border-radius: 5px;
|
|
|
|
margin-left: -60em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.news-link {
|
|
|
|
color: #007bff;
|
|
|
|
text-decoration: none;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.news-link:hover {
|
|
|
|
color: #0056b3;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
@endpush
|
2024-06-15 22:23:54 +05:45
|
|
|
@section('content')
|
|
|
|
<div class='card'>
|
|
|
|
<div class='card-header d-flex justify-content-between align-items-center'>
|
|
|
|
<h2 class="">{{ label('Edit News') }}</h2>
|
2024-06-21 13:29:04 +05:45
|
|
|
@php $url = config('app.url') @endphp
|
|
|
|
<div class="news-item">
|
|
|
|
@if ($data->featured_news == 'True')
|
|
|
|
<a href="{{ $url }}/" class="news-link">Featured News</a>
|
|
|
|
@else
|
|
|
|
<a href="{{ $url }}/newsDetail/{{ $data->alias }}" class="news-link">View News</a>
|
|
|
|
@endif
|
|
|
|
</div>
|
2024-06-15 22:23:54 +05:45
|
|
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('news.index')); ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class='card-body'>
|
|
|
|
<form action="{{ route('news.update', [$data->news_id]) }}" id="updateCustomForm" method="POST">
|
|
|
|
@csrf <input type=hidden name='news_id' value='{{ $data->news_id }}' />
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xl-9 mb-3 ">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 col-lg-6 col-md-6">
|
|
|
|
{{ createCustomSelect('tbl_economies', 'title', 'economy_id', $data->economies_id, 'Economies Id', 'economics_id', 'form-control select2', 'status<>-1') }}
|
|
|
|
</div>
|
|
|
|
<div class="col-6 col-lg-6 col-md-6">
|
|
|
|
{{ createCustomSelect('tbl_provinces', 'title', 'province_id', $data->provinces_id, 'Provinces Id', 'provinces_id', 'form-control select2', 'status<>-1') }}
|
|
|
|
</div>
|
|
|
|
<div class="col-6 col-lg-6 col-md-6">
|
|
|
|
{{ createCustomSelect('tbl_news_type', 'title', 'news_type_id', $data->news_type_id, 'News Type Id', 'news_type_id', 'form-control select2', 'status<>-1') }}
|
|
|
|
</div>
|
|
|
|
<div class="col-6 col-lg-6 col-md-6">
|
|
|
|
{{ createCustomSelect('tbl_authors', 'title', 'author_id', $data->authors_id, 'Authors Id', 'authors_id', 'form-control select2', 'status<>-1') }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h4 class="card-title mb-0">News</h4>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="col-lg-12">
|
2024-06-21 13:29:04 +05:45
|
|
|
{{ createText('title', 'title', 'Title', '', $data->title) }}
|
2024-06-15 22:23:54 +05:45
|
|
|
</div>
|
|
|
|
<div class="col-lg-12 pb-2">
|
2024-06-21 13:29:04 +05:45
|
|
|
{{ createText('nepali_title', 'nepali_title', 'Nepali Title', '', $data->nepali_title) }}
|
2024-06-15 22:23:54 +05:45
|
|
|
</div>
|
|
|
|
<div class="col-lg-12 pb-2">
|
2024-06-21 13:29:04 +05:45
|
|
|
{{ createPlainTextArea('short_description', '', 'Short Description', $data->short_description) }}
|
|
|
|
</div>
|
2024-06-15 22:23:54 +05:45
|
|
|
<div class="col-lg-12 pb-2">
|
2024-06-21 13:29:04 +05:45
|
|
|
{{ createTextarea('content', 'content ckeditor-classic', 'Content', '', $data->content) }}
|
2024-06-15 22:23:54 +05:45
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php createButton('btn-primary btn-store', '', 'Submit'); ?>
|
|
|
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('news.index')); ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-xl-3">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
{{ createCustomSelect('tbl_newscategories', 'title', 'category_id', $data->newscategories_id, 'Newscategories Id', 'newscategories_id', 'form-control select2', 'status<>-1') }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h4 class="card-title mb-0">Cover Photo</h4>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
2024-06-21 13:29:04 +05:45
|
|
|
{{ createImageInput('thumb', 'Thumb', '', $data->thumb) }}
|
2024-06-15 22:23:54 +05:45
|
|
|
<div class="border mt-3 border-dashed"></div>
|
2024-06-21 13:29:04 +05:45
|
|
|
{{ createImageInput('image', 'Image', '', $data->image) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h4 class="card-title mb-0">Status</h4>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="form-check form-switch form-switch-lg form-switch-success mb-3" dir="ltr">
|
|
|
|
<input type="checkbox" class="form-check-input" id="customSwitchsizelg" name="status"
|
|
|
|
@checked($data->status == 1)>
|
|
|
|
<label class="form-check-label" for="customSwitchsizelg">Publish</label>
|
|
|
|
</div>
|
2024-06-15 22:23:54 +05:45
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h4 class="card-title mb-0">Featured News</h4>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="form-check form-switch form-switch-lg form-switch-success mb-3" dir="ltr">
|
|
|
|
<input type="checkbox" class="form-check-input" id="customSwitchsizelg"
|
|
|
|
name="featured_news" @checked($data->featured_news == 'True')>
|
|
|
|
<label class="form-check-label" for="customSwitchsizelg">Active</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card-footer">
|
|
|
|
<?php createButton('btn-primary btn-store', '', 'Submit'); ?>
|
|
|
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('news.index')); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|