active_admin_simple_import 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0360b1b084661b0428410ee19ccd41560e15c3e0
4
- data.tar.gz: c8c05b9385b7321e9252ab92f41dc7efb06a7a12
3
+ metadata.gz: 6c6d2fab668c70ba42cb7b072446d1c18c96b41a
4
+ data.tar.gz: a2d0167655571c0995baf0738c27f8d0280adff0
5
5
  SHA512:
6
- metadata.gz: d1a63813ebd341564d507980fb8c081c3236dc2f7460f45584cd6e082c9209efd0f3ee1158edbea925ae0c7676e8e4151d5f0d5413aab11005562e0fe3bd4380
7
- data.tar.gz: c1844d90cbb9c2836815aed5997eccac5125686c36e5a77e93e8a38d8b284fa9f0e286bc04d94b5fbdf2a8a1addeeee6c9bbbea749f5f67daed98289495bcbcf
6
+ metadata.gz: 65530c0a909b031a7b001d7c1b19175ee9b627d325d30dc194b1756a8258994654f42b7bfaf67f90985c6624e56b23417c9d383ae358ec2c36694fc8799c63c5
7
+ data.tar.gz: a9e5aecf9782e15668d298e36212554ada9d75d181ca6d5e2d411e12c1454b393ccde1e2e60ed1701df6cf493355ac6acef1361fe4a9ce221533b6af378f2d15
@@ -1,6 +1,7 @@
1
1
  %p.active_admin_import_hint
2
2
  = semantic_form_for :csv, url: {action: :do_import}, html: {multipart: true} do |f|
3
- = f.inputs name: 'Import' do
4
- = f.input :file, as: :file, label: 'Plik csv'
3
+ = f.inputs name: t('active_admin_simple_import.import') do
4
+ = f.input :file, as: :file, label: t('active_admin_simple_import.file_label')
5
+ = f.input :redirect_to, as: :hidden, html_input: { value: request.original_url }
5
6
  = f.actions do
6
- = f.action :submit, label: t("active_admin_import.import_btn"), button_html: {data: {disable_with: t("active_admin_import.import_btn_disabled")}}
7
+ = f.action :submit, label: t("active_admin_simple_import.import_btn")
@@ -0,0 +1,7 @@
1
+ pl:
2
+ active_admin_simple_import:
3
+ import: 'Import'
4
+ import_button: 'Import'
5
+ file_label: 'CSV file'
6
+
7
+ import_success: 'Successfully imported CSV file, changing %{count} objects!'
@@ -0,0 +1,8 @@
1
+ pl:
2
+ active_admin_simple_import:
3
+ import: 'Import'
4
+ import_button: 'Zaimportuj'
5
+ file_label: 'Plik CSV'
6
+
7
+ import_success: 'Pomyślnie zaimportowano plik CSV, zmieniając %{count} obiekty!'
8
+
@@ -19,7 +19,7 @@ module ActiveAdminSimpleImport
19
19
  next if options[:after_update].nil? || !options[:after_update].is_a?(Proc)
20
20
  options[:after_update].call(edited_object, object)
21
21
  end
22
- redirect_to collection_path, notice: 'Zaimportowana plik CSV!'
22
+ redirect_to params[:csv][:redirect_to], notice: t('active_admin_simple_import.import_success', count: objects.count)
23
23
  end
24
24
  end
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminSimpleImport
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_simple_import
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Romanów
@@ -38,6 +38,8 @@ files:
38
38
  - app/controllers/active_admin_simple_import/application_controller.rb
39
39
  - app/helpers/active_admin_simple_import/application_helper.rb
40
40
  - app/views/active_admin_simple_import/import.html.haml
41
+ - config/locales/en.yml
42
+ - config/locales/pl.yml
41
43
  - config/routes.rb
42
44
  - lib/active_admin_simple_import.rb
43
45
  - lib/active_admin_simple_import/dsl.rb