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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d5312e7623d39bea07a170c97a09ded3d0b8e4098be2f0a6a5f25a89a0e8504
4
- data.tar.gz: 0a97a570324341b12eba83242da5f13bd98b93c0d84bae2c5bb07616fc981ce1
3
+ metadata.gz: 1c5a31084ab9ee69ba6480602feacb14d935f144d26c17b90d3bd4698ceb0053
4
+ data.tar.gz: 5c37fc683df4653d2b71cca0ae24f890b8210e45dc13d8cb81515c6b94250358
5
5
  SHA512:
6
- metadata.gz: 07610bac0c7d18ff5ce0875cc4c0eac12e65a8283f49bc3842ac39bfc397de99d932279bbe331f3114896bf9e6f675cd241f9d0788ce914e46c18a938ebaf1ff
7
- data.tar.gz: 53d34e052c132b57229c27daff2af74f3ba8dcb1a522097fff9dc63c681b12372baaf155fadf65e3b483cf039a26f3a679324a34d7fa723fda5dcee70e8c8cc7
6
+ metadata.gz: 646be1b196f36730cd8331e9f2422227b556398973ad66c97e2ff014215709a6899e219cde633b66b530c37de80d4ba15059a33ad3188e902841e4f7e6402278
7
+ data.tar.gz: 5edae73a37d1b5e9caf3e85b0d071f1d3ccadf8ffce4c6adb7f6fecdf5e0d42504c1fc442c30384103f64a400b816f787ca60b64e08e16c169e908f3e971c3fa
@@ -1,5 +1,5 @@
1
1
  .active-scaffold-header div.actions a.show_export {
2
- background-image: url(<%= asset_path 'export.png' %>);
2
+ background-image: url('active_scaffold/export.png');
3
3
  background-position: 1px 50%;
4
4
  background-repeat: no-repeat;
5
5
  padding-left: 19px;
@@ -1,4 +1,4 @@
1
- <h3><%=as_(:columns_for_export)%></h3>
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
  &nbsp;
16
16
  </div>
17
17
  <div class="separator"></div>
18
- <h3><%=as_(:options)%></h3>
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 :export_authorized?, :only => [:export]
5
- base.before_action :show_export_authorized?, :only => [:show_export]
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 do
14
- render(:partial => 'show_export', :layout => true)
15
- end
13
+ wants.html
16
14
  wants.js do
17
- render(:partial => 'show_export', :layout => false)
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.clone
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
@@ -2,7 +2,7 @@ module ActiveScaffoldExport
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 11
5
- PATCH = 0
5
+ PATCH = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  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.0
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: 2025-09-23 00:00:00.000000000 Z
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.erb
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