active_scaffold_export 3.11.0 → 3.11.2
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 +4 -4
- data/app/assets/stylesheets/{active_scaffold_export.css.erb → active_scaffold_export.css} +1 -1
- data/app/views/active_scaffold_overrides/_export_form_body.html.erb +2 -2
- data/lib/active_scaffold/actions/export.rb +13 -7
- data/lib/active_scaffold_export/version.rb +1 -1
- data/lib/active_scaffold_export.rb +1 -3
- metadata +4 -4
- /data/app/assets/images/{export.png → active_scaffold/export.png} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c5a31084ab9ee69ba6480602feacb14d935f144d26c17b90d3bd4698ceb0053
|
|
4
|
+
data.tar.gz: 5c37fc683df4653d2b71cca0ae24f890b8210e45dc13d8cb81515c6b94250358
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 646be1b196f36730cd8331e9f2422227b556398973ad66c97e2ff014215709a6899e219cde633b66b530c37de80d4ba15059a33ad3188e902841e4f7e6402278
|
|
7
|
+
data.tar.gz: 5edae73a37d1b5e9caf3e85b0d071f1d3ccadf8ffce4c6adb7f6fecdf5e0d42504c1fc442c30384103f64a400b816f787ca60b64e08e16c169e908f3e971c3fa
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<
|
|
1
|
+
<h5><%=as_(:columns_for_export)%></h5>
|
|
2
2
|
<%# TODO: use JS asset instead of inline JS %>
|
|
3
3
|
<%= link_to as_(:select_all), '#', onclick: 'jQuery(".columnCheckbox").prop("checked", true); return false', class: 'active-scaffold-footer' %>
|
|
4
4
|
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
</div>
|
|
17
17
|
<div class="separator"></div>
|
|
18
|
-
<
|
|
18
|
+
<h5><%=as_(:options)%></h5>
|
|
19
19
|
<div class="options checkbox-list">
|
|
20
20
|
<% export_options.each do |row_optionss| %>
|
|
21
21
|
<% row_optionss.each do |(option, label)| %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module ActiveScaffold::Actions
|
|
2
2
|
module Export
|
|
3
3
|
def self.included(base)
|
|
4
|
-
base.before_action :
|
|
5
|
-
base.before_action :
|
|
4
|
+
base.before_action :export_authorized_filter, :only => [:export]
|
|
5
|
+
base.before_action :show_export_authorized_filter, :only => [:show_export]
|
|
6
6
|
base.helper_method :export_columns_names
|
|
7
7
|
end
|
|
8
8
|
|
|
@@ -10,11 +10,9 @@ module ActiveScaffold::Actions
|
|
|
10
10
|
def show_export
|
|
11
11
|
@export_config = active_scaffold_config.export
|
|
12
12
|
respond_to do |wants|
|
|
13
|
-
wants.html
|
|
14
|
-
render(:partial => 'show_export', :layout => true)
|
|
15
|
-
end
|
|
13
|
+
wants.html
|
|
16
14
|
wants.js do
|
|
17
|
-
render
|
|
15
|
+
render partial: 'show_export'
|
|
18
16
|
end
|
|
19
17
|
end
|
|
20
18
|
end
|
|
@@ -163,7 +161,7 @@ module ActiveScaffold::Actions
|
|
|
163
161
|
# The default name of the downloaded file.
|
|
164
162
|
# You may override the method to specify your own file name generation.
|
|
165
163
|
def export_file_name
|
|
166
|
-
filename = self.controller_name.
|
|
164
|
+
filename = self.controller_name.dup
|
|
167
165
|
|
|
168
166
|
if params[:format] && active_scaffold_config.export.formats.map(&:to_s).include?(params[:format])
|
|
169
167
|
filename << ".#{params[:format]}"
|
|
@@ -180,10 +178,18 @@ module ActiveScaffold::Actions
|
|
|
180
178
|
authorized_for?(:action => :read)
|
|
181
179
|
end
|
|
182
180
|
|
|
181
|
+
def export_authorized_filter
|
|
182
|
+
raise ActiveScaffold::ActionNotAllowed unless export_authorized?
|
|
183
|
+
end
|
|
184
|
+
|
|
183
185
|
def show_export_authorized?
|
|
184
186
|
export_authorized?
|
|
185
187
|
end
|
|
186
188
|
|
|
189
|
+
def show_export_authorized_filter
|
|
190
|
+
raise ActiveScaffold::ActionNotAllowed unless show_export_authorized?
|
|
191
|
+
end
|
|
192
|
+
|
|
187
193
|
def export_formats
|
|
188
194
|
active_scaffold_config.export.formats
|
|
189
195
|
end
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
ACTIVE_SCAFFOLD_EXPORT_GEM = true
|
|
2
|
-
ActiveScaffold rescue throw "should have included ActiveScaffold plug in first. Please make sure that this plug-in comes alphabetically after the ActiveScaffold plug-in"
|
|
3
|
-
|
|
4
1
|
require 'active_scaffold_export/engine'
|
|
5
2
|
require 'active_scaffold_export/version'
|
|
6
3
|
|
|
@@ -26,3 +23,4 @@ module ActiveScaffold
|
|
|
26
23
|
end
|
|
27
24
|
|
|
28
25
|
ActionView::Base.send(:include, ActiveScaffold::Helpers::ExportHelpers)
|
|
26
|
+
ActiveScaffold.stylesheets << 'active_scaffold_export'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_scaffold_export
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.11.
|
|
4
|
+
version: 3.11.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Volker Hochstein
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2026-03-24 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: active_scaffold
|
|
@@ -36,8 +36,8 @@ extra_rdoc_files:
|
|
|
36
36
|
files:
|
|
37
37
|
- LICENSE.txt
|
|
38
38
|
- README.md
|
|
39
|
-
- app/assets/images/export.png
|
|
40
|
-
- app/assets/stylesheets/active_scaffold_export.css
|
|
39
|
+
- app/assets/images/active_scaffold/export.png
|
|
40
|
+
- app/assets/stylesheets/active_scaffold_export.css
|
|
41
41
|
- app/assets/stylesheets/export-stylesheet-ie.css
|
|
42
42
|
- app/views/active_scaffold_overrides/_export.csv.erb
|
|
43
43
|
- app/views/active_scaffold_overrides/_export_form_body.html.erb
|
|
File without changes
|