puffer 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +12 -0
- data/VERSION +1 -1
- data/app/cells/puffer/base/additional.html.erb +17 -0
- data/app/cells/puffer/base_cell.rb +25 -0
- data/app/controllers/admin/dashboard_controller.rb +12 -0
- data/app/views/admin/dashboard/index.html.erb +1 -0
- data/app/views/layouts/puffer.html.erb +41 -23
- data/app/views/puffer/_form.html.erb +3 -11
- data/app/views/puffer/edit.html.erb +6 -4
- data/app/views/puffer/index.html.erb +11 -38
- data/app/views/puffer/new.html.erb +5 -2
- data/app/views/puffer/show.html.erb +4 -4
- data/config/routes.rb +7 -0
- data/lib/generators/puffer/controller/controller_generator.rb +1 -1
- data/lib/generators/puffer/install/templates/puffer/javascripts/rails-src.js +399 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/rails.js +14 -175
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-calendar-src.js +1461 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-calendar.js +36 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-calendar.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-in-edit-src.js +369 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-in-edit.js +13 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-in-edit.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-lightbox-src.js +905 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-lightbox.js +24 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-lightbox.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-sortable-src.js +428 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-sortable.js +17 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-sortable.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-src.js +5892 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-tabs-src.js +1145 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-tabs.js +29 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-tabs.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right.js +95 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/stylesheets/puffer.css +168 -0
- data/lib/generators/puffer/install/templates/puffer/stylesheets/reset.css +60 -0
- data/lib/puffer.rb +2 -1
- data/lib/puffer/base.rb +15 -14
- data/lib/puffer/controller/config.rb +52 -16
- data/lib/puffer/controller/dsl.rb +27 -29
- data/lib/puffer/controller/helpers.rb +54 -9
- data/lib/puffer/controller/mutate.rb +4 -22
- data/lib/puffer/engine.rb +9 -0
- data/lib/puffer/extensions/controller.rb +5 -3
- data/lib/puffer/extensions/form.rb +14 -0
- data/lib/puffer/extensions/mapper.rb +36 -0
- data/lib/puffer/fields.rb +21 -0
- data/lib/puffer/fields/field.rb +8 -3
- data/lib/puffer/inputs.rb +23 -0
- data/lib/puffer/inputs/association.rb +11 -0
- data/lib/puffer/inputs/base.rb +39 -0
- data/lib/puffer/inputs/boolean.rb +19 -0
- data/lib/puffer/inputs/collection_association.rb +11 -0
- data/lib/puffer/inputs/date_time.rb +16 -0
- data/lib/puffer/inputs/file.rb +11 -0
- data/lib/puffer/inputs/password.rb +11 -0
- data/lib/puffer/inputs/select.rb +11 -0
- data/lib/puffer/inputs/text.rb +11 -0
- data/lib/puffer/path_set.rb +17 -0
- data/lib/puffer/resource.rb +14 -14
- data/puffer.gemspec +75 -8
- data/spec/dummy/app/controllers/admin/categories_controller.rb +4 -0
- data/spec/dummy/app/controllers/admin/posts_controller.rb +4 -0
- data/spec/dummy/app/controllers/admin/profiles_controller.rb +5 -0
- data/spec/dummy/app/controllers/admin/users_controller.rb +4 -0
- data/spec/dummy/app/models/friendship.rb +4 -0
- data/spec/dummy/app/models/profile.rb +2 -0
- data/spec/dummy/app/models/user.rb +7 -0
- data/spec/dummy/app/views/admin/users/index.html.erb +1 -0
- data/spec/dummy/config/puffer.rb +0 -0
- data/spec/dummy/db/migrate/20110107082706_create_friendships.rb +15 -0
- data/spec/dummy/db/schema.rb +9 -1
- data/spec/dummy/public/puffer/javascripts/rails-src.js +399 -0
- data/spec/dummy/public/puffer/javascripts/rails.js +14 -0
- data/spec/dummy/public/puffer/javascripts/right-calendar-src.js +1461 -0
- data/spec/dummy/public/puffer/javascripts/right-calendar.js +36 -0
- data/spec/dummy/public/puffer/javascripts/right-calendar.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right-in-edit-src.js +369 -0
- data/spec/dummy/public/puffer/javascripts/right-in-edit.js +13 -0
- data/spec/dummy/public/puffer/javascripts/right-in-edit.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right-lightbox-src.js +905 -0
- data/spec/dummy/public/puffer/javascripts/right-lightbox.js +24 -0
- data/spec/dummy/public/puffer/javascripts/right-lightbox.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right-sortable-src.js +428 -0
- data/spec/dummy/public/puffer/javascripts/right-sortable.js +17 -0
- data/spec/dummy/public/puffer/javascripts/right-sortable.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right-src.js +5892 -0
- data/spec/dummy/public/puffer/javascripts/right-tabs-src.js +1145 -0
- data/spec/dummy/public/puffer/javascripts/right-tabs.js +29 -0
- data/spec/dummy/public/puffer/javascripts/right-tabs.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right.js +95 -0
- data/spec/dummy/public/puffer/javascripts/right.js.gz +0 -0
- data/spec/dummy/public/puffer/stylesheets/puffer.css +168 -0
- data/spec/dummy/public/puffer/stylesheets/reset.css +60 -0
- data/spec/lib/fields_spec.rb +2 -0
- data/spec/lib/params_spec.rb +55 -54
- metadata +114 -23
- data/lib/generators/puffer/install/templates/puffer/javascripts/application.js +0 -2
- data/lib/generators/puffer/install/templates/puffer/javascripts/controls.js +0 -965
- data/lib/generators/puffer/install/templates/puffer/javascripts/dragdrop.js +0 -974
- data/lib/generators/puffer/install/templates/puffer/javascripts/effects.js +0 -1123
- data/lib/generators/puffer/install/templates/puffer/javascripts/prototype.js +0 -6001
- data/lib/puffer/railtie.rb +0 -5
@@ -4,59 +4,57 @@ module Puffer
|
|
4
4
|
|
5
5
|
def self.included base
|
6
6
|
base.class_eval do
|
7
|
-
class_attribute :puffer_fields
|
8
|
-
self.puffer_fields = {}
|
9
|
-
|
10
7
|
extend ClassMethods
|
8
|
+
include ActionMethods
|
9
|
+
extend ActionMethods
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
define_method "#{sym}_fields" do
|
18
|
-
self.class.send "#{sym}_fields"
|
11
|
+
%w(index show form create update).each do |action|
|
12
|
+
class_attribute "_#{action}_fields"
|
13
|
+
send "_#{action}_fields=", Puffer::Fields.new unless send("_#{action}_fields").present?
|
14
|
+
helper_method "#{action}_fields"
|
15
|
+
end
|
19
16
|
end
|
20
17
|
end
|
21
18
|
|
22
19
|
module ClassMethods
|
23
20
|
|
24
|
-
|
25
|
-
block
|
21
|
+
%w(index show form create update).each do |action|
|
22
|
+
define_method action do |&block|
|
23
|
+
@_fields = send "_#{action}_fields"
|
24
|
+
@_fields.clear
|
25
|
+
block.call if block
|
26
|
+
@_fields = nil
|
27
|
+
end
|
26
28
|
end
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
30
|
+
def field name, options = {}
|
31
|
+
field = @_fields.field(model, name, options) if @_fields
|
32
|
+
#generate_association_actions field if field.association?
|
33
|
+
#generate_change_actions field if field.toggable?
|
33
34
|
end
|
34
35
|
|
36
|
+
end
|
37
|
+
|
38
|
+
module ActionMethods
|
39
|
+
|
35
40
|
def index_fields
|
36
|
-
|
41
|
+
_index_fields
|
37
42
|
end
|
38
43
|
|
39
44
|
def show_fields
|
40
|
-
|
45
|
+
_show_fields.presence || _index_fields
|
41
46
|
end
|
42
47
|
|
43
48
|
def form_fields
|
44
|
-
|
49
|
+
_form_fields
|
45
50
|
end
|
46
51
|
|
47
52
|
def create_fields
|
48
|
-
|
53
|
+
_create_fields.presence || _form_fields
|
49
54
|
end
|
50
55
|
|
51
56
|
def update_fields
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
def field name, options = {}
|
56
|
-
puffer_fields[@puffer_option] ||= Puffer::Fields.new
|
57
|
-
field = puffer_fields[@puffer_option].field(current_resource.model, name, options)
|
58
|
-
#generate_association_actions field if field.association?
|
59
|
-
#generate_change_actions field if field.toggable?
|
57
|
+
_update_fields.presence || _form_fields
|
60
58
|
end
|
61
59
|
|
62
60
|
end
|
@@ -4,21 +4,66 @@ module Puffer
|
|
4
4
|
|
5
5
|
def self.included base
|
6
6
|
base.class_eval do
|
7
|
-
|
7
|
+
include InstanceMethods
|
8
|
+
extend ClassMethods
|
9
|
+
|
10
|
+
helper_method :resource_session, :puffer_navigation, :sidebar_puffer_navigation, :resource, :record, :records
|
8
11
|
end
|
9
12
|
end
|
10
13
|
|
11
|
-
|
14
|
+
module ClassMethods
|
15
|
+
|
16
|
+
def model_name
|
17
|
+
@model_name ||= ((puffer? and configuration.model) || controller_name.singularize).to_s
|
18
|
+
end
|
19
|
+
|
20
|
+
def model
|
21
|
+
@model ||= model_name.classify.constantize rescue nil
|
22
|
+
end
|
12
23
|
|
13
24
|
end
|
14
25
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
26
|
+
module InstanceMethods
|
27
|
+
|
28
|
+
def puffer_navigation
|
29
|
+
Rails.application.routes.puffer[resource.prefix].values.map(&:first).each do |controller|
|
30
|
+
title = controller.configuration.group.to_s.humanize
|
31
|
+
path = send("#{resource.prefix}_#{controller.controller_name}_path")
|
32
|
+
current = puffer? && resource.root.controller.configuration.group == controller.configuration.group
|
33
|
+
yield title, path, current
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def sidebar_puffer_navigation
|
38
|
+
(Rails.application.routes.puffer[resource.prefix][configuration.group] || []).each do |controller|
|
39
|
+
title = controller.model.model_name.human
|
40
|
+
path = send("#{resource.prefix}_#{controller.controller_name}_path")
|
41
|
+
current = controller.controller_name == resource.controller_name
|
42
|
+
yield title, path, current
|
43
|
+
end if puffer?
|
44
|
+
end
|
45
|
+
|
46
|
+
def resource_session
|
47
|
+
postfix = params[:action] =~ /associated_/ ? params[:action] : ''
|
48
|
+
name = "#{resource.model_name}#{postfix}".to_sym
|
49
|
+
session[:resources] ||= {}
|
50
|
+
session[:resources][name] ||= {}
|
51
|
+
session[:resources][name][:boolean] ||= {}
|
52
|
+
session[:resources][name]
|
53
|
+
end
|
54
|
+
|
55
|
+
def resource
|
56
|
+
@resource ||= Puffer::Resource.new params, request
|
57
|
+
end
|
58
|
+
|
59
|
+
def record
|
60
|
+
@record || instance_variable_get("@#{resource.model_name}")
|
61
|
+
end
|
62
|
+
|
63
|
+
def records
|
64
|
+
@records || instance_variable_get("@#{resource.model_name.pluralize}")
|
65
|
+
end
|
66
|
+
|
22
67
|
end
|
23
68
|
|
24
69
|
end
|
@@ -4,38 +4,20 @@ module Puffer
|
|
4
4
|
|
5
5
|
def self.included base
|
6
6
|
base.class_eval do
|
7
|
-
class_attribute :current_config
|
8
|
-
self.current_config = Puffer::Controller::Config.new
|
9
|
-
|
10
7
|
extend ClassMethods
|
11
8
|
|
12
9
|
layout 'puffer'
|
10
|
+
helper_method :puffer?
|
13
11
|
|
14
|
-
|
15
|
-
|
16
|
-
rescue_from ActionView::MissingTemplate do |exception|
|
17
|
-
render current_resource.template(exception.path.split('/').last)
|
18
|
-
end
|
12
|
+
self.view_paths = Puffer::PathSet.new view_paths
|
19
13
|
end
|
20
14
|
end
|
21
15
|
|
22
|
-
def
|
23
|
-
@current_resource ||= Puffer::Resource.new params, request
|
24
|
-
end
|
25
|
-
|
26
|
-
def record
|
27
|
-
@record || instance_variable_get("@#{current_resource.model_name}")
|
28
|
-
end
|
29
|
-
|
30
|
-
def records
|
31
|
-
@records || instance_variable_get("@#{current_resource.model_name.pluralize}")
|
32
|
-
end
|
16
|
+
def puffer?; true; end
|
33
17
|
|
34
18
|
module ClassMethods
|
35
19
|
|
36
|
-
def puffer
|
37
|
-
true
|
38
|
-
end
|
20
|
+
def puffer?; true; end
|
39
21
|
|
40
22
|
end
|
41
23
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module Puffer
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
config.autoload_paths << File.join(root, 'lib')
|
4
|
+
|
5
|
+
initializer 'puffer.add_cells_paths', :after => :add_view_paths do
|
6
|
+
Cell::Base.prepend_view_path(Cells::DEFAULT_VIEW_PATHS.map { |path| File.join(root, path) })
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -6,14 +6,16 @@ module Puffer
|
|
6
6
|
def self.included base
|
7
7
|
base.class_eval do
|
8
8
|
extend ClassMethods
|
9
|
+
|
10
|
+
helper_method :puffer?
|
9
11
|
end
|
10
12
|
end
|
11
13
|
|
14
|
+
def puffer?; false; end
|
15
|
+
|
12
16
|
module ClassMethods
|
13
17
|
|
14
|
-
def puffer
|
15
|
-
false
|
16
|
-
end
|
18
|
+
def puffer?; false; end
|
17
19
|
|
18
20
|
end
|
19
21
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Puffer
|
2
|
+
module Extensions
|
3
|
+
module FormBuilder
|
4
|
+
|
5
|
+
def puffer_field field
|
6
|
+
input = Puffer::Inputs.map_field field
|
7
|
+
input.new(self, @template, field).render
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
ActionView::Helpers::FormBuilder.send :include, Puffer::Extensions::FormBuilder
|
@@ -21,6 +21,14 @@ module Puffer
|
|
21
21
|
puffer_resources(*resources, &block) || original_resources(*resources, &block)
|
22
22
|
end
|
23
23
|
|
24
|
+
def puffer_controller controller
|
25
|
+
puffer = Rails.application.routes.puffer
|
26
|
+
prefix = @scope[:module]
|
27
|
+
puffer[prefix] ||= ActiveSupport::OrderedHash.new
|
28
|
+
puffer[prefix][controller.configuration.group] ||= []
|
29
|
+
puffer[prefix][controller.configuration.group] << controller
|
30
|
+
end
|
31
|
+
|
24
32
|
def puffer_resource(*resources, &block)
|
25
33
|
options = resources.extract_options!
|
26
34
|
|
@@ -36,6 +44,8 @@ module Puffer
|
|
36
44
|
@scope[:ancestors] ||= []
|
37
45
|
@scope[:children] ||= []
|
38
46
|
|
47
|
+
puffer_controller controller if @scope[:ancestors] == []
|
48
|
+
|
39
49
|
resource_scope(resource) do
|
40
50
|
siblings = @scope[:children].dup
|
41
51
|
@scope[:children] = []
|
@@ -83,6 +93,8 @@ module Puffer
|
|
83
93
|
@scope[:ancestors] ||= []
|
84
94
|
@scope[:children] ||= []
|
85
95
|
|
96
|
+
puffer_controller controller if @scope[:ancestors] == []
|
97
|
+
|
86
98
|
resource_scope(resource) do
|
87
99
|
siblings = @scope[:children].dup
|
88
100
|
@scope[:children] = []
|
@@ -119,7 +131,31 @@ module Puffer
|
|
119
131
|
end
|
120
132
|
|
121
133
|
end
|
134
|
+
|
135
|
+
module RouteSet
|
136
|
+
|
137
|
+
def self.included base
|
138
|
+
base.class_eval do
|
139
|
+
alias_method :original_clear!, :clear!
|
140
|
+
attr_accessor_with_default :puffer, {}
|
141
|
+
|
142
|
+
include InstanceMethods
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
module InstanceMethods
|
147
|
+
|
148
|
+
def clear!
|
149
|
+
self.puffer = {}
|
150
|
+
original_clear!
|
151
|
+
end
|
152
|
+
|
153
|
+
end
|
154
|
+
|
155
|
+
end
|
156
|
+
|
122
157
|
end
|
123
158
|
end
|
124
159
|
|
160
|
+
ActionDispatch::Routing::RouteSet.send :include, Puffer::Extensions::RouteSet
|
125
161
|
ActionDispatch::Routing::Mapper.send :include, Puffer::Extensions::Mapper
|
data/lib/puffer/fields.rb
CHANGED
@@ -1,6 +1,27 @@
|
|
1
1
|
module Puffer
|
2
2
|
class Fields < Array
|
3
3
|
|
4
|
+
class_attribute :offers
|
5
|
+
self.offers = []
|
6
|
+
|
7
|
+
def self.offer_type &block
|
8
|
+
offers.push block if block_given?
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.offered_type field
|
12
|
+
swallow_nil{ offers.detect { |offer| offer.call(field) }.call(field) }
|
13
|
+
end
|
14
|
+
|
15
|
+
offer_type do |field|
|
16
|
+
:select if field.options.key?(:select)
|
17
|
+
end
|
18
|
+
offer_type do |field|
|
19
|
+
:password if field.name =~ /password/
|
20
|
+
end
|
21
|
+
offer_type do |field|
|
22
|
+
field.model.reflect_on_association(name.to_sym).macro if field.model.reflect_on_association name.to_sym
|
23
|
+
end
|
24
|
+
|
4
25
|
def field *args
|
5
26
|
push Field.new(*args)
|
6
27
|
end
|
data/lib/puffer/fields/field.rb
CHANGED
@@ -19,7 +19,7 @@ module Puffer
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def label
|
22
|
-
@label ||=
|
22
|
+
@label ||= resource.human_attribute_name(field)
|
23
23
|
end
|
24
24
|
|
25
25
|
def order
|
@@ -27,18 +27,23 @@ module Puffer
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def type
|
30
|
-
@type ||= options[:type] ? options[:type].to_sym : (column ? column.type : :string)
|
30
|
+
@type ||= options[:type] ? options[:type].to_sym : (Puffer::Fields.offered_type(self) || (column ? column.type : :string))
|
31
31
|
end
|
32
32
|
|
33
33
|
def to_s
|
34
34
|
field
|
35
35
|
end
|
36
36
|
|
37
|
+
def input_options
|
38
|
+
{}
|
39
|
+
end
|
40
|
+
|
37
41
|
def model
|
38
42
|
unless @model
|
39
43
|
@model = resource
|
40
44
|
associations = field.split('.')
|
41
|
-
|
45
|
+
associations.pop
|
46
|
+
while @model.reflect_on_association(association = swallow_nil{associations.shift.to_sym}) do
|
42
47
|
@model = @model.reflect_on_association(association).klass
|
43
48
|
end
|
44
49
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Puffer
|
2
|
+
module Inputs
|
3
|
+
|
4
|
+
mattr_accessor :mappings
|
5
|
+
self.mappings = {}
|
6
|
+
|
7
|
+
def self.map_type *args
|
8
|
+
to = args.extract_options![:to]
|
9
|
+
raise ArgumentError, "You need to give :to as option to map_type" unless to
|
10
|
+
args.each { |type| mappings[type] = to }
|
11
|
+
end
|
12
|
+
|
13
|
+
map_type :belongs_to, :has_one, :to => Puffer::Inputs::Association
|
14
|
+
map_type :has_many, :has_and_belongs_to_many, :to => Puffer::Inputs::CollectionAssociation
|
15
|
+
map_type :date, :time, :datetime, :timestamp, :to => Puffer::Inputs::DateTime
|
16
|
+
|
17
|
+
def self.map_field field
|
18
|
+
mappings[field.type] || (const_defined?(field.type.to_s.classify) ?
|
19
|
+
"Puffer::Inputs::#{field.type.to_s.classify}".constantize : Puffer::Inputs::Base)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Puffer
|
2
|
+
module Inputs
|
3
|
+
class Base
|
4
|
+
|
5
|
+
attr_accessor :builder, :template, :field
|
6
|
+
|
7
|
+
def initialize builder, template, field
|
8
|
+
@builder = builder
|
9
|
+
@field = field
|
10
|
+
@template = template
|
11
|
+
end
|
12
|
+
|
13
|
+
def render
|
14
|
+
template.html_safe
|
15
|
+
end
|
16
|
+
|
17
|
+
def template
|
18
|
+
<<-INPUT
|
19
|
+
#{label}
|
20
|
+
#{error}
|
21
|
+
#{input}
|
22
|
+
INPUT
|
23
|
+
end
|
24
|
+
|
25
|
+
def label
|
26
|
+
builder.label field
|
27
|
+
end
|
28
|
+
|
29
|
+
def input
|
30
|
+
builder.text_field field, field.input_options
|
31
|
+
end
|
32
|
+
|
33
|
+
def error
|
34
|
+
builder.object.errors[field.name.to_sym].first
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|