]> _ Git - fluidbook-toolbox.git/commitdiff
wip #4626 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Jul 2021 16:38:24 +0000 (18:38 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Jul 2021 16:38:24 +0000 (18:38 +0200)
app/Models/FluidbookTranslate.php
resources/views/fluidbook_translate/excel_export.blade.php [new file with mode: 0644]
resources/views/fluidbook_translate/excel_import.blade.php [new file with mode: 0644]
resources/views/vendor/backpack/crud/inc/form_save_buttons.blade.php

index ab12b89de3a336250dad8425427cddd4cae3e012..98c61d2f54e9f3053308275afd782229cba18909 100644 (file)
@@ -19,6 +19,8 @@ class FluidbookTranslate extends Translate
     public function __construct(array $attributes = [])
     {
         $this->_availableLocales = \Cubist\Locale\Locale::getList(App::getLocale());
+        $this->addEditAction('fluidbook_translate.excel_export');
+        $this->addEditAction('fluidbook_translate.excel_import');
 
         parent::__construct($attributes);
     }
diff --git a/resources/views/fluidbook_translate/excel_export.blade.php b/resources/views/fluidbook_translate/excel_export.blade.php
new file mode 100644 (file)
index 0000000..684bb7f
--- /dev/null
@@ -0,0 +1,2 @@
+<a href="/fluidbook-translate/excel?locale={{request()->get('locale')}}" class="btn btn-outline-notice"><span
+        class="la la-file-excel"></span> {{__('Export Excel')}}</a>
diff --git a/resources/views/fluidbook_translate/excel_import.blade.php b/resources/views/fluidbook_translate/excel_import.blade.php
new file mode 100644 (file)
index 0000000..659b894
--- /dev/null
@@ -0,0 +1 @@
+<button class="btn btn-outline-notice"><span class="la la-file-excel"></span> {{__('Import Excel')}}</button>
index 96f5898a16a49b39c3814f310c138a5eea5fb4f4..fe35de9a244869ec7e545d288f6830557b3f391d 100644 (file)
                 @if(!empty($saveAction['options']))
             </div>
         @endif
+        @foreach($crud->entry->getEditActions() as $view)
+            @include($view)
+        @endforeach
+
         @if(!$crud->hasOperationSetting('showCancelButton') || $crud->getOperationSetting('showCancelButton') == true)
             <a href="{{ $crud->hasAccess('list') ? url($crud->route) : url()->previous() }}"
                class="btn btn-default btn-form-cancel"><span class="la la-ban"></span>