active_scaffold_batch 3.2.0
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.
- data/LICENSE.txt +20 -0
- data/README +4 -0
- data/app/assets/javascripts/jquery/active_scaffold_batch.js +13 -0
- data/app/assets/javascripts/prototype/active_scaffold_batch.js +13 -0
- data/app/assets/stylesshets/active_scaffold_batch.css +36 -0
- data/app/views/active_scaffold_overrides/_batch_create_form.html.erb +9 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_attribute.html.erb +19 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_body.html.erb +25 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_footer.html.erb +4 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_horizontal.html.erb +14 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_horizontal_header.html.erb +8 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_horizontal_record.html.erb +26 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_multiple.html.erb +8 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_vertical.html.erb +7 -0
- data/app/views/active_scaffold_overrides/_batch_create_form_vertical_record.html.erb +6 -0
- data/app/views/active_scaffold_overrides/_batch_update_form.html.erb +7 -0
- data/app/views/active_scaffold_overrides/_batch_update_form_attribute.html.erb +12 -0
- data/app/views/active_scaffold_overrides/_batch_update_form_attribute_scope.html.erb +14 -0
- data/app/views/active_scaffold_overrides/_batch_update_form_body.html.erb +25 -0
- data/app/views/active_scaffold_overrides/_form_messages.html.erb +9 -0
- data/app/views/active_scaffold_overrides/batch_add.js.erb +5 -0
- data/app/views/active_scaffold_overrides/batch_create.html.erb +5 -0
- data/app/views/active_scaffold_overrides/batch_update.html.erb +5 -0
- data/app/views/active_scaffold_overrides/on_batch_base.js.erb +10 -0
- data/app/views/active_scaffold_overrides/on_batch_create.js.erb +15 -0
- data/app/views/active_scaffold_overrides/on_batch_update.js.erb +10 -0
- data/config/locales/de.yml +22 -0
- data/config/locales/en.yml +21 -0
- data/config/locales/es.yml +21 -0
- data/lib/active_scaffold/actions/batch_base.rb +135 -0
- data/lib/active_scaffold/actions/batch_create.rb +247 -0
- data/lib/active_scaffold/actions/batch_destroy.rb +77 -0
- data/lib/active_scaffold/actions/batch_update.rb +281 -0
- data/lib/active_scaffold/config/batch_create.rb +79 -0
- data/lib/active_scaffold/config/batch_destroy.rb +54 -0
- data/lib/active_scaffold/config/batch_update.rb +52 -0
- data/lib/active_scaffold/helpers/batch_create_column_helpers.rb +38 -0
- data/lib/active_scaffold/helpers/calendar_date_select_update_column_helpers.rb +33 -0
- data/lib/active_scaffold/helpers/datepicker_update_column_helpers.rb +29 -0
- data/lib/active_scaffold/helpers/update_column_helpers.rb +93 -0
- data/lib/active_scaffold_batch/config/core.rb +13 -0
- data/lib/active_scaffold_batch/engine.rb +23 -0
- data/lib/active_scaffold_batch/version.rb +9 -0
- data/lib/active_scaffold_batch.rb +25 -0
- metadata +125 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
module ActiveScaffold::Config
|
2
|
+
class BatchDestroy < ActiveScaffold::Config::Base
|
3
|
+
self.crud_type = :delete
|
4
|
+
|
5
|
+
def initialize(core_config)
|
6
|
+
@core = core_config
|
7
|
+
|
8
|
+
# start with the ActionLink defined globally
|
9
|
+
@link = self.class.link.map(&:clone) unless self.class.link.nil?
|
10
|
+
@action_group = self.class.action_group.clone if self.class.action_group
|
11
|
+
@action_group ||= 'collection.batch.destroy'
|
12
|
+
@process_mode = self.class.process_mode
|
13
|
+
end
|
14
|
+
|
15
|
+
# global level configuration
|
16
|
+
# --------------------------
|
17
|
+
# the ActionLink for this action
|
18
|
+
def self.link
|
19
|
+
@@link
|
20
|
+
end
|
21
|
+
def self.link=(val)
|
22
|
+
@@link = val
|
23
|
+
end
|
24
|
+
@@link = [ ActiveScaffold::DataStructures::ActionLink.new('batch_destroy', :label => :listed, :type => :collection, :method => :delete, :position => false, :crud_type => :delete, :confirm => :are_you_sure_to_delete, :parameters => {:batch_scope => 'LISTED'},:security_method => :batch_destroy_authorized?),
|
25
|
+
ActiveScaffold::DataStructures::ActionLink.new('batch_destroy', :label => :marked, :type => :collection, :method => :delete, :position => false, :crud_type => :delete, :confirm => :are_you_sure_to_delete, :parameters => {:batch_scope => 'MARKED'}, :security_method => :batch_destroy_authorized?, :ignore_method => :batch_destroy_marked_ignore?)]
|
26
|
+
|
27
|
+
# configures where the plugin itself is located. there is no instance version of this.
|
28
|
+
cattr_accessor :plugin_directory
|
29
|
+
@@plugin_directory = File.expand_path(__FILE__).match(%{(^.*)/lib/active_scaffold/config/batch_destroy.rb})[1]
|
30
|
+
|
31
|
+
# configures how batch updates should be processed
|
32
|
+
# :delete => standard activerecord delete including validations
|
33
|
+
# :delete_all => updating in one sql call without activerecord instantiation and validation
|
34
|
+
cattr_accessor :process_mode
|
35
|
+
@@process_mode = :delete
|
36
|
+
|
37
|
+
|
38
|
+
# instance-level configuration
|
39
|
+
# ----------------------------
|
40
|
+
|
41
|
+
# see class accessor
|
42
|
+
attr_accessor :process_mode
|
43
|
+
|
44
|
+
# the ActionLink for this action
|
45
|
+
attr_accessor :link
|
46
|
+
|
47
|
+
# the label= method already exists in the Form base class
|
48
|
+
def label(model = nil)
|
49
|
+
model ||= @core.label(:count => 2)
|
50
|
+
@label ? as_(@label) : as_(:delete_model, :model => model)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module ActiveScaffold::Config
|
2
|
+
class BatchUpdate < ActiveScaffold::Config::Form
|
3
|
+
self.crud_type = :update
|
4
|
+
def initialize(*args)
|
5
|
+
super
|
6
|
+
@process_mode = self.class.process_mode
|
7
|
+
@action_group ||= 'collection.batch'
|
8
|
+
@list_mode_enabled = self.class.list_mode_enabled
|
9
|
+
end
|
10
|
+
|
11
|
+
# global level configuration
|
12
|
+
# --------------------------
|
13
|
+
# the ActionLink for this action
|
14
|
+
def self.link
|
15
|
+
@@link
|
16
|
+
end
|
17
|
+
def self.link=(val)
|
18
|
+
@@link = val
|
19
|
+
end
|
20
|
+
@@link = ActiveScaffold::DataStructures::ActionLink.new('batch_edit', :label => :edit, :type => :collection, :security_method => :batch_update_authorized?, :ignore_method => :batch_update_ignore?)
|
21
|
+
|
22
|
+
# configures where the plugin itself is located. there is no instance version of this.
|
23
|
+
cattr_accessor :plugin_directory
|
24
|
+
@@plugin_directory = File.expand_path(__FILE__).match(%{(^.*)/lib/active_scaffold/config/batch_update.rb})[1]
|
25
|
+
|
26
|
+
# configures how batch updates should be processed
|
27
|
+
# :update => standard activerecord update including validations
|
28
|
+
# :update_all => updating in one sql call without activerecord instantiation and validation
|
29
|
+
cattr_accessor :process_mode
|
30
|
+
@@process_mode = :update
|
31
|
+
|
32
|
+
# you may update all records in list view or all marked records
|
33
|
+
# you might disable list mode with this switch if you think it is
|
34
|
+
# too "dangerous"
|
35
|
+
cattr_accessor :list_mode_enabled
|
36
|
+
@@list_mode_enabled = true
|
37
|
+
# instance-level configuration
|
38
|
+
# ----------------------------
|
39
|
+
|
40
|
+
# see class accessor
|
41
|
+
attr_accessor :process_mode
|
42
|
+
|
43
|
+
attr_accessor :list_mode_enabled
|
44
|
+
|
45
|
+
|
46
|
+
# the label= method already exists in the Form base class
|
47
|
+
def label(model = nil)
|
48
|
+
model ||= @core.label(:count => 2)
|
49
|
+
@label ? as_(@label) : as_(:update_model, :model => model)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
# Helpers that assist with the rendering of a Form Column
|
4
|
+
module BatchCreateColumnHelpers
|
5
|
+
# This method decides which input to use for the given column.
|
6
|
+
# It does not do any rendering. It only decides which method is responsible for rendering.
|
7
|
+
def active_scaffold_batch_create_by_column(column, scope = nil, options = {})
|
8
|
+
options = active_scaffold_input_options(column, scope, options)
|
9
|
+
|
10
|
+
if column.form_ui == :record_select
|
11
|
+
active_scaffold_record_select(column, options, batch_create_by_records, true)
|
12
|
+
else
|
13
|
+
active_scaffold_batch_create_singular_association(column, options)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
def active_scaffold_batch_create_singular_association(column, html_options)
|
19
|
+
associated_options = batch_create_by_records.collect {|r| r.id}
|
20
|
+
select_options = options_for_association(column.association)
|
21
|
+
html_options.update(column.options[:html_options] || {})
|
22
|
+
options = {}
|
23
|
+
options.update(column.options)
|
24
|
+
html_options[:name] = "#{html_options[:name]}[]"
|
25
|
+
html_options[:multiple] = true
|
26
|
+
select_tag(column.name, options_for_select(select_options.uniq, associated_options), html_options)
|
27
|
+
end
|
28
|
+
|
29
|
+
def batch_create_multiple_remove_link
|
30
|
+
link_to as_(:remove), '#', :class => 'remove'
|
31
|
+
end
|
32
|
+
|
33
|
+
def batch_create_multiple_layout
|
34
|
+
"batch_create_form_#{active_scaffold_config.batch_create.layout}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
module CalendarDateSelectUpdateColumnHelpers
|
4
|
+
def active_scaffold_update_calendar_date_select(column, options)
|
5
|
+
current_params = {:value => nil, :number => nil, :unit => nil, :operator => 'NO_UPDATE'}
|
6
|
+
current_params.merge!(batch_update_values[column.name][:value].symbolize_keys) if batch_update_values[column.name] && batch_update_values[column.name][:value]
|
7
|
+
Rails.logger.info("update_date column: #{column.name}: #{current_params[:value].inspect}, class: #{current_params[:value].class}")
|
8
|
+
Rails.logger.info("update_date column: #{column.name}: options #{options.inspect}")
|
9
|
+
current_params[:value] = nil if current_params[:value].is_a?(String)
|
10
|
+
Rails.logger.info("update_date2 column: #{column.name}: #{current_params[:value].inspect}, class: #{current_params[:value].class}")
|
11
|
+
operator_options = active_scaffold_update_generic_operators(column)
|
12
|
+
operator_options.concat(ActiveScaffold::Actions::BatchUpdate::DateOperators.collect {|comp| [as_(comp.downcase.to_sym), comp]}) if active_scaffold_config.batch_update.process_mode == :update
|
13
|
+
options = options.merge(:show => ['PLUS', 'MINUS'].exclude?(current_params[:operator]))
|
14
|
+
tags = []
|
15
|
+
tags << select_tag("[record][#{column.name}][operator]",
|
16
|
+
options_for_select(operator_options, current_params[:operator]),
|
17
|
+
:id => "#{options[:id]}_operator",
|
18
|
+
:class => "text-input as_update_date_operator")
|
19
|
+
tags << active_scaffold_search_date_bridge_calendar_control(column, options, current_params[:value], 'value')
|
20
|
+
tags << active_scaffold_update_date_bridge_trend_tag(column, current_params, options)
|
21
|
+
tags.join(" ").html_safe
|
22
|
+
end
|
23
|
+
|
24
|
+
def active_scaffold_update_date_bridge_trend_tag(column, current_params, options)
|
25
|
+
active_scaffold_date_bridge_trend_tag(column, options,
|
26
|
+
{:name_prefix => '[record]',
|
27
|
+
:number_value => current_params[:number],
|
28
|
+
:unit_value => current_params[:unit],
|
29
|
+
:show => ['PLUS','MINUS'].include?(current_params[:operator])})
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
module DatepickerUpdateColumnHelpers
|
4
|
+
def active_scaffold_update_date_picker(column, options)
|
5
|
+
current_params = {:value => nil, :number => nil, :unit => nil, :operator => 'NO_UPDATE'}
|
6
|
+
current_params.merge!(batch_update_values[column.name][:value].symbolize_keys) if batch_update_values[column.name] && batch_update_values[column.name][:value]
|
7
|
+
operator_options = active_scaffold_update_generic_operators(column)
|
8
|
+
operator_options.concat(ActiveScaffold::Actions::BatchUpdate::DateOperators.collect {|comp| [as_(comp.downcase.to_sym), comp]}) if active_scaffold_config.batch_update.process_mode == :update
|
9
|
+
options = options.merge(:show => ['PLUS', 'MINUS'].exclude?(current_params[:operator]))
|
10
|
+
tags = []
|
11
|
+
tags << select_tag("[record][#{column.name}][operator]",
|
12
|
+
options_for_select(operator_options, current_params[:operator]),
|
13
|
+
:id => "#{options[:id]}_operator",
|
14
|
+
:class => "text-input as_update_date_operator")
|
15
|
+
tags << active_scaffold_search_date_bridge_calendar_control(column, options, current_params[:value], 'value')
|
16
|
+
tags << active_scaffold_update_date_bridge_trend_tag(column, current_params, options)
|
17
|
+
tags.join(" ").html_safe
|
18
|
+
end
|
19
|
+
|
20
|
+
def active_scaffold_update_date_bridge_trend_tag(column, current_params, options)
|
21
|
+
active_scaffold_date_bridge_trend_tag(column, options,
|
22
|
+
{:name_prefix => '[record]',
|
23
|
+
:number_value => current_params[:number],
|
24
|
+
:unit_value => current_params[:unit],
|
25
|
+
:show => ['PLUS','MINUS'].include?(current_params[:operator])})
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
module ActiveScaffold
|
2
|
+
module Helpers
|
3
|
+
# Helpers that assist with the rendering of a Form Column
|
4
|
+
module UpdateColumnHelpers
|
5
|
+
# This method decides which input to use for the given column.
|
6
|
+
# It does not do any rendering. It only decides which method is responsible for rendering.
|
7
|
+
def active_scaffold_update_for(column, scope = nil, options = {})
|
8
|
+
options = active_scaffold_input_options(column, scope, options)
|
9
|
+
|
10
|
+
# first, check if the dev has created an override for this specific field for search
|
11
|
+
if (method = override_update_field(column))
|
12
|
+
send(method, @record, options)
|
13
|
+
# second, check if the dev has specified a valid form_ui for this column, using specific ui for searches
|
14
|
+
elsif column.form_ui and (method = override_update(column.form_ui))
|
15
|
+
send(method, column, options)
|
16
|
+
elsif column.column and column.form_ui.nil? and (method = override_update(column.column.type))
|
17
|
+
send(method, column, options)
|
18
|
+
else
|
19
|
+
active_scaffold_update_generic_operators_select(column, options)<< ' ' << active_scaffold_render_input(column, options.merge(:name => "record[#{column.name}][value]"))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def active_scaffold_update_generic_operators(column)
|
24
|
+
operators = ActiveScaffold::Actions::BatchUpdate::GenericOperators.collect {|comp| [as_(comp.downcase.to_sym), comp]}
|
25
|
+
if column.column.nil? || column.column.null
|
26
|
+
operators << [as_(:null), 'NULL']
|
27
|
+
end
|
28
|
+
operators
|
29
|
+
end
|
30
|
+
|
31
|
+
def active_scaffold_update_generic_operators_select(column, options)
|
32
|
+
current = {:operator => 'NO_UPDATE'}
|
33
|
+
current.merge!(batch_update_values[column.name][:value].symbolize_keys) if batch_update_values[column.name] && batch_update_values[column.name][:value]
|
34
|
+
select_tag("[record][#{column.name}][operator]",
|
35
|
+
options_for_select(active_scaffold_update_generic_operators(column), current[:operator]),
|
36
|
+
:id => "#{options[:id]}_operator",
|
37
|
+
:class => "as_batch_update_operator text_input")
|
38
|
+
end
|
39
|
+
|
40
|
+
def active_scaffold_update_numeric(column, options)
|
41
|
+
current = {:value => nil, :opt => 'ABSOLUTE', :operator => 'NO_UPDATE'}
|
42
|
+
current.merge!(batch_update_values[column.name][:value].symbolize_keys) if batch_update_values[column.name] && batch_update_values[column.name][:value]
|
43
|
+
operator_options = active_scaffold_update_generic_operators(column) + ActiveScaffold::Actions::BatchUpdate::NumericOperators.collect {|comp| [as_(comp.downcase.to_sym), comp]}
|
44
|
+
select_options = ActiveScaffold::Actions::BatchUpdate::NumericOptions.collect {|comp| [as_(comp.downcase.to_sym), comp]}
|
45
|
+
html = select_tag("[record][#{column.name}][operator]",
|
46
|
+
options_for_select(operator_options, current[:operator]),
|
47
|
+
:id => "#{options[:id]}_operator",
|
48
|
+
:class => "as_update_numeric_option")
|
49
|
+
html << ' ' << text_field_tag("[record][#{column.name}][value]", current[:value], active_scaffold_input_text_options)
|
50
|
+
html << ' ' << select_tag("[record][#{column.name}][opt]",
|
51
|
+
options_for_select(select_options, current[:opt]),
|
52
|
+
:id => "#{options[:id]}_opt",
|
53
|
+
:class => "as_update_numeric_option")
|
54
|
+
html
|
55
|
+
end
|
56
|
+
alias_method :active_scaffold_update_integer, :active_scaffold_update_numeric
|
57
|
+
alias_method :active_scaffold_update_decimal, :active_scaffold_update_numeric
|
58
|
+
alias_method :active_scaffold_update_float, :active_scaffold_update_numeric
|
59
|
+
|
60
|
+
def active_scaffold_update_scope_select(select_options = active_scaffold_update_scope_select_options)
|
61
|
+
if select_options.length > 1
|
62
|
+
select_tag("batch_scope",
|
63
|
+
options_for_select(select_options, batch_scope || select_options.last[1]),
|
64
|
+
:class => "text_input")
|
65
|
+
else
|
66
|
+
hidden_field_tag("batch_scope", select_options.first[1]) unless select_options.empty?
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def active_scaffold_update_scope_select_options
|
71
|
+
select_options = []
|
72
|
+
select_options << [as_(:listed), 'LISTED'] if active_scaffold_config.batch_update.list_mode_enabled
|
73
|
+
select_options << [as_(:marked), 'MARKED'] if active_scaffold_config.actions.include?(:mark)
|
74
|
+
select_options
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
## Search column override signatures
|
79
|
+
##
|
80
|
+
|
81
|
+
# the naming convention for overriding form fields with helpers
|
82
|
+
def override_update_field(column)
|
83
|
+
override_helper column, 'update_column'
|
84
|
+
end
|
85
|
+
|
86
|
+
# the naming convention for overriding search input types with helpers
|
87
|
+
def override_update(update_ui)
|
88
|
+
method = "active_scaffold_update_#{update_ui}"
|
89
|
+
method if respond_to? method
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Need to open the AS module carefully due to Rails 2.3 lazy loading
|
2
|
+
ActiveScaffold::Config::Core.class_eval do
|
3
|
+
ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_edit] = :get
|
4
|
+
ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_update] = :post
|
5
|
+
ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_new] = :get
|
6
|
+
ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_create] = :post
|
7
|
+
ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_add] = :get
|
8
|
+
#not working because routing picks show route instead
|
9
|
+
#ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :get
|
10
|
+
#you may define a route for your controller before resource routes
|
11
|
+
#match 'players/batch_destroy' => 'players#batch_destroy', :via => [:get]
|
12
|
+
ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :delete
|
13
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module ActiveScaffoldBatch
|
2
|
+
class Engine < ::Rails::Engine
|
3
|
+
initializer("initialize_active_scaffold_batch", :after => "initialize_active_scaffold") do
|
4
|
+
ActiveSupport.on_load(:action_controller) do
|
5
|
+
require "active_scaffold_batch/config/core.rb"
|
6
|
+
end
|
7
|
+
|
8
|
+
ActiveSupport.on_load(:action_view) do
|
9
|
+
begin
|
10
|
+
include ActiveScaffold::Helpers::UpdateColumnHelpers
|
11
|
+
if ActiveScaffold.js_framework == :jquery
|
12
|
+
include ActiveScaffold::Helpers::DatepickerUpdateColumnHelpers
|
13
|
+
elsif ActiveScaffold.js_framework == :prototype
|
14
|
+
include ActiveScaffold::Helpers::CalendarDateSelectUpdateColumnHelpers if defined? CalendarDateSelect
|
15
|
+
end
|
16
|
+
include ActiveScaffold::Helpers::BatchCreateColumnHelpers
|
17
|
+
rescue
|
18
|
+
raise $! unless Rails.env == 'production'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'active_scaffold_batch/engine'
|
2
|
+
require 'active_scaffold_batch/version'
|
3
|
+
|
4
|
+
module ActiveScaffoldBatch
|
5
|
+
def self.root
|
6
|
+
File.dirname(__FILE__) + "/.."
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
module ActiveScaffold
|
11
|
+
module Actions
|
12
|
+
ActiveScaffold.autoload_subdir('actions', self, File.dirname(__FILE__))
|
13
|
+
end
|
14
|
+
|
15
|
+
module Config
|
16
|
+
ActiveScaffold.autoload_subdir('config', self, File.dirname(__FILE__))
|
17
|
+
end
|
18
|
+
|
19
|
+
module Helpers
|
20
|
+
ActiveScaffold.autoload_subdir('helpers', self, File.dirname(__FILE__))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
ActiveScaffold.stylesheets << 'active_scaffold_batch'
|
25
|
+
ActiveScaffold.javascripts << "#{ActiveScaffold.js_framework}/active_scaffold_batch"
|
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: active_scaffold_batch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 15
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 3
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 3.2.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Sergio Cambra
|
14
|
+
- Volker Hochstein
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
|
19
|
+
date: 2012-12-18 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
type: :runtime
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 864871169
|
29
|
+
segments:
|
30
|
+
- 3
|
31
|
+
- 3
|
32
|
+
- 0
|
33
|
+
- rc
|
34
|
+
version: 3.3.0.rc
|
35
|
+
version_requirements: *id001
|
36
|
+
prerelease: false
|
37
|
+
name: active_scaffold
|
38
|
+
description: You want to destroy/update many records at once with activescaffold?
|
39
|
+
email: activescaffold@googlegroups.com
|
40
|
+
executables: []
|
41
|
+
|
42
|
+
extensions: []
|
43
|
+
|
44
|
+
extra_rdoc_files:
|
45
|
+
- README
|
46
|
+
files:
|
47
|
+
- app/assets/javascripts/jquery/active_scaffold_batch.js
|
48
|
+
- app/assets/javascripts/prototype/active_scaffold_batch.js
|
49
|
+
- app/assets/stylesshets/active_scaffold_batch.css
|
50
|
+
- app/views/active_scaffold_overrides/_batch_create_form.html.erb
|
51
|
+
- app/views/active_scaffold_overrides/_batch_create_form_attribute.html.erb
|
52
|
+
- app/views/active_scaffold_overrides/_batch_create_form_body.html.erb
|
53
|
+
- app/views/active_scaffold_overrides/_batch_create_form_footer.html.erb
|
54
|
+
- app/views/active_scaffold_overrides/_batch_create_form_horizontal.html.erb
|
55
|
+
- app/views/active_scaffold_overrides/_batch_create_form_horizontal_header.html.erb
|
56
|
+
- app/views/active_scaffold_overrides/_batch_create_form_horizontal_record.html.erb
|
57
|
+
- app/views/active_scaffold_overrides/_batch_create_form_multiple.html.erb
|
58
|
+
- app/views/active_scaffold_overrides/_batch_create_form_vertical.html.erb
|
59
|
+
- app/views/active_scaffold_overrides/_batch_create_form_vertical_record.html.erb
|
60
|
+
- app/views/active_scaffold_overrides/_batch_update_form.html.erb
|
61
|
+
- app/views/active_scaffold_overrides/_batch_update_form_attribute.html.erb
|
62
|
+
- app/views/active_scaffold_overrides/_batch_update_form_attribute_scope.html.erb
|
63
|
+
- app/views/active_scaffold_overrides/_batch_update_form_body.html.erb
|
64
|
+
- app/views/active_scaffold_overrides/_form_messages.html.erb
|
65
|
+
- app/views/active_scaffold_overrides/batch_add.js.erb
|
66
|
+
- app/views/active_scaffold_overrides/batch_create.html.erb
|
67
|
+
- app/views/active_scaffold_overrides/batch_update.html.erb
|
68
|
+
- app/views/active_scaffold_overrides/on_batch_base.js.erb
|
69
|
+
- app/views/active_scaffold_overrides/on_batch_create.js.erb
|
70
|
+
- app/views/active_scaffold_overrides/on_batch_update.js.erb
|
71
|
+
- config/locales/de.yml
|
72
|
+
- config/locales/en.yml
|
73
|
+
- config/locales/es.yml
|
74
|
+
- lib/active_scaffold/actions/batch_base.rb
|
75
|
+
- lib/active_scaffold/actions/batch_create.rb
|
76
|
+
- lib/active_scaffold/actions/batch_destroy.rb
|
77
|
+
- lib/active_scaffold/actions/batch_update.rb
|
78
|
+
- lib/active_scaffold/config/batch_create.rb
|
79
|
+
- lib/active_scaffold/config/batch_destroy.rb
|
80
|
+
- lib/active_scaffold/config/batch_update.rb
|
81
|
+
- lib/active_scaffold/helpers/batch_create_column_helpers.rb
|
82
|
+
- lib/active_scaffold/helpers/calendar_date_select_update_column_helpers.rb
|
83
|
+
- lib/active_scaffold/helpers/datepicker_update_column_helpers.rb
|
84
|
+
- lib/active_scaffold/helpers/update_column_helpers.rb
|
85
|
+
- lib/active_scaffold_batch.rb
|
86
|
+
- lib/active_scaffold_batch/config/core.rb
|
87
|
+
- lib/active_scaffold_batch/engine.rb
|
88
|
+
- lib/active_scaffold_batch/version.rb
|
89
|
+
- LICENSE.txt
|
90
|
+
- README
|
91
|
+
homepage: http://github.com/scambra/active_scaffold_batch
|
92
|
+
licenses:
|
93
|
+
- MIT
|
94
|
+
post_install_message:
|
95
|
+
rdoc_options: []
|
96
|
+
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
hash: 3
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
version: "0"
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 3
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
requirements: []
|
118
|
+
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 1.8.23
|
121
|
+
signing_key:
|
122
|
+
specification_version: 3
|
123
|
+
summary: Batch Processing for ActiveScaffold
|
124
|
+
test_files: []
|
125
|
+
|