<?php $__env->startSection('table'); ?>
<?php echo e(__('testimonials')); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('mainContent'); ?>
<?php echo generateBreadcrumb(); ?>
<section class="admin-visitor-area up_st_admin_visitor">
<div class="container-fluid p-0">
<div class="row justify-content-center">
<div class="col-lg-3">
<div class="row justify-content-center">
<div class="col-12">
<div class="box_header common_table_header">
<div class="main-title d-md-flex w-100">
<h3 class="mb-0 mr-30 mb_xs_15px mb_sm_20px">
<?php if(!isset($edit)): ?>
<?php echo e(__('frontendmanage.Add New Testimonial')); ?>
<?php else: ?>
<?php echo e(__('common.Update')); ?>
<?php endif; ?></h3>
<?php if(isset($edit)): ?>
<div class="float-right text-right">
<a href="<?php echo e(route('frontend.testimonials')); ?>"
class="primary-btn small fix-gr-bg updatebtn float-right"
title="<?php echo e(__('frontendmanage.Add New Testimonial')); ?>">+ </a>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="white-box mb_30 student-details header-menu">
<?php if(!isset($edit) && permissionCheck('frontend.testimonials_store')): ?>
<form
action="<?php echo e(route('frontend.testimonials_store')); ?>"
method="POST" id="coupon-form" name="coupon-form" enctype="multipart/form-data">
<?php echo csrf_field(); ?>
<?php elseif(permissionCheck('frontend.testimonials_edit') && isset($edit)): ?>
<form
action="<?php echo e(isset($edit)?route('frontend.testimonials_update'): ''); ?>"
method="POST" id="coupon-form" name="coupon-form" enctype="multipart/form-data">
<?php echo csrf_field(); ?>
<?php if(isset($edit)): ?>
<input type="hidden" name="id" value="<?php echo e($edit->id); ?>">
<?php endif; ?>
<?php endif; ?>
<input type="hidden" name="category" value="1">
<?php
$LanguageList = getLanguageList();
?>
<div class="row pt-0">
<?php if(isModuleActive('FrontendMultiLang')): ?>
<ul class="nav nav-tabs no-bottom-border mt-sm-md-20 mb-10 ml-3"
role="tablist">
<?php $__currentLoopData = $LanguageList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li class="nav-item">
<a class="nav-link <?php if(auth()->user()->language_code == $language->code): ?> active <?php endif; ?>"
href="#element<?php echo e($language->code); ?>"
role="tab"
data-toggle="tab"><?php echo e($language->native); ?> </a>
</li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>
<?php endif; ?>
</div>
<div class="tab-content">
<?php $__currentLoopData = $LanguageList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div role="tabpanel"
class="tab-pane fade <?php if(auth()->user()->language_code == $language->code): ?> show active <?php endif; ?> "
id="element<?php echo e($language->code); ?>">
<div class="row">
<div class="col-xl-12">
<div class="primary_input mb-25">
<label class="primary_input_label"
for=""><?php echo e(__('frontendmanage.Body Text')); ?>
*</label>
<textarea name="body[<?php echo e($language->code); ?>]" id=""
cols="30" rows="10"
<?php echo e($errors->has('body') ? ' autofocus' : ''); ?>
placeholder="<?php echo e(__('frontendmanage.Body Text')); ?>"
class="primary_textarea <?php echo e(@$errors->has('body') ? ' is-invalid' : ''); ?>"><?php echo e(isset($edit)?$edit->getTranslation('body',$language->code):''); ?></textarea>
<?php if($errors->has('body')): ?>
<span class="invalid-feedback d-block mb-10"
role="alert">
<strong><?php echo e(@$errors->first('body')); ?></strong>
</span>
<?php endif; ?>
</div>
</div>
<div class="col-xl-12">
<div class="primary_input mb-25">
<label class="primary_input_label"
for=""><?php echo e(__('frontendmanage.Author')); ?>
*</label>
<input name="author[<?php echo e($language->code); ?>]" id="author"
<?php echo e($errors->has('author') ? ' autofocus' : ''); ?>
class="primary_input_field name <?php echo e(@$errors->has('author') ? ' is-invalid' : ''); ?>"
placeholder="<?php echo e(__('frontendmanage.Enter Author Name')); ?>"
type="text"
value="<?php echo e(isset($edit)?$edit->getTranslation('author',$language->code):''); ?>">
<?php if($errors->has('author')): ?>
<span class="invalid-feedback d-block mb-10"
role="alert">
<strong><?php echo e(@$errors->first('author')); ?></strong>
</span>
<?php endif; ?>
</div>
</div>
<div class="col-xl-12">
<div class="primary_input mb-25">
<label class="primary_input_label"
for=""><?php echo e(__('frontendmanage.Profession')); ?>
*</label>
<input name="profession[<?php echo e($language->code); ?>]"
id="profession"
<?php echo e($errors->has('profession') ? ' autofocus' : ''); ?>
class="primary_input_field name <?php echo e(@$errors->has('profession') ? ' is-invalid' : ''); ?>"
placeholder="<?php echo e(__('frontendmanage.Enter Profession')); ?>"
type="text"
value="<?php echo e(isset($edit)?$edit->getTranslation('profession',$language->code):''); ?>">
<?php if($errors->has('profession')): ?>
<span class="invalid-feedback d-block mb-10"
role="alert">
<strong><?php echo e(@$errors->first('profession')); ?></strong>
</span>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<div class="row">
<div class="col-xl-12">
<div class="primary_input mb-25">
<label class="primary_input_label" for=""><?php echo e(__('common.Star')); ?>
*</label>
<select class="primary_select mb-25" name="star" id="star">
<option value="1" <?php if(isset($edit)): ?>
<?php echo e($edit->star==1?'selected':''); ?>
<?php endif; ?>>
1
</option>
<option value="2" <?php if(isset($edit)): ?>
<?php echo e($edit->star==2?'selected':''); ?>
<?php endif; ?>>
2
</option>
<option value="3" <?php if(isset($edit)): ?>
<?php echo e($edit->star==3?'selected':''); ?>
<?php endif; ?>>
3
</option>
<option value="4" <?php if(isset($edit)): ?>
<?php echo e($edit->star==4?'selected':''); ?>
<?php endif; ?>>
4
</option>
<option value="5"
<?php if(isset($edit)): ?><?php echo e($edit->star==5?'selected':''); ?> <?php else: ?> selected <?php endif; ?> >
5
</option>
</select>
</div>
</div>
<div class="col-lg-12">
<div class="primary_input mb-15">
<label class="primary_input_label"
for=""><?php echo e(__('imagegallery.Image')); ?>
<?php if(!isset($edit)): ?>
*
<?php endif; ?>
</label>
<div class="primary_file_uploader">
<input <?php echo e($errors->has('image') ? ' autofocus' : ''); ?>
class="primary-input <?php echo e(@$errors->has('image') ? ' is-invalid' : ''); ?>"
type="text" id="placeholderFileOneName"
placeholder="<?php echo e(__('common.Browse file')); ?>" readonly="">
<button class="" type="button">
<label class="primary-btn small fix-gr-bg"
for="document_file_1"><?php echo e(__('common.Browse')); ?></label>
<input type="file" class="d-none" name="image"
id="document_file_1">
</button>
</div>
<?php if($errors->has('image')): ?>
<span class="invalid-feedback d-block mb-10" role="alert">
<strong><?php echo e(@$errors->first('image')); ?></strong>
</span>
<?php endif; ?>
</div>
</div>
<div class="col-xl-12">
<div class="primary_input mb-25">
<label class="primary_input_label" for=""><?php echo e(__('common.Status')); ?>
*</label>
<select
class="primary_select mb-25 <?php echo e(@$errors->has('status') ? ' is-invalid' : ''); ?>"
name="status" id="status" required>
<option
value="1" <?php echo e(isset($edit)?($edit->status==1?'selected':''):''); ?>><?php echo e(__('common.Active')); ?></option>
<option
value="0" <?php echo e(isset($edit)?($edit->status==0?'selected':''):''); ?>><?php echo e(__('common.Inactive')); ?></option>
</select>
</div>
</div>
<?php
$disable =false;
if(!isset($edit)){
if (!permissionCheck('frontend.testimonials_store')){
$disable=true;
}
$text= __('common.Save');
}else{
if(!permissionCheck('frontend.testimonials_edit')){
$disable=true;
}
$text= __('common.Update');
}
?>
<?php if(!$disable): ?>
<div class="col-lg-12 text-center">
<div class="d-flex justify-content-center pt_20">
<button type="submit" class="primary-btn semi_large fix-gr-bg"
<?php echo e($disable?'disable':''); ?>
id="save_button_parent">
<i class="ti-check"></i>
<?php echo e($text); ?>
</button>
</div>
</div>
<?php endif; ?>
</div>
</form>
</div>
</div>
<div class="col-lg-9">
<div class="box_header common_table_header">
<div class="main-title d-md-flex mb-0">
<h3 class="mb-0"><?php echo e(__('frontendmanage.Testimonial')); ?> </h3>
</div>
</div>
<div class="QA_section QA_section_heading_custom check_box_table">
<div class="QA_table">
<!-- table-responsive -->
<div class="">
<table id="lms_table" class="table Crm_table_active3">
<thead>
<tr>
<th scope="col"><?php echo e(__('common.SL')); ?></th>
<th scope="col"><?php echo e(__('frontendmanage.Body')); ?></th>
<th scope="col"><?php echo e(__('frontendmanage.Author')); ?></th>
<th scope="col"><?php echo e(__('frontendmanage.Profession')); ?></th>
<th scope="col"><?php echo e(__('common.Image')); ?></th>
<th scope="col"><?php echo e(__('frontendmanage.Date')); ?></th>
<th scope="col"><?php echo e(__('common.Status')); ?></th>
<th scope="col"><?php echo e(__('common.Star')); ?></th>
<th scope="col"><?php echo e(__('common.Action')); ?></th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $testimonials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<th><?php echo e($key+1); ?></th>
<td><?php echo e(@$item->body); ?></td>
<td><?php echo e(@$item->author); ?></td>
<td><?php echo e(@$item->profession); ?></td>
<td>
<img src="<?php echo e(asset('/'.@$item->image)); ?>" alt=""
class="img img-responsive"
style="width: auto; height:100px !important">
</td>
<td><?php echo e(showDate(@$item->created_at)); ?></td>
<td>
<label class="switch_toggle"
for="status_enable_disable<?php echo e(@$item->id); ?>">
<input type="checkbox" id="status_enable_disable<?php echo e(@$item->id); ?>"
class="status_enable_disable"
<?php if(@$item->status == 1): ?> checked
<?php endif; ?> value="<?php echo e(@$item->id); ?>">
<i class="slider round"></i>
</label>
</td>
<td>
<?php for($i=1;$i<=$item->star;$i++): ?>
<i class="fas fa-star"></i>
<?php endfor; ?>
</td>
<td>
<!-- shortby -->
<div class="dropdown CRM_dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button"
id="dropdownMenu2" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<?php echo e(__('common.Select')); ?>
</button>
<div class="dropdown-menu dropdown-menu-right"
aria-labelledby="dropdownMenu2">
<?php if(permissionCheck('frontend.testimonials_edit')): ?>
<a href="<?php echo e(route('frontend.testimonials_edit',@$item->id)); ?>"
class="dropdown-item edit_brand"><?php echo e(__('common.Edit')); ?></a>
<?php endif; ?>
<?php if(permissionCheck('frontend.testimonials_delete')): ?>
<a onclick="confirm_modal('<?php echo e(route('frontend.testimonials_delete', @$item->id)); ?>');"
class="dropdown-item edit_brand"><?php echo e(__('common.Delete')); ?></a>
<?php endif; ?>
</div>
</div>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php echo $__env->make('backend.partials.delete_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('scripts'); ?>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('backend.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/bouloter/infix/Modules/FrontendManage/Resources/views/testimonials.blade.php ENDPATH**/ ?>