vidl-toolbox 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/toolbox/default_controller.rb +7 -7
- data/lib/toolbox/version.rb +1 -1
- metadata +1 -1
@@ -8,7 +8,7 @@ module Toolbox
|
|
8
8
|
#
|
9
9
|
module DefaultController
|
10
10
|
|
11
|
-
def self.setup #:nodoc:
|
11
|
+
def self.setup #:nodoc:
|
12
12
|
ActionController::Base.send(:extend, ClassMethods)
|
13
13
|
#ActionController::Base.send(:include, InstanceMethods)
|
14
14
|
ActionView::Base.send(:include, HelperMethods)
|
@@ -18,7 +18,7 @@ module Toolbox
|
|
18
18
|
def get_record
|
19
19
|
instance_variable_get ('@' + controller.model_name).to_sym
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def context_menu_link(rec, context = nil)
|
23
23
|
context_records = []
|
24
24
|
# get the record in show-mode
|
@@ -40,7 +40,7 @@ module Toolbox
|
|
40
40
|
cs = stylesheet_link_tag 'toolbox/context_menu', 'toolbox/popup', 'toolbox/toolbox'
|
41
41
|
js + "\n" + cs + "\n"
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
|
45
45
|
end
|
46
46
|
|
@@ -84,7 +84,7 @@ module Toolbox
|
|
84
84
|
format.html { render :template => 'toolbox/show' }
|
85
85
|
format.xml { render :xml => rec }
|
86
86
|
format.pdf { render @show_config.pdf_options }
|
87
|
-
format.csv { stream_csv show_csv(rec) }
|
87
|
+
format.csv { stream_csv show_csv(rec, params) }
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
@@ -233,7 +233,7 @@ module Toolbox
|
|
233
233
|
rec = model_class.find(params[:id])
|
234
234
|
set_record rec
|
235
235
|
context = {}
|
236
|
-
params.select { |k,v| k.ends_with? '_id' }.each {|a| context[a[0]] = a[1] }
|
236
|
+
params.select { |k,v| k.ends_with? '_id' }.each {|a| context[a[0]] = a[1] }
|
237
237
|
locals = { :context => context, :widget_list => menu_config(rec, context)}
|
238
238
|
respond_to do |format|
|
239
239
|
format.html { render :partial => "toolbox/context_menu", :object => rec, :locals => locals }
|
@@ -276,7 +276,7 @@ module Toolbox
|
|
276
276
|
:filename=> options[:filename],
|
277
277
|
:disposition => 'attachment'
|
278
278
|
end
|
279
|
-
|
279
|
+
|
280
280
|
|
281
281
|
# check the consitency between the visible input-field
|
282
282
|
# and the invisible id field of autocomplete fields and
|
@@ -318,7 +318,7 @@ module Toolbox
|
|
318
318
|
end
|
319
319
|
|
320
320
|
end
|
321
|
-
|
321
|
+
|
322
322
|
end
|
323
323
|
|
324
324
|
# needed for not to conflict with the textdomain from the application controller
|
data/lib/toolbox/version.rb
CHANGED