3488ffe1d1b6097140e40206904399d248ebe518.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php $__env->startSection('content'); ?>
  2. <div class="row">
  3. <div class="col-lg-6">
  4. <div class="card">
  5. <div class="card-header">
  6. <h5 class="mb-0 h6"><?php echo e(translate('Default Language')); ?></h5>
  7. </div>
  8. <div class="card-body">
  9. <form class="form-horizontal" action="<?php echo e(route('env_key_update.update')); ?>" method="POST">
  10. <?php echo csrf_field(); ?>
  11. <div class="form-group row">
  12. <div class="col-lg-3">
  13. <label class="col-from-label"><?php echo e(translate('Default Language')); ?></label>
  14. </div>
  15. <input type="hidden" name="types[]" value="DEFAULT_LANGUAGE">
  16. <div class="col-lg-6">
  17. <select class="form-control aiz-selectpicker" name="DEFAULT_LANGUAGE" data-selected="<?php echo e(env('DEFAULT_LANGUAGE')); ?>">
  18. <?php $__currentLoopData = \App\Models\Language::where('status', 1)->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  19. <option value="<?php echo e($language->code); ?>" <?php if(env('DEFAULT_LANGUAGE') == $language->code): ?> selected <?php endif; ?>>
  20. <?php echo e($language->name); ?>
  21. </option>
  22. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  23. </select>
  24. </div>
  25. <div class="col-lg-3">
  26. <button type="submit" class="btn btn-info"><?php echo e(translate('Save')); ?></button>
  27. </div>
  28. </div>
  29. </form>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="col-lg-6">
  34. <div class="card">
  35. <div class="card-header">
  36. <h5 class="mb-0 h6"><?php echo e(translate('Import App Translations')); ?></h5>
  37. </div>
  38. <div class="card-body">
  39. <form class="form-horizontal" action="<?php echo e(route('app-translations.import')); ?>" method="POST" enctype="multipart/form-data">
  40. <?php echo csrf_field(); ?>
  41. <div class="form-group row">
  42. <div class="col-lg-3">
  43. <label class="col-from-label"><?php echo e(translate('English Trasnlation File')); ?></label>
  44. </div>
  45. <div class="col-lg-6">
  46. <div class="custom-file">
  47. <label class="custom-file-label">
  48. <input type="file" id="lang_file" name="lang_file" class="custom-file-input" required>
  49. <span class="custom-file-name"><?php echo e(translate('Choose app_en.arb file')); ?></span>
  50. </label>
  51. </div>
  52. </div>
  53. <div class="col-lg-3">
  54. <button type="submit" class="btn btn-info"><?php echo e(translate('Import')); ?></button>
  55. </div>
  56. </div>
  57. </form>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="aiz-titlebar text-left mt-2 mb-3">
  63. <div class="align-items-center">
  64. <div class="text-md-left">
  65. <a href="<?php echo e(route('languages.create')); ?>" class="btn btn-circle btn-info">
  66. <span><?php echo e(translate('Add New Language')); ?></span>
  67. </a>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="card">
  72. <div class="card-header">
  73. <h5 class="mb-0 h6"><?php echo e(translate('Language')); ?></h5>
  74. </div>
  75. <div class="card-body">
  76. <table class="table aiz-table mb-0">
  77. <thead>
  78. <tr>
  79. <th data-breakpoints="lg">#</th>
  80. <th><?php echo e(translate('Name')); ?></th>
  81. <th data-breakpoints="lg"><?php echo e(translate('Code')); ?></th>
  82. <th data-breakpoints="lg"><?php echo e(translate('Flutter App Lang Code')); ?></th>
  83. <th data-breakpoints="lg"><?php echo e(translate('RTL')); ?></th>
  84. <th><?php echo e(translate('Status')); ?></th>
  85. <th class="text-right" width="15%"><?php echo e(translate('Options')); ?></th>
  86. </tr>
  87. </thead>
  88. <tbody>
  89. <?php
  90. $i = 1;
  91. ?>
  92. <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  93. <tr>
  94. <td><?php echo e(($key+1) + ($languages->currentPage() - 1)*$languages->perPage()); ?></td>
  95. <td><?php echo e($language->name); ?></td>
  96. <td><?php echo e($language->code); ?></td>
  97. <td><?php echo e($language->app_lang_code); ?></td>
  98. <td><label class="aiz-switch aiz-switch-success mb-0">
  99. <input onchange="update_rtl_status(this)" value="<?php echo e($language->id); ?>" type="checkbox" <?php if($language->rtl == 1): ?> checked <?php endif; ?>>
  100. <span class="slider round"></span></label>
  101. </td>
  102. <td><label class="aiz-switch aiz-switch-success mb-0">
  103. <input onchange="update_status(this)" value="<?php echo e($language->id); ?>" type="checkbox" <?php if($language->status == 1): ?> checked <?php endif; ?>>
  104. <span class="slider round"></span></label>
  105. </td>
  106. <td class="text-right">
  107. <a class="btn btn-soft-info btn-icon btn-circle btn-sm" href="<?php echo e(route('languages.show', $language->id)); ?>" title="<?php echo e(translate('Translation')); ?>">
  108. <i class="las la-language"></i>
  109. </a>
  110. <a class="btn btn-soft-warning btn-icon btn-circle btn-sm" href="<?php echo e(route('app-translations.show', $language->id)); ?>" title="<?php echo e(translate('App Translation')); ?>">
  111. <i class="las la-language"></i>
  112. </a>
  113. <a class="btn btn-soft-success btn-icon btn-circle btn-sm" href="<?php echo e(route('app-translations.export', $language->id)); ?>" title="<?php echo e(translate('arb File Export')); ?>" download>
  114. <i class="las la-download"></i>
  115. </a>
  116. <a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="<?php echo e(route('languages.edit', $language->id)); ?>" title="<?php echo e(translate('Edit')); ?>">
  117. <i class="las la-edit"></i>
  118. </a>
  119. <?php if($language->code != 'en'): ?>
  120. <a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="<?php echo e(route('languages.destroy', $language->id)); ?>" title="<?php echo e(translate('Delete')); ?>">
  121. <i class="las la-trash"></i>
  122. </a>
  123. <?php endif; ?>
  124. </td>
  125. </tr>
  126. <?php
  127. $i++;
  128. ?>
  129. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  130. </tbody>
  131. </table>
  132. <div class="aiz-pagination">
  133. <?php echo e($languages->appends(request()->input())->links()); ?>
  134. </div>
  135. </div>
  136. </div>
  137. <?php $__env->stopSection(); ?>
  138. <?php $__env->startSection('modal'); ?>
  139. <?php echo $__env->make('modals.delete_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  140. <?php $__env->stopSection(); ?>
  141. <?php $__env->startSection('script'); ?>
  142. <script type="text/javascript">
  143. function update_rtl_status(el){
  144. if(el.checked){
  145. var status = 1;
  146. }
  147. else{
  148. var status = 0;
  149. }
  150. $.post('<?php echo e(route('languages.update_rtl_status')); ?>', {_token:'<?php echo e(csrf_token()); ?>', id:el.value, status:status}, function(data){
  151. if(data == 1){
  152. location.reload();
  153. }
  154. else{
  155. AIZ.plugins.notify('danger', '<?php echo e(translate('Something went wrong')); ?>');
  156. }
  157. });
  158. }
  159. function update_status(el){
  160. if(el.checked){
  161. var status = 1;
  162. }
  163. else{
  164. var status = 0;
  165. }
  166. $.post('<?php echo e(route('languages.update-status')); ?>', {
  167. _token : '<?php echo e(csrf_token()); ?>',
  168. id : el.value,
  169. status : status
  170. }, function(data) {
  171. if(data == 1) {
  172. location.reload();
  173. }
  174. else {
  175. AIZ.plugins.notify('danger', '<?php echo e(translate('Something went wrong')); ?>');
  176. }
  177. });
  178. }
  179. </script>
  180. <?php $__env->stopSection(); ?>
  181. <?php echo $__env->make('backend.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/shaoguo/Desktop/公司资料/小梦/商城/ebayShop/resources/views/backend/setup_configurations/languages/index.blade.php ENDPATH**/ ?>