Sid Gifari File Manager
🏠 Root
/
home2
/
meumer25
/
painelbrasileirissimo.meumercado.app
/
storage
/
framework
/
views
/
Editing: 32c6355efdfdae0623f36c9fb26433203cf73330.php
<?php $__env->startSection('title','Add new attribute'); ?> <?php $__env->startPush('css_or_js'); ?> <?php $__env->stopPush(); ?> <?php $__env->startSection('content'); ?> <div class="content container-fluid"> <!-- Page Header --> <div class="page-header"> <div class="row align-items-center"> <div class="col-sm mb-2 mb-sm-0"> <h1 class="page-header-title"><i class="tio-add-circle-outlined"></i> <?php echo e(\App\CentralLogics\translate('add')); ?> <?php echo e(\App\CentralLogics\translate('new')); ?> <?php echo e(\App\CentralLogics\translate('attribute')); ?></h1> </div> </div> </div> <!-- End Page Header --> <div class="row gx-2 gx-lg-3"> <div class="col-sm-12 col-lg-12 mb-3 mb-lg-2"> <form action="<?php echo e(route('admin.attribute.store')); ?>" method="post"> <?php echo csrf_field(); ?> <?php ($language=\App\Model\BusinessSetting::where('key','language')->first()); ?> <?php ($language = $language->value ?? null); ?> <?php ($default_lang = 'en'); ?> <?php if($language): ?> <?php ($default_lang = json_decode($language)[0]); ?> <ul class="nav nav-tabs mb-4"> <?php $__currentLoopData = json_decode($language); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <li class="nav-item"> <a class="nav-link lang_link <?php echo e($lang == $default_lang? 'active':''); ?>" href="#" id="<?php echo e($lang); ?>-link"><?php echo e(\App\CentralLogics\Helpers::get_language_name($lang).'('.strtoupper($lang).')'); ?></a> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> <div class="row"> <div class="col-12"> <?php $__currentLoopData = json_decode($language); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="form-group <?php echo e($lang != $default_lang ? 'd-none':''); ?> lang_form" id="<?php echo e($lang); ?>-form"> <label class="input-label" for="exampleFormControlInput1"><?php echo e(\App\CentralLogics\translate('name')); ?> (<?php echo e(strtoupper($lang)); ?>)</label> <input type="text" name="name[]" class="form-control" placeholder="New Attribute" <?php echo e($lang == $default_lang? 'required':''); ?> oninvalid="document.getElementById('en-link').click()" maxlength="255"> </div> <input type="hidden" name="lang[]" value="<?php echo e($lang); ?>"> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> <?php else: ?> <div class="row"> <div class="col-6"> <div class="form-group <?php echo e($lang != $default_lang ? 'd-none':''); ?> lang_form" id="<?php echo e($lang); ?>-form"> <label class="input-label" for="exampleFormControlInput1"><?php echo e(\App\CentralLogics\translate('name')); ?> (<?php echo e(strtoupper($lang)); ?>)</label> <input type="text" name="name[]" class="form-control" placeholder="New Attribute" <?php echo e($lang == $default_lang? 'required':''); ?>> </div> <input type="hidden" name="lang[]" value="<?php echo e($lang); ?>"> </div> </div> <?php endif; ?> <button type="submit" class="btn btn-primary"><?php echo e(\App\CentralLogics\translate('submit')); ?></button> </form> </div> <div class="col-sm-12 col-lg-12 mb-3 mb-lg-2"> <div class="card"> <div class="card-header"> <div class="flex-start"> <h5 class="card-header-title"><?php echo e(\App\CentralLogics\translate('Attribute Table')); ?> <span class="card-header-title text-primary mx-1">(<?php echo e($attributes->total()); ?>)</span></h5> </div> </div> <!-- Table --> <div class="table-responsive datatable-custom"> <table class="table table-borderless table-thead-bordered table-nowrap table-align-middle card-table"> <thead class="thead-light"> <tr> <th><?php echo e(\App\CentralLogics\translate('#')); ?></th> <th style="width: 50%"><?php echo e(\App\CentralLogics\translate('name')); ?></th> <th style="width: 10%"><?php echo e(\App\CentralLogics\translate('action')); ?></th> </tr> </thead> <tbody> <?php $__currentLoopData = $attributes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$attribute): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($attributes->firstitem()+$key); ?></td> <td> <span class="d-block font-size-sm text-body"> <?php echo e($attribute['name']); ?> </span> </td> <td> <!-- Dropdown --> <div class="dropdown"> <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="tio-settings"></i> </button> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <a class="dropdown-item" href="<?php echo e(route('admin.attribute.edit',[$attribute['id']])); ?>"><?php echo e(\App\CentralLogics\translate('edit')); ?></a> <a class="dropdown-item" href="javascript:" onclick="form_alert('attribute-<?php echo e($attribute['id']); ?>','Want to delete this attribute ?')"><?php echo e(\App\CentralLogics\translate('delete')); ?></a> <form action="<?php echo e(route('admin.attribute.delete',[$attribute['id']])); ?>" method="post" id="attribute-<?php echo e($attribute['id']); ?>"> <?php echo csrf_field(); ?> <?php echo method_field('delete'); ?> </form> </div> </div> <!-- End Dropdown --> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> <hr> <table> <tfoot> <?php echo $attributes->links(); ?> </tfoot> </table> </div> </div> </div> <!-- End Table --> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('script_2'); ?> <script> $(".lang_link").click(function(e){ e.preventDefault(); $(".lang_link").removeClass('active'); $(".lang_form").addClass('d-none'); $(this).addClass('active'); let form_id = this.id; let lang = form_id.split("-")[0]; console.log(lang); $("#"+lang+"-form").removeClass('d-none'); if(lang == '<?php echo e($default_lang); ?>') { $(".from_part_2").removeClass('d-none'); } else { $(".from_part_2").addClass('d-none'); } }); </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('layouts.admin.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/meumer25/api.meumercado.app/resources/views/admin-views/attribute/index.blade.php ENDPATH**/ ?>
Save
Cancel